libesedb-20240420/0000755000175000017500000000000014610746415014370 5ustar00lordyestalordyestalibesedb-20240420/libfdata/0000755000175000017500000000000014610746414016135 5ustar00lordyestalordyestalibesedb-20240420/libfdata/libfdata_error.h0000644000175000017500000000340314610746235021266 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFDATA_INTERNAL_ERROR_H ) */ libesedb-20240420/libfdata/libfdata_area.c0000644000175000017500000011200514610746235021037 0ustar00lordyestalordyesta/* * The area functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_area.h" #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_segments_array.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Creates an area * Make sure the value area is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the area * takes over management of the data handle and the data handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_area_initialize( libfdata_area_t **area, size64_t element_data_size, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_initialize"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } if( *area != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid area value already set.", function ); return( -1 ); } if( element_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid element data size value zero or less.", function ); return( -1 ); } internal_area = memory_allocate_structure( libfdata_internal_area_t ); if( internal_area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create area.", function ); goto on_error; } if( memory_set( internal_area, 0, sizeof( libfdata_internal_area_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear area.", function ); memory_free( internal_area ); return( -1 ); } if( libcdata_array_initialize( &( internal_area->segments_array ), 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; } if( libcdata_array_initialize( &( internal_area->mapped_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped ranges array.", function ); goto on_error; } if( libfcache_date_time_get_timestamp( &( internal_area->timestamp ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); goto on_error; } internal_area->element_data_size = element_data_size; internal_area->flags |= flags; internal_area->data_handle = data_handle; internal_area->free_data_handle = free_data_handle; internal_area->clone_data_handle = clone_data_handle; internal_area->read_element_data = read_element_data; internal_area->write_element_data = write_element_data; *area = (libfdata_area_t *) internal_area; return( 1 ); on_error: if( internal_area != NULL ) { if( internal_area->segments_array != NULL ) { libcdata_array_free( &( internal_area->segments_array ), NULL, NULL ); } memory_free( internal_area ); } return( -1 ); } /* Frees an area * Returns 1 if successful or -1 on error */ int libfdata_area_free( libfdata_area_t **area, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_free"; int result = 1; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } if( *area != NULL ) { internal_area = (libfdata_internal_area_t *) *area; *area = NULL; if( libcdata_array_free( &( internal_area->segments_array ), (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 segments array.", function ); result = -1; } if( libcdata_array_free( &( internal_area->mapped_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free mapped ranges array.", function ); result = -1; } if( ( internal_area->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_area->data_handle != NULL ) { if( internal_area->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid area - missing free data handle function.", function ); result = -1; } else if( internal_area->free_data_handle( &( internal_area->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_area ); } return( result ); } /* Clones (duplicates) the area * Returns 1 if successful or -1 on error */ int libfdata_area_clone( libfdata_area_t **destination_area, libfdata_area_t *source_area, libcerror_error_t **error ) { libfdata_internal_area_t *internal_destination_area = NULL; libfdata_internal_area_t *internal_source_area = NULL; static char *function = "libfdata_area_clone"; if( destination_area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination area.", function ); return( -1 ); } if( *destination_area != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination area value already set.", function ); return( -1 ); } if( source_area == NULL ) { *destination_area = source_area; return( 1 ); } internal_source_area = (libfdata_internal_area_t *) source_area; /* TODO refactor to use libfdata_area_initialize this requires libcdata_array_copy_elements function */ internal_destination_area = memory_allocate_structure( libfdata_internal_area_t ); if( internal_destination_area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination area.", function ); goto on_error; } if( memory_set( internal_destination_area, 0, sizeof( libfdata_internal_area_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination area.", function ); memory_free( internal_destination_area ); return( -1 ); } if( internal_source_area->data_handle != NULL ) { if( internal_source_area->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source area - missing free data handle function.", function ); goto on_error; } if( internal_source_area->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source area - missing clone data handle function.", function ); goto on_error; } if( internal_source_area->clone_data_handle( &( internal_destination_area->data_handle ), internal_source_area->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( libcdata_array_clone( &( internal_destination_area->segments_array ), internal_source_area->segments_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination segments array.", function ); goto on_error; } if( libcdata_array_clone( &( internal_destination_area->mapped_ranges_array ), internal_source_area->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_mapped_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination mapped ranges array.", function ); goto on_error; } internal_destination_area->element_data_size = internal_source_area->element_data_size; internal_destination_area->timestamp = internal_source_area->timestamp; internal_destination_area->flags = internal_source_area->flags | LIBFDATA_DATA_HANDLE_FLAG_MANAGED; internal_destination_area->data_handle = internal_source_area->data_handle; internal_destination_area->free_data_handle = internal_source_area->free_data_handle; internal_destination_area->clone_data_handle = internal_source_area->clone_data_handle; internal_destination_area->read_element_data = internal_source_area->read_element_data; internal_destination_area->write_element_data = internal_source_area->write_element_data; *destination_area = (libfdata_area_t *) internal_destination_area; return( 1 ); on_error: if( internal_destination_area != NULL ) { if( internal_destination_area->segments_array != NULL ) { libcdata_array_free( &( internal_destination_area->segments_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, NULL ); } if( ( internal_destination_area->data_handle != NULL ) && ( internal_source_area->free_data_handle != NULL ) ) { internal_source_area->free_data_handle( &( internal_destination_area->data_handle ), NULL ); } memory_free( internal_destination_area ); } return( -1 ); } /* Segment functions */ /* Empties the area * Returns 1 if successful or -1 on error */ int libfdata_area_empty( libfdata_area_t *area, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_empty"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libcdata_array_empty( internal_area->segments_array, (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 empty segments array.", function ); return( -1 ); } if( libcdata_array_empty( internal_area->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty mapped ranges array.", function ); return( -1 ); } internal_area->size = 0; return( 1 ); } /* Resizes the area * Returns 1 if successful or -1 on error */ int libfdata_area_resize( libfdata_area_t *area, int number_of_segments, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_resize"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libcdata_array_resize( internal_area->segments_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize segments array.", function ); return( -1 ); } if( libcdata_array_resize( internal_area->mapped_ranges_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize mapped ranges array.", function ); return( -1 ); } internal_area->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Retrieves the number of segments of the area * Returns 1 if successful or -1 on error */ int libfdata_area_get_number_of_segments( libfdata_area_t *area, int *number_of_segments, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_get_number_of_segments"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libcdata_array_get_number_of_entries( internal_area->segments_array, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the offset and size of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_area_get_segment_by_index( libfdata_area_t *area, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_get_segment_by_index"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libfdata_segments_array_get_segment_by_index( internal_area->segments_array, segment_index, segment_file_index, 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_area_set_segment_by_index( libfdata_area_t *area, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_set_segment_by_index"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libfdata_segments_array_set_segment_by_index( internal_area->segments_array, internal_area->mapped_ranges_array, &( internal_area->size ), segment_index, segment_file_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 segment: %d.", function, segment_index ); return( -1 ); } internal_area->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Prepends a segment * Returns 1 if successful or -1 on error */ int libfdata_area_prepend_segment( libfdata_area_t *area, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_prepend_segment"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libfdata_segments_array_prepend_segment( internal_area->segments_array, internal_area->mapped_ranges_array, &( internal_area->size ), segment_file_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 prepend segment.", function ); return( -1 ); } internal_area->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Appends a segment * Returns 1 if successful or -1 on error */ int libfdata_area_append_segment( libfdata_area_t *area, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_append_segment"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( libfdata_segments_array_append_segment( internal_area->segments_array, internal_area->mapped_ranges_array, &( internal_area->size ), segment_index, segment_file_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 segment.", function ); return( -1 ); } internal_area->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Area element functions */ /* Retrieves the element data size of the area * Returns 1 if successful or -1 on error */ int libfdata_area_get_element_data_size( libfdata_area_t *area, size64_t *element_data_size, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_get_element_data_size"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( element_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element data size.", function ); return( -1 ); } *element_data_size = internal_area->element_data_size; return( 1 ); } /* Area element value functions */ /* Retrieves the value an element at a specific offset * Returns 1 if successful or -1 on error */ int libfdata_area_get_element_value_at_offset( libfdata_area_t *area, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t element_value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_area_t *internal_area = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_area_get_element_value_at_offset"; off64_t cache_value_offset = (off64_t) -1; off64_t element_data_offset = (off64_t) -1; int64_t cache_value_timestamp = 0; uint32_t element_data_flags = 0; int cache_entry_index = -1; int cache_value_file_index = -1; int element_data_file_index = -1; int element_index = -1; int number_of_cache_entries = 0; int result = 0; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( internal_area->read_element_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid area - missing read element data function.", function ); return( -1 ); } if( internal_area->element_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid area - element data size value out of bounds.", function ); return( -1 ); } if( ( internal_area->size == 0 ) || ( internal_area->size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid area - size value out of bounds.", function ); return( -1 ); } if( ( (size64_t) element_value_offset > internal_area->size ) || ( (size64_t) element_value_offset > ( internal_area->size - internal_area->element_data_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element value offset value out of bounds.", function ); return( -1 ); } if( libfdata_segments_array_get_data_range_at_offset( internal_area->segments_array, element_value_offset, &element_data_offset, &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 for offset: 0x%08" PRIx64 ".", function, element_value_offset ); 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.", function ); return( -1 ); } element_data_file_index = segment_data_range->file_index; element_data_offset += segment_data_range->offset; element_data_flags = segment_data_range->flags; if( libfcache_cache_get_number_of_entries( (libfcache_cache_t *) 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 ); } element_index = (int) ( element_value_offset / internal_area->element_data_size ); if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( internal_area->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_area->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_area->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( (libfcache_cache_t *) 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_file_index, &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_file_index == cache_value_file_index ) && ( element_data_offset == cache_value_offset ) && ( internal_area->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_area->element_data_size ); } #endif if( internal_area->read_element_data( internal_area->data_handle, file_io_handle, area, cache, element_value_offset, element_data_file_index, element_data_offset, internal_area->element_data_size, element_data_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: 0x%08" PRIx64 ".", function, element_data_offset ); return( -1 ); } if( internal_area->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_area->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_area->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( (libfcache_cache_t *) 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_file_index, &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_file_index != cache_value_file_index ) || ( element_data_offset != cache_value_offset ) || ( internal_area->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 ); } /* Sets the value of a specific element * * If the flag LIBFDATA_AREA_ELEMENT_VALUE_FLAG_MANAGED is set the area * 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_area_set_element_value_at_offset( libfdata_area_t *area, intptr_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfdata_cache_t *cache, off64_t element_value_offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_area_set_element_value_at_offset"; off64_t element_data_offset = (off64_t) -1; uint32_t element_data_flags = 0; int cache_entry_index = -1; int element_data_file_index = -1; int element_index = -1; int number_of_cache_entries = 0; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( internal_area->element_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid area - element data size value out of bounds.", function ); return( -1 ); } if( ( internal_area->size == 0 ) || ( internal_area->size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid area - size value out of bounds.", function ); return( -1 ); } if( ( (size64_t) element_value_offset > internal_area->size ) || ( (size64_t) element_value_offset > ( internal_area->size - internal_area->element_data_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element value offset value out of bounds.", function ); return( -1 ); } if( libfdata_segments_array_get_data_range_at_offset( internal_area->segments_array, element_value_offset, &element_data_offset, &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 for offset: 0x%08" PRIx64 ".", function, element_value_offset ); 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.", function ); return( -1 ); } element_data_file_index = segment_data_range->file_index; element_data_offset += segment_data_range->offset; element_data_flags = segment_data_range->flags; if( libfcache_cache_get_number_of_entries( (libfcache_cache_t *) 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 ); } element_index = (int) ( element_value_offset / internal_area->element_data_size ); if( internal_area->calculate_cache_entry_index == NULL ) { cache_entry_index = element_index % number_of_cache_entries; } else { cache_entry_index = internal_area->calculate_cache_entry_index( element_index, element_data_file_index, element_data_offset, internal_area->element_data_size, element_data_flags, number_of_cache_entries ); } if( libfcache_cache_set_value_by_index( (libfcache_cache_t *) cache, cache_entry_index, element_data_file_index, element_data_offset, internal_area->timestamp, element_value, free_element_value, write_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 size * Returns 1 if successful or -1 on error */ int libfdata_area_get_size( libfdata_area_t *area, size64_t *size, libcerror_error_t **error ) { libfdata_internal_area_t *internal_area = NULL; static char *function = "libfdata_area_get_size"; if( area == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid area.", function ); return( -1 ); } internal_area = (libfdata_internal_area_t *) area; if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( internal_area->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_segments_array_calculate_mapped_ranges( internal_area->segments_array, internal_area->mapped_ranges_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } internal_area->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } *size = internal_area->size; return( 1 ); } libesedb-20240420/libfdata/libfdata_stream.h0000644000175000017500000002274414610746235021441 0ustar00lordyestalordyesta/* * The stream functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_STREAM_H ) #define _LIBFDATA_INTERNAL_STREAM_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_stream libfdata_internal_stream_t; struct libfdata_internal_stream { /* The current segment index */ int current_segment_index; /* The current segment data range */ libfdata_range_t *current_segment_data_range; /* The current offset */ off64_t current_offset; /* The (current) segment offset */ off64_t segment_offset; /* The (current) segment data offset */ off64_t segment_data_offset; /* The (stream) size */ size64_t size; /* The mapped (stream) size */ size64_t mapped_size; /* The segments array */ libcdata_array_t *segments_array; /* The mapped ranges array */ libcdata_array_t *mapped_ranges_array; /* The flags */ uint8_t flags; /* 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 create segment function */ int (*create_segment)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); /* The read segment data function */ ssize_t (*read_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t read_flags, libcerror_error_t **error ); /* The write segment data function */ ssize_t (*write_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, const uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t write_flags, libcerror_error_t **error ); /* The seek segment offset function */ off64_t (*seek_segment_offset)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, off64_t segment_offset, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_stream_initialize( libfdata_stream_t **stream, 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 (*create_segment)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ), ssize_t (*read_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t read_flags, libcerror_error_t **error ), ssize_t (*write_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, const uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t write_flags, libcerror_error_t **error ), off64_t (*seek_segment_offset)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, off64_t segment_offset, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_free( libfdata_stream_t **stream, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_clone( libfdata_stream_t **destination_stream, libfdata_stream_t *source_stream, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_stream_empty( libfdata_stream_t *stream, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_resize( libfdata_stream_t *stream, int number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_reverse( libfdata_stream_t *stream, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_number_of_segments( libfdata_stream_t *stream, int *number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_segment_by_index( libfdata_stream_t *stream, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_set_segment_by_index( libfdata_stream_t *stream, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_prepend_segment( libfdata_stream_t *stream, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_append_segment( libfdata_stream_t *stream, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_set_mapped_size( libfdata_stream_t *stream, size64_t mapped_size, libcerror_error_t **error ); /* Mapped range functions */ LIBFDATA_EXTERN \ int libfdata_stream_get_segment_mapped_range( libfdata_stream_t *stream, int segment_index, off64_t *mapped_range_offset, size64_t *mapped_range_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_segment_index_at_offset( libfdata_stream_t *stream, off64_t offset, int *segment_index, off64_t *segment_data_offset, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_segment_at_offset( libfdata_stream_t *stream, off64_t offset, int *segment_index, off64_t *segment_data_offset, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); /* IO functions */ LIBFDATA_EXTERN \ ssize_t libfdata_stream_read_buffer( libfdata_stream_t *stream, intptr_t *file_io_handle, uint8_t *buffer, size_t buffer_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ ssize_t libfdata_stream_read_buffer_at_offset( libfdata_stream_t *stream, intptr_t *file_io_handle, uint8_t *buffer, size_t buffer_size, off64_t offset, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ ssize_t libfdata_stream_write_buffer( libfdata_stream_t *stream, intptr_t *file_io_handle, const uint8_t *buffer, size_t buffer_size, uint8_t write_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ off64_t libfdata_stream_seek_offset( libfdata_stream_t *stream, off64_t offset, int whence, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_offset( libfdata_stream_t *stream, off64_t *offset, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_stream_get_size( libfdata_stream_t *stream, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_STREAM_H ) */ libesedb-20240420/libfdata/libfdata_cache.h0000644000175000017500000000272314610746235021204 0ustar00lordyestalordyesta/* * Cache functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_CACHE_H ) #define _LIBFDATA_INTERNAL_CACHE_H #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ int libfdata_cache_initialize( libfdata_cache_t **cache, int maximum_cache_entries, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_cache_free( libfdata_cache_t **cache, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_CACHE_H ) */ libesedb-20240420/libfdata/libfdata_range_list.c0000644000175000017500000007432314610746235022270 0ustar00lordyestalordyesta/* * The range list functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_range_list.h" #include "libfdata_types.h" /* Creates a range list * Make sure the value range_list is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the range list * takes over management of the data handle and the data handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_range_list_initialize( libfdata_range_list_t **range_list, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t write_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libfdata_range_list_initialize"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( *range_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid range list value already set.", function ); return( -1 ); } if( ( flags & 0xfe ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function ); return( -1 ); } internal_range_list = memory_allocate_structure( libfdata_internal_range_list_t ); if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create range list.", function ); goto on_error; } if( memory_set( internal_range_list, 0, sizeof( libfdata_internal_range_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear range list.", function ); memory_free( internal_range_list ); return( -1 ); } if( libcdata_range_list_initialize( &( internal_range_list->elements_range_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create elements range list.", function ); goto on_error; } internal_range_list->flags |= flags; internal_range_list->data_handle = data_handle; internal_range_list->free_data_handle = free_data_handle; internal_range_list->clone_data_handle = clone_data_handle; internal_range_list->read_element_data = read_element_data; internal_range_list->write_element_data = write_element_data; *range_list = (libfdata_range_list_t *) internal_range_list; return( 1 ); on_error: if( internal_range_list != NULL ) { if( internal_range_list->elements_range_list != NULL ) { libcdata_range_list_free( &( internal_range_list->elements_range_list ), NULL, NULL ); } memory_free( internal_range_list ); } return( -1 ); } /* Frees a range list * Returns 1 if successful or -1 on error */ int libfdata_range_list_free( libfdata_range_list_t **range_list, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libfdata_range_list_free"; int result = 1; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *range_list != NULL ) { internal_range_list = (libfdata_internal_range_list_t *) *range_list; *range_list = NULL; if( libcdata_range_list_free( &( internal_range_list->elements_range_list ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the elements range list.", function ); result = -1; } if( ( internal_range_list->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_range_list->data_handle != NULL ) { if( internal_range_list->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list - missing free data handle function.", function ); result = -1; } else if( internal_range_list->free_data_handle( &( internal_range_list->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_range_list ); } return( result ); } /* Clones (duplicates) the range list * Returns 1 if successful or -1 on error */ int libfdata_range_list_clone( libfdata_range_list_t **destination_range_list, libfdata_range_list_t *source_range_list, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_destination_range_list = NULL; libfdata_internal_range_list_t *internal_source_range_list = NULL; static char *function = "libfdata_range_list_clone"; if( destination_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination range list.", function ); return( -1 ); } if( *destination_range_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination range list value already set.", function ); return( -1 ); } if( source_range_list == NULL ) { *destination_range_list = NULL; return( 1 ); } internal_source_range_list = (libfdata_internal_range_list_t *) source_range_list; internal_destination_range_list = memory_allocate_structure( libfdata_internal_range_list_t ); if( internal_destination_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination range list.", function ); goto on_error; } if( memory_set( internal_destination_range_list, 0, sizeof( libfdata_internal_range_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination range list.", function ); memory_free( internal_destination_range_list ); return( -1 ); } if( internal_source_range_list->data_handle != NULL ) { if( internal_source_range_list->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source range list - missing free data handle function.", function ); goto on_error; } if( internal_source_range_list->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source range list - missing clone data handle function.", function ); goto on_error; } if( internal_source_range_list->clone_data_handle( &( internal_destination_range_list->data_handle ), internal_source_range_list->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( libcdata_range_list_clone( &( internal_destination_range_list->elements_range_list ), internal_source_range_list->elements_range_list, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_list_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination elements range list.", function ); goto on_error; } internal_destination_range_list->flags = internal_source_range_list->flags | LIBFDATA_DATA_HANDLE_FLAG_MANAGED; internal_destination_range_list->free_data_handle = internal_source_range_list->free_data_handle; internal_destination_range_list->clone_data_handle = internal_source_range_list->clone_data_handle; internal_destination_range_list->read_element_data = internal_source_range_list->read_element_data; internal_destination_range_list->write_element_data = internal_source_range_list->write_element_data; *destination_range_list = (libfdata_range_list_t *) internal_destination_range_list; return( 1 ); on_error: if( internal_destination_range_list != NULL ) { if( ( internal_destination_range_list->data_handle != NULL ) && ( internal_source_range_list->free_data_handle != NULL ) ) { internal_source_range_list->free_data_handle( &( internal_destination_range_list->data_handle ), NULL ); } memory_free( internal_destination_range_list ); } return( -1 ); } /* List elements functions */ /* Empties the range list * Returns 1 if successful or -1 on error */ int libfdata_range_list_empty( libfdata_range_list_t *range_list, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libfdata_range_list_empty"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libfdata_internal_range_list_t *) range_list; if( libcdata_range_list_empty( internal_range_list->elements_range_list, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to empty elements range list.", function ); return( -1 ); } return( 1 ); } /* Mapped range functions */ /* Retrieves the list element for a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_range_list_get_list_element_at_offset( libfdata_range_list_t *range_list, off64_t offset, off64_t *element_data_offset, libfdata_list_element_t **element, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; libfdata_list_t *list = NULL; static char *function = "libfdata_range_list_get_list_element_at_offset"; off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libfdata_internal_range_list_t *) range_list; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: 0x%08" PRIx64 "\n", function, offset ); } #endif result = libcdata_range_list_get_range_at_offset( internal_range_list->elements_range_list, (uint64_t) offset, (uint64_t *) &mapped_range_offset, (uint64_t *) &mapped_range_size, (intptr_t **) &list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from elements range list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } #endif result = libfdata_list_get_list_element_at_offset( list, offset, &element_index, element_data_offset, element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element from list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - element missing for offset: %" PRIi64 ".", function, offset ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } /* Retrieves the data range of an element at a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_range_list_get_element_at_offset( libfdata_range_list_t *range_list, off64_t offset, off64_t *element_data_offset, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, libcerror_error_t **error ) { libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_at_offset"; int result = 0; result = libfdata_range_list_get_list_element_at_offset( range_list, offset, element_data_offset, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element at offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result != 0 ) { if( libfdata_list_element_get_data_range( list_element, element_file_index, element_offset, element_size, element_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 at offset: %" PRIi64 ".", function, offset ); return( -1 ); } } return( result ); } /* Inserts an element data range based on its mapped range * Returns 1 if successful or -1 on error */ int libfdata_range_list_insert_element( libfdata_range_list_t *range_list, off64_t offset, size64_t size, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; libfdata_list_t *list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_range_list_insert_element"; off64_t element_data_offset = 0; off64_t mapped_range_offset = 0; size64_t element_mapped_size = 0; size64_t mapped_range_size = 0; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libfdata_internal_range_list_t *) range_list; if( offset < 0 ) { 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 ); } 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( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, element_file_index, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: requested range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, offset, offset + size, size ); } #endif result = libcdata_range_list_get_range_at_offset( internal_range_list->elements_range_list, (uint64_t) offset, (uint64_t *) &mapped_range_offset, (uint64_t *) &mapped_range_size, (intptr_t **) &list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from elements range list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } #endif result = libfdata_list_get_list_element_at_offset( list, offset, &element_index, &element_data_offset, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element from list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - element missing for offset: %" PRIi64 ".", function, offset ); return( -1 ); } if( element_data_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 ); } if( libfdata_list_element_get_mapped_size( list_element, &element_mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size from list element at offset: %" PRIi64 ".", function, offset ); return( -1 ); } if( size != element_mapped_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid size value out of bounds.", function ); return( -1 ); } if( libfdata_list_element_set_data_range( list_element, element_file_index, element_offset, element_size, element_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range in list element at offset: %" PRIi64 ".", function, offset ); return( -1 ); } } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: no mapped range found.\n", function ); } #endif if( libfdata_list_initialize( &list, internal_range_list->data_handle, internal_range_list->free_data_handle, internal_range_list->clone_data_handle, internal_range_list->read_element_data, internal_range_list->write_element_data, LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list.", function ); return( -1 ); } if( libfdata_list_set_mapped_offset( list, offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped offset in list.", function ); libfdata_list_free( &list, NULL ); return( -1 ); } if( libfdata_list_append_element_with_mapped_size( list, &element_index, element_file_index, element_offset, element_size, element_flags, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to list.", function ); libfdata_list_free( &list, NULL ); return( -1 ); } result = libcdata_range_list_insert_range( internal_range_list->elements_range_list, (uint64_t) offset, (uint64_t) size, (intptr_t *) list, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_free, (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libfdata_list_append_list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert range in elements range list.", function ); libfdata_list_free( &list, NULL ); return( -1 ); } list = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* List element value functions */ /* Retrieves the value an element at a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_range_list_get_element_value_at_offset( libfdata_range_list_t *range_list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, off64_t *element_data_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; libfdata_list_t *list = NULL; static char *function = "libfdata_range_list_get_element_value_at_offset"; off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libfdata_internal_range_list_t *) range_list; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: 0x%08" PRIx64 "\n", function, offset ); } #endif result = libcdata_range_list_get_range_at_offset( internal_range_list->elements_range_list, (uint64_t) offset, (uint64_t *) &mapped_range_offset, (uint64_t *) &mapped_range_size, (intptr_t **) &list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from elements range list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } #endif result = libfdata_list_get_element_value_at_offset( list, file_io_handle, cache, offset, &element_index, element_data_offset, element_value, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value from list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - element value missing for offset: %" PRIi64 ".", function, offset ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } /* Sets the value of an element at a specific offset * * If the flag LIBFDATA_RANGE_LIST_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, 0 if not or -1 on error */ int libfdata_range_list_set_element_value_at_offset( libfdata_range_list_t *range_list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { libfdata_internal_range_list_t *internal_range_list = NULL; libfdata_list_t *list = NULL; static char *function = "libfdata_range_list_set_element_value_at_offset"; off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libfdata_internal_range_list_t *) range_list; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: 0x%08" PRIx64 "\n", function, offset ); } #endif result = libcdata_range_list_get_range_at_offset( internal_range_list->elements_range_list, (uint64_t) offset, (uint64_t *) &mapped_range_offset, (uint64_t *) &mapped_range_size, (intptr_t **) &list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from elements range list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } #endif result = libfdata_list_set_element_value_at_offset( list, file_io_handle, cache, offset, element_value, free_element_value, write_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element value in list for offset: %" PRIi64 ".", function, offset ); return( -1 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - element value missing for offset: %" PRIi64 ".", function, offset ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } libesedb-20240420/libfdata/libfdata_mapped_range.c0000644000175000017500000001525214610746235022557 0ustar00lordyestalordyesta/* * The (data) mapped range functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_libcerror.h" #include "libfdata_mapped_range.h" /* Creates a mapped range * Make sure the value mapped_range is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_mapped_range_initialize( libfdata_mapped_range_t **mapped_range, libcerror_error_t **error ) { static char *function = "libfdata_mapped_range_initialize"; if( mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped range.", function ); return( -1 ); } if( *mapped_range != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid mapped range value already set.", function ); return( -1 ); } *mapped_range = memory_allocate_structure( libfdata_mapped_range_t ); if( *mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create mapped range.", function ); goto on_error; } if( memory_set( *mapped_range, 0, sizeof( libfdata_mapped_range_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear mapped range.", function ); goto on_error; } ( *mapped_range )->offset = (off64_t) -1; return( 1 ); on_error: if( *mapped_range != NULL ) { memory_free( *mapped_range ); *mapped_range = NULL; } return( -1 ); } /* Frees a mapped range * Returns 1 if successful or -1 on error */ int libfdata_mapped_range_free( libfdata_mapped_range_t **mapped_range, libcerror_error_t **error ) { static char *function = "libfdata_mapped_range_free"; if( mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped range.", function ); return( -1 ); } if( *mapped_range != NULL ) { memory_free( *mapped_range ); *mapped_range = NULL; } return( 1 ); } /* Clones (duplicates) the mapped range * Returns 1 if successful or -1 on error */ int libfdata_mapped_range_clone( libfdata_mapped_range_t **destination_mapped_range, libfdata_mapped_range_t *source_mapped_range, libcerror_error_t **error ) { static char *function = "libfdata_mapped_range_clone"; if( destination_mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination mapped range.", function ); return( -1 ); } if( *destination_mapped_range != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination mapped range value already set.", function ); return( -1 ); } if( source_mapped_range == NULL ) { *destination_mapped_range = NULL; return( 1 ); } *destination_mapped_range = memory_allocate_structure( libfdata_mapped_range_t ); if( *destination_mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination mapped range.", function ); goto on_error; } if( memory_copy( *destination_mapped_range, source_mapped_range, sizeof( libfdata_mapped_range_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination mapped range.", function ); goto on_error; } return( 1 ); on_error: if( *destination_mapped_range != NULL ) { memory_free( *destination_mapped_range ); *destination_mapped_range = NULL; } return( -1 ); } /* Retrieves the mapped range values * Returns 1 if successful or -1 on error */ int libfdata_mapped_range_get( libfdata_mapped_range_t *mapped_range, off64_t *offset, size64_t *size, libcerror_error_t **error ) { static char *function = "libfdata_mapped_range_get"; if( mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped 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 ); } *offset = mapped_range->offset; *size = mapped_range->size; return( 1 ); } /* Sets the mapped range values * Returns 1 if successful or -1 on error */ int libfdata_mapped_range_set( libfdata_mapped_range_t *mapped_range, off64_t offset, size64_t size, libcerror_error_t **error ) { static char *function = "libfdata_mapped_range_set"; if( mapped_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped 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 ); } mapped_range->offset = offset; mapped_range->size = size; return( 1 ); } libesedb-20240420/libfdata/libfdata_libcerror.h0000644000175000017500000000263614610746235022127 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFDATA_LIBCERROR_H ) */ libesedb-20240420/libfdata/libfdata_definitions.h0000644000175000017500000001460514610746235022456 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240415 /* The libfdata version string */ #define LIBFDATA_VERSION_STRING "20240415" /* The library flag definitions */ enum LIBFDATA_FLAGS { /* The data is not managed by the library */ LIBFDATA_FLAG_DATA_NON_MANAGED = 0x00, /* The data is managed by the library */ LIBFDATA_FLAG_DATA_MANAGED = 0x01, /* The mapped ranges need to be calculated */ LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES = 0x80 }; /* The area element value flag definitions */ enum LIBFDATA_AREA_ELEMENT_VALUE_FLAGS { LIBFDATA_AREA_ELEMENT_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_AREA_ELEMENT_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The balanced tree leaf value flag definitions */ enum LIBFDATA_BTREE_LEAF_VALUE_FLAGS { LIBFDATA_BTREE_LEAF_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_BTREE_LEAF_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The data handle flag definitions */ enum LIBFDATA_DATA_HANDLE_FLAGS { LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_DATA_HANDLE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The key value flag definitions */ enum LIBFDATA_KEY_VALUE_FLAGS { LIBFDATA_KEY_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_KEY_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The list element value flag definitions */ enum LIBFDATA_LIST_ELEMENT_VALUE_FLAGS { LIBFDATA_LIST_ELEMENT_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The range list value flag definitions */ enum LIBFDATA_RANGE_LIST_VALUE_FLAGS { LIBFDATA_RANGE_LIST_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_RANGE_LIST_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The tree node value flag definitions */ enum LIBFDATA_TREE_NODE_VALUE_FLAGS { LIBFDATA_TREE_NODE_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The vector element value flag definitions */ enum LIBFDATA_VECTOR_ELEMENT_VALUE_FLAGS { LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_DATA_NON_MANAGED, LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_DATA_MANAGED }; /* The comparison function definitions */ enum LIBFDATA_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBFDATA_COMPARE_LESS, /* The first value is less equal than the second value */ LIBFDATA_COMPARE_LESS_EQUAL, /* The first and second values are equal */ LIBFDATA_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBFDATA_COMPARE_GREATER, /* The first value is greater equal than the second value */ LIBFDATA_COMPARE_GREATER_EQUAL }; /* The range flag 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, /* 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, LIBFDATA_RANGE_FLAG_USER_DEFINED_5 = 0x00001000UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_6 = 0x00002000UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_7 = 0x00004000UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_8 = 0x00008000UL, }; #define LIBFDATA_RANGE_FLAG_MAXIMUM \ LIBFDATA_RANGE_FLAG_USER_DEFINED_8 /* The read flag definitions */ enum LIBFDATA_READ_FLAGS { /* Flag to indicate cached data should be ignored */ LIBFDATA_READ_FLAG_IGNORE_CACHE = 0x01, /* Internal flag to indicate data should not be cached */ LIBFDATA_READ_FLAG_NO_CACHE = 0x80 }; /* The tree node flag definitions */ enum LIBFDATA_TREE_NODE_FLAGS { /* The node is a leaf */ LIBFDATA_TREE_NODE_FLAG_IS_LEAF = 0x02, /* The node is virtual */ LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL = 0x04, /* The node is deleted */ LIBFDATA_TREE_NODE_FLAG_IS_DELETED = 0x08, /* The sub nodes data range was set */ LIBFDATA_TREE_NODE_FLAG_SUB_NODES_DATA_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 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 }; #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #define LIBFDATA_BTREE_NODE_LEVEL_UNLIMITED -1 /* The list flag definitions */ enum LIBFDATA_LIST_FLAGS { LIBFDATA_LIST_FLAG_HAS_MAPPED_OFFSET = 0x10 }; /* The list element flag definitions */ enum LIBFDATA_LIST_ELEMENT_FLAGS { LIBFDATA_LIST_ELEMENT_FLAG_HAS_MAPPED_SIZE = 0x10 }; #endif /* !defined( _LIBFDATA_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfdata/libfdata_list.c0000644000175000017500000032225114610746235021110 0ustar00lordyestalordyesta/* * The list functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Creates a list * Make sure the value list is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the list * takes over management of the data handle and the data 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 *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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_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( ( flags & 0xfe ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", 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 ); memory_free( internal_list ); return( -1 ); } if( libcdata_array_initialize( &( internal_list->elements_array ), 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; } if( libcdata_array_initialize( &( internal_list->mapped_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped ranges array.", function ); goto on_error; } internal_list->flags |= flags; internal_list->data_handle = data_handle; internal_list->free_data_handle = free_data_handle; internal_list->clone_data_handle = clone_data_handle; internal_list->read_element_data = read_element_data; internal_list->write_element_data = write_element_data; *list = (libfdata_list_t *) internal_list; return( 1 ); on_error: if( internal_list != NULL ) { if( internal_list->elements_array != NULL ) { libcdata_array_free( &( internal_list->elements_array ), NULL, NULL ); } memory_free( internal_list ); } return( -1 ); } /* Frees a 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( libcdata_array_free( &( internal_list->elements_array ), (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( libcdata_array_free( &( internal_list->mapped_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the mapped ranges array.", function ); result = -1; } if( ( internal_list->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_list->data_handle != NULL ) { if( internal_list->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - missing free data handle function.", function ); result = -1; } else if( internal_list->free_data_handle( &( internal_list->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_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_destination_list = NULL; libfdata_internal_list_t *internal_source_list = 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: invalid destination list value already set.", function ); return( -1 ); } if( source_list == NULL ) { *destination_list = NULL; return( 1 ); } internal_source_list = (libfdata_internal_list_t *) source_list; internal_destination_list = memory_allocate_structure( libfdata_internal_list_t ); if( internal_destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination list.", function ); goto on_error; } if( memory_set( internal_destination_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 destination list.", function ); memory_free( internal_destination_list ); return( -1 ); } if( internal_source_list->data_handle != NULL ) { if( internal_source_list->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source list - missing free data handle function.", function ); goto on_error; } if( internal_source_list->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source list - missing clone data handle function.", function ); goto on_error; } if( internal_source_list->clone_data_handle( &( internal_destination_list->data_handle ), internal_source_list->data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone data handle.", function ); goto on_error; } } /* TODO set destination list in destination elements */ if( libcdata_array_clone( &( internal_destination_list->elements_array ), internal_source_list->elements_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_list_element_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination elements array.", function ); goto on_error; } if( libcdata_array_clone( &( internal_destination_list->mapped_ranges_array ), internal_source_list->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_mapped_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination mapped ranges array.", function ); goto on_error; } internal_destination_list->flags = internal_source_list->flags | LIBFDATA_DATA_HANDLE_FLAG_MANAGED; internal_destination_list->free_data_handle = internal_source_list->free_data_handle; internal_destination_list->clone_data_handle = internal_source_list->clone_data_handle; internal_destination_list->read_element_data = internal_source_list->read_element_data; internal_destination_list->write_element_data = internal_source_list->write_element_data; *destination_list = (libfdata_list_t *) internal_destination_list; return( 1 ); on_error: if( internal_destination_list != NULL ) { if( internal_destination_list->elements_array != NULL ) { libcdata_array_free( &( internal_destination_list->elements_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, NULL ); } if( ( internal_destination_list->data_handle != NULL ) && ( internal_source_list->free_data_handle != NULL ) ) { internal_source_list->free_data_handle( &( internal_destination_list->data_handle ), NULL ); } memory_free( internal_destination_list ); } return( -1 ); } /* Sets the calculate mapped ranges flag * Returns 1 if successful or -1 on error */ int libfdata_list_set_calculate_mapped_ranges_flag( libfdata_list_t *list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_set_calculate_mapped_ranges_flag"; 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; internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* List elements functions */ /* Empties the list * Returns 1 if successful or -1 on error */ int libfdata_list_empty( libfdata_list_t *list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_empty"; 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( libcdata_array_empty( internal_list->elements_array, (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 empty elements array.", function ); return( -1 ); } if( libcdata_array_empty( internal_list->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty mapped ranges array.", function ); return( -1 ); } internal_list->size = 0; return( 1 ); } /* Resizes the list * 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( libcdata_array_resize( internal_list->elements_array, 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 ); } if( libcdata_array_resize( internal_list->mapped_ranges_array, number_of_elements, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize mapped ranges array.", function ); return( -1 ); } internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Reverses the order of the elements * Returns 1 if successful or -1 on error */ int libfdata_list_reverse( libfdata_list_t *list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_reverse"; int 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( libcdata_array_reverse( internal_list->elements_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to reverse elements array.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_list->elements_array, &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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } 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: %d index.", function, element_index ); return( -1 ); } } internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; 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( libcdata_array_get_number_of_entries( internal_list->elements_array, 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 ); } /* Retrieves a specific list element * Returns 1 if successful or -1 on error */ int libfdata_list_get_list_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_list_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( libcdata_array_get_entry_by_index( internal_list->elements_array, element_index, (intptr_t **) element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from elements array.", function, element_index ); return( -1 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Retrieves the data range of 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, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_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_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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, element_file_index, element_offset, element_size, element_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 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Sets the data range 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, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_set_element_by_index"; off64_t previous_element_offset = 0; size64_t mapped_size = 0; size64_t previous_element_size = 0; uint32_t previous_element_flags = 0; int previous_element_file_index = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; #endif 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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %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( libcdata_array_set_entry_by_index( internal_list->elements_array, 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 entry: %d in elements array.", function, element_index ); libfdata_list_element_free( &list_element, NULL ); return( -1 ); } } else { result = libfdata_list_element_get_mapped_size( list_element, &mapped_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size of list element: %d.", function, element_index ); return( -1 ); } else if( result == 0 ) { if( libfdata_list_element_get_data_range( list_element, &previous_element_file_index, &previous_element_offset, &previous_element_size, &previous_element_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_data_range( list_element, element_file_index, element_offset, element_size, element_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 ); } /* Make sure the list has a mapped range entry for every element */ if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, element_index ); return( -1 ); } if( mapped_range == NULL ) { if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in mapped ranges array.", function, element_index ); libfdata_mapped_range_free( &mapped_range, NULL ); return( -1 ); } internal_list->size += element_size; internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; } /* If the size of the element is mapped or if the element size did not change * there is no need to recalculate the mapped range */ else if( ( mapped_size == 0 ) && ( previous_element_size != element_size ) ) { internal_list->size -= previous_element_size; internal_list->size += element_size; internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) == 0 ) { if( libfdata_mapped_range_get( mapped_range, &mapped_range_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, element_index ); return( -1 ); } libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ internal_list->current_element_index = element_index; return( 1 ); } /* Prepends an element data range * Returns 1 if successful or -1 on error */ int libfdata_list_prepend_element( libfdata_list_t *list, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_prepend_element"; off64_t mapped_offset = 0; int element_index = 0; int mapped_range_index = -1; 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( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); goto on_error; } mapped_offset = internal_list->mapped_offset + (off64_t) internal_list->size; if( libfdata_mapped_range_set( mapped_range, mapped_offset, element_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range values.", function ); goto on_error; } if( libcdata_array_append_entry( internal_list->mapped_ranges_array, &mapped_range_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append mapped range to array.", function ); goto on_error; } 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, element_file_index, element_offset, element_size, element_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( libcdata_array_prepend_entry( internal_list->elements_array, (intptr_t *) list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend list element to elements array.", function ); goto on_error; } mapped_range_index = -1; mapped_range = NULL; if( libcdata_array_get_number_of_entries( internal_list->elements_array, &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 elements array.", function ); goto on_error; } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); list_element = NULL; 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: %d index.", function, element_index ); list_element = NULL; goto on_error; } } internal_list->current_element_index = 0; internal_list->size += element_size; internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); on_error: if( list_element != NULL ) { libfdata_list_element_free( &list_element, NULL ); } if( mapped_range_index != -1 ) { libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, mapped_range_index, NULL, NULL ); } if( mapped_range != NULL ) { libfdata_mapped_range_free( &mapped_range, NULL ); } return( -1 ); } /* Appends an element data range * Returns 1 if successful or -1 on error */ int libfdata_list_append_element( libfdata_list_t *list, int *element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_append_element"; off64_t mapped_offset = 0; int mapped_range_index = -1; 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( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); goto on_error; } mapped_offset = internal_list->mapped_offset + (off64_t) internal_list->size; if( libfdata_mapped_range_set( mapped_range, mapped_offset, element_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range values.", function ); goto on_error; } if( libcdata_array_append_entry( internal_list->mapped_ranges_array, &mapped_range_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append mapped range to array.", function ); goto on_error; } 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, element_file_index, element_offset, element_size, element_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( libcdata_array_append_entry( internal_list->elements_array, 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; } mapped_range_index = -1; mapped_range = NULL; 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; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + element_size, mapped_offset, mapped_offset + element_size, element_size ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ internal_list->current_element_index = *element_index; internal_list->size += element_size; return( 1 ); on_error: if( list_element != NULL ) { libfdata_list_element_free( &list_element, NULL ); } if( mapped_range_index != -1 ) { libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, mapped_range_index, NULL, NULL ); } if( mapped_range != NULL ) { libfdata_mapped_range_free( &mapped_range, NULL ); } return( -1 ); } /* Appends the element of the source list to the list * The source list is emptied if successful * Returns 1 if successful or -1 on error */ int libfdata_list_append_list( libfdata_list_t *list, libfdata_list_t *source_list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_internal_list_t *internal_source_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_append_list"; off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; int element_index = 0; int new_number_of_elements = 0; int number_of_elements = 0; int result = 1; int source_element_index = 0; int source_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( 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( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_list_calculate_mapped_ranges( internal_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); goto on_error; } } if( ( internal_source_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_list_calculate_mapped_ranges( internal_source_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges of source list.", function ); goto on_error; } } if( ( internal_list->mapped_offset != 0 ) || ( internal_source_list->mapped_offset != 0 ) ) { if( ( (size64_t) internal_list->mapped_offset + internal_list->size ) != (size64_t) internal_source_list->mapped_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid source mapped offset value out of bounds.", function ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: appending source list with mapped offset: %" PRIi64 " (0x%08" PRIx64 ") and size: %" PRIu64 " to list with mapped offset: %" PRIi64 " (0x%08" PRIx64 ") and size: %" PRIu64 "\n", function, internal_source_list->mapped_offset, internal_source_list->mapped_offset, internal_source_list->size, internal_list->mapped_offset, internal_list->mapped_offset, internal_list->size ); } #endif if( libcdata_array_get_number_of_entries( internal_list->elements_array, &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 ); goto on_error; } if( libcdata_array_get_number_of_entries( internal_source_list->elements_array, &source_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 source list elements array.", function ); goto on_error; } element_index = number_of_elements; new_number_of_elements = number_of_elements + source_number_of_elements; if( libcdata_array_resize( internal_list->elements_array, new_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 ); goto on_error; } if( libcdata_array_resize( internal_list->mapped_ranges_array, new_number_of_elements, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize mapped ranges array.", function ); goto on_error; } for( source_element_index = 0; source_element_index < source_number_of_elements; source_element_index++ ) { if( libcdata_array_get_entry_by_index( internal_source_list->elements_array, source_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 entry: %d from source list elements array.", function, source_element_index ); goto on_error; } if( libcdata_array_set_entry_by_index( internal_list->elements_array, 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 entry: %d in elements array.", function, element_index ); goto on_error; } if( libcdata_array_get_entry_by_index( internal_source_list->mapped_ranges_array, source_element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from source list mapped ranges array.", function, source_element_index ); goto on_error; } if( libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in mapped ranges array.", function, element_index ); goto on_error; } element_index++; } element_index = number_of_elements; number_of_elements = new_number_of_elements; new_number_of_elements = 0; if( libcdata_array_empty( internal_source_list->elements_array, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to empty source list elements array.", function ); result = -1; } if( libcdata_array_empty( internal_source_list->mapped_ranges_array, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to empty source list mapped ranges array.", function ); result = -1; } internal_source_list->size = 0; while( element_index < number_of_elements ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); goto on_error; } ( (libfdata_internal_list_element_t *) list_element )->list = list; ( (libfdata_internal_list_element_t *) list_element )->element_index = element_index; if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, element_index ); goto on_error; } if( libfdata_mapped_range_get( mapped_range, &mapped_range_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, element_index ); goto on_error; } if( libfdata_mapped_range_set( mapped_range, internal_list->size, mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set values of mapped range: %d.", function, element_index ); goto on_error; } internal_list->size += mapped_range_size; element_index++; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); on_error: if( new_number_of_elements != 0 ) { libcdata_array_resize( internal_list->mapped_ranges_array, number_of_elements, NULL, NULL ); libcdata_array_resize( internal_list->elements_array, number_of_elements, NULL, 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 *list_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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( list_element == NULL ) { return( 0 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Mapped range functions */ /* Retrieves the mapped range of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_mapped_range( libfdata_list_t *list, int element_index, off64_t *mapped_range_offset, size64_t *mapped_range_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_get_element_mapped_range"; 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->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_list_calculate_mapped_ranges( internal_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } } if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, element_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, mapped_range_offset, mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Retrieves the mapped offset * Returns 1 if successful, 0 if not set or -1 on error */ int libfdata_list_get_mapped_offset( libfdata_list_t *list, off64_t *mapped_offset, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_mapped_offset"; 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( mapped_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped offset.", function ); return( -1 ); } if( ( internal_list->flags & LIBFDATA_LIST_FLAG_HAS_MAPPED_OFFSET ) == 0 ) { return( 0 ); } *mapped_offset = internal_list->mapped_offset; return( 1 ); } /* Sets the mapped offset * Returns 1 if successful or -1 on error */ int libfdata_list_set_mapped_offset( libfdata_list_t *list, off64_t mapped_offset, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_set_mapped_offset"; 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( mapped_offset < 0 ) { 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mapped offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, mapped_offset, mapped_offset ); libcnotify_printf( "\n" ); } #endif internal_list->mapped_offset = mapped_offset; internal_list->flags |= LIBFDATA_LIST_FLAG_HAS_MAPPED_OFFSET | LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Retrieves the mapped size of a specific element * Returns 1 if successful, 0 if not set or -1 on error */ int libfdata_list_get_mapped_size_by_index( libfdata_list_t *list, int element_index, size64_t *mapped_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_mapped_size_by_index"; 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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } result = libfdata_list_element_get_mapped_size( list_element, mapped_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size of element: %d.", function, element_index ); return( -1 ); } internal_list->current_element_index = element_index; return( result ); } /* Sets the mapped size of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_set_mapped_size_by_index( libfdata_list_t *list, int element_index, size64_t mapped_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_set_mapped_size_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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_set_mapped_size( list_element, mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped size of element: %d.", function, element_index ); return( -1 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Retrieves the data range with its mapped size of a specific element * Returns 1 if successful, 0 if the element has no mapped size or -1 on error */ int libfdata_list_get_element_by_index_with_mapped_size( libfdata_list_t *list, int element_index, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, size64_t *mapped_size, 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_by_index_with_mapped_size"; 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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, element_file_index, element_offset, element_size, element_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 ); } result = libfdata_list_element_get_mapped_size( list_element, mapped_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size of list element: %d.", function, element_index ); return( -1 ); } internal_list->current_element_index = element_index; return( result ); } /* Sets the data range of a specific element with its mapped size * Returns 1 if successful or -1 on error */ int libfdata_list_set_element_by_index_with_mapped_size( libfdata_list_t *list, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, size64_t mapped_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_set_element_by_index_with_mapped_size"; off64_t previous_element_offset = 0; size64_t previous_element_size = 0; size64_t previous_mapped_size = 0; uint32_t previous_element_flags = 0; int previous_element_file_index = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) off64_t mapped_range_offset = 0; size64_t mapped_range_size = 0; #endif 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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %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( libcdata_array_set_entry_by_index( internal_list->elements_array, 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 entry: %d in elements array.", function, element_index ); libfdata_list_element_free( &list_element, NULL ); return( -1 ); } } else { result = libfdata_list_element_get_mapped_size( list_element, &previous_mapped_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size of list element: %d.", function, element_index ); return( -1 ); } else if( result == 0 ) { if( libfdata_list_element_get_data_range( list_element, &previous_element_file_index, &previous_element_offset, &previous_element_size, &previous_element_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_data_range( list_element, element_file_index, element_offset, element_size, element_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 ); } if( libfdata_list_element_set_mapped_size( list_element, mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped size of list element.", function ); return( -1 ); } /* Make sure the list has a mapped range entry for every element */ if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, element_index ); return( -1 ); } if( mapped_range == NULL ) { if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in mapped ranges array.", function, element_index ); libfdata_mapped_range_free( &mapped_range, NULL ); return( -1 ); } internal_list->size += mapped_size; internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; } else if( previous_mapped_size != mapped_size ) { if( previous_mapped_size != 0 ) { internal_list->size -= previous_mapped_size; } else { internal_list->size -= previous_element_size; } if( mapped_size != 0 ) { internal_list->size += mapped_size; } else { internal_list->size += element_size; } internal_list->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) == 0 ) { if( libfdata_mapped_range_get( mapped_range, &mapped_range_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, element_index ); return( -1 ); } libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_offset, mapped_range_offset + mapped_range_size, mapped_range_size ); } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ internal_list->current_element_index = element_index; return( 1 ); } /* Appends an element data range with its mapped size * Returns 1 if successful or -1 on error */ int libfdata_list_append_element_with_mapped_size( libfdata_list_t *list, int *element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, size64_t mapped_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_append_element_with_mapped_size"; off64_t mapped_offset = 0; int mapped_range_index = -1; uint8_t list_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( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); goto on_error; } mapped_offset = internal_list->mapped_offset + (off64_t) internal_list->size; if( libfdata_mapped_range_set( mapped_range, mapped_offset, mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range values.", function ); goto on_error; } if( libcdata_array_append_entry( internal_list->mapped_ranges_array, &mapped_range_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append mapped range to array.", function ); goto on_error; } 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, element_file_index, element_offset, element_size, element_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; } list_flags = internal_list->flags; if( libfdata_list_element_set_mapped_size( list_element, mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped size of list element.", function ); goto on_error; } /* Setting the mapped size in the list element will set the calculate mapped ranges flag in the list * Reset the flag if it was not set before setting the mapped size in the list element */ if( ( list_flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) == 0 ) { internal_list->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } if( libcdata_array_append_entry( internal_list->elements_array, 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; } mapped_range_index = -1; mapped_range = NULL; 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; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, *element_index, mapped_offset, mapped_offset + mapped_size, mapped_offset, mapped_offset + mapped_size, mapped_size ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ internal_list->current_element_index = *element_index; internal_list->size += mapped_size; return( 1 ); on_error: if( list_element != NULL ) { libfdata_list_element_free( &list_element, NULL ); } if( mapped_range_index != -1 ) { libcdata_array_set_entry_by_index( internal_list->mapped_ranges_array, mapped_range_index, NULL, NULL ); } if( mapped_range != NULL ) { libfdata_mapped_range_free( &mapped_range, NULL ); } return( -1 ); } /* Calculates the mapped ranges * Returns 1 if successful or -1 on error */ int libfdata_list_calculate_mapped_ranges( libfdata_internal_list_t *internal_list, libcerror_error_t **error ) { libfdata_list_element_t *list_element = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_calculate_mapped_ranges"; off64_t mapped_offset = 0; off64_t element_offset = 0; size64_t element_size = 0; size64_t mapped_size = 0; uint32_t element_flags = 0; int element_file_index = -1; int element_index = -1; int number_of_elements = 0; int result = 0; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( internal_list->elements_array, &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 ); } mapped_offset = internal_list->mapped_offset; for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &element_file_index, &element_offset, &element_size, &element_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 ); } result = libfdata_list_element_get_mapped_size( list_element, &mapped_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve mapped size of list element: %d.", function, element_index ); return( -1 ); } else if( result == 0 ) { mapped_size = element_size; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, element_index, mapped_offset, mapped_offset + mapped_size, mapped_offset, mapped_offset + mapped_size, mapped_size ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libfdata_mapped_range_set( mapped_range, mapped_offset, mapped_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range: %d values.", function, element_index ); return( -1 ); } mapped_offset += (off64_t) mapped_size; } internal_list->size = (size64_t) mapped_offset - internal_list->mapped_offset; internal_list->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Retrieves the element index for a specific offset * The element_data_offset value is set to the offset relative to the start of the element * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_list_get_element_index_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_list_get_element_index_at_offset"; off64_t list_offset = 0; off64_t mapped_range_end_offset = 0; off64_t mapped_range_start_offset = 0; size64_t mapped_range_size = 0; int initial_element_index = 0; int number_of_elements = 0; int result = 0; int search_element_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libfdata_list_element_t *element = NULL; off64_t element_offset = 0; size64_t element_size = 0; uint32_t element_flags = 0; int element_file_index = -1; #endif 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( 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( 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_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element data offset.", function ); return( -1 ); } if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_list_calculate_mapped_ranges( internal_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, offset, offset ); } #endif if( internal_list->size == 0 ) { return( 0 ); } if( offset < internal_list->mapped_offset ) { return( 0 ); } list_offset = offset - internal_list->mapped_offset; if( (size64_t) list_offset >= internal_list->size ) { return( 0 ); } if( libcdata_array_get_number_of_entries( internal_list->mapped_ranges_array, &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 mapped ranges array.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of elements: %d\n", function, number_of_elements ); } #endif /* This assumes a fairly even distribution of the sizes of the elements */ initial_element_index = (int) ( ( number_of_elements * list_offset ) / internal_list->size ); /* Look for the corresponding element upwards in the array */ for( search_element_index = initial_element_index; search_element_index < number_of_elements; search_element_index++ ) { if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, search_element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, search_element_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, search_element_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element: %d - mapped range value out of bounds.", function, search_element_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the offset is in the mapped range */ if( ( offset >= mapped_range_start_offset ) && ( offset < mapped_range_end_offset ) ) { offset -= mapped_range_start_offset; break; } /* Check if the offset is out of bounds */ if( offset < mapped_range_start_offset ) { search_element_index = number_of_elements; break; } } if( search_element_index >= number_of_elements ) { /* Look for the corresponding element downwards in the array */ for( search_element_index = initial_element_index; search_element_index >= 0; search_element_index-- ) { if( libcdata_array_get_entry_by_index( internal_list->mapped_ranges_array, search_element_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, search_element_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, search_element_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element: %d - mapped range value out of bounds.", function, search_element_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the offset is in the mapped range */ if( ( offset >= mapped_range_start_offset ) && ( offset < mapped_range_end_offset ) ) { offset -= mapped_range_start_offset; break; } /* Check if the offset is out of bounds */ if( offset > mapped_range_start_offset ) { search_element_index--; break; } } } if( ( search_element_index >= 0 ) && ( search_element_index < number_of_elements ) ) { 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 ); } *element_data_offset = offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, search_element_index, (intptr_t **) &element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from elements array.", function, search_element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( element, &element_file_index, &element_offset, &element_size, &element_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, search_element_index ); return( -1 ); } libcnotify_printf( "%s: element: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_element_index, element_file_index, element_offset, element_offset + element_size, element_offset, element_offset + element_size, element_size ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ internal_list->current_element_index = search_element_index; result = 1; } if( result == 1 ) { *element_index = search_element_index; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } /* Retrieves the list element for a specific offset * The element_data_offset value is set to the offset relative to the start of the element * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_list_get_list_element_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, libfdata_list_element_t **element, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_list_element_at_offset"; 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( 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( 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 ); } result = libfdata_list_get_element_index_at_offset( list, offset, element_index, element_data_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } else if( result != 0 ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, *element_index, (intptr_t **) element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from elements array.", function, *element_index ); return( -1 ); } } return( result ); } /* Retrieves the data range of an element at a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_list_get_element_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_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_at_offset"; 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( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } result = libfdata_list_get_element_index_at_offset( list, offset, element_index, element_data_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } else if( result != 0 ) { if( libcdata_array_get_entry_by_index( internal_list->elements_array, *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 entry: %d from elements array.", function, *element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, element_file_index, element_offset, element_size, element_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 ); } } return( result ); } /* List element value functions */ /* Caches the element value * Returns 1 if successful or -1 on error */ int libfdata_list_cache_element_value( libfdata_list_t *list, libfdata_cache_t *cache, int element_index LIBFDATA_ATTRIBUTE_UNUSED, int element_file_index, off64_t element_data_offset, size64_t element_data_size LIBFDATA_ATTRIBUTE_UNUSED, uint32_t element_data_flags LIBFDATA_ATTRIBUTE_UNUSED, int64_t element_timestamp, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { static char *function = "libfdata_list_cache_element_value"; LIBFDATA_UNREFERENCED_PARAMETER( element_index ) LIBFDATA_UNREFERENCED_PARAMETER( element_data_size ) LIBFDATA_UNREFERENCED_PARAMETER( element_data_flags ) if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( libfcache_cache_set_value_by_identifier( (libfcache_cache_t *) cache, element_file_index, element_data_offset, element_timestamp, element_value, free_element_value, write_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache.", function ); return( -1 ); } return( 1 ); } /* Retrieves the element value * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_value( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_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"; size64_t element_data_size = 0; off64_t cache_value_offset = (off64_t) -1; off64_t element_data_offset = 0; int64_t cache_value_timestamp = 0; int64_t element_timestamp = 0; uint32_t element_data_flags = 0; int cache_value_file_index = -1; int element_file_index = -1; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) const char *hit_or_miss = NULL; #endif 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->read_element_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list - missing read element data function.", function ); return( -1 ); } if( libfdata_list_element_get_data_range( element, &element_file_index, &element_data_offset, &element_data_size, &element_data_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( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { result = libfcache_cache_get_value_by_identifier( (libfcache_cache_t *) cache, element_file_index, element_data_offset, element_timestamp, &cache_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from cache.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { hit_or_miss = "miss"; } else { hit_or_miss = "hit"; } libcnotify_printf( "%s: cache: 0x%08" PRIjx " %s\n", function, (intptr_t) cache, hit_or_miss ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ } 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, element_data_size ); } #endif if( internal_list->read_element_data( internal_list->data_handle, file_io_handle, element, cache, element_file_index, element_data_offset, element_data_size, element_data_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 " (0x%08" PRIx64 ").", function, element_data_offset, element_data_offset ); return( -1 ); } if( libfcache_cache_get_value_by_identifier( (libfcache_cache_t *) cache, element_file_index, element_data_offset, element_timestamp, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from cache.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_file_index, &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_file_index != cache_value_file_index ) || ( element_data_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, intptr_t *file_io_handle, libfdata_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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %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 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Retrieves the value an element at a specific offset * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_list_get_element_value_at_offset( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, int *element_index, off64_t *element_data_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_value_at_offset"; int result = 0; if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } result = libfdata_list_get_list_element_at_offset( list, offset, element_index, element_data_offset, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } else if( result != 0 ) { 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: %d value.", function, *element_index ); return( -1 ); } } return( result ); } /* 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, intptr_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfdata_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 write_flags, libcerror_error_t **error ) { static char *function = "libfdata_list_set_element_value"; size64_t element_data_size = 0; off64_t element_data_offset = 0; int64_t element_timestamp = 0; uint32_t element_data_flags = 0; int element_file_index = -1; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) 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, &element_file_index, &element_data_offset, &element_data_size, &element_data_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_set_value_by_identifier( (libfcache_cache_t *) cache, element_file_index, element_data_offset, element_timestamp, element_value, free_element_value, write_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache.", function ); 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, intptr_t *file_io_handle, libfdata_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_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( libcdata_array_get_entry_by_index( internal_list->elements_array, 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 entry: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_set_element_value( list, file_io_handle, cache, list_element, element_value, free_element_value, write_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 ); } internal_list->current_element_index = element_index; return( 1 ); } /* Sets the value of an element at a specific offset * * 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, 0 if not or -1 on error */ int libfdata_list_set_element_value_at_offset( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ) { libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_set_element_value_at_offset"; off64_t element_data_offset = 0; int element_index = 0; int result = 0; result = libfdata_list_get_list_element_at_offset( list, offset, &element_index, &element_data_offset, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } else if( result != 0 ) { if( libfdata_list_set_element_value( list, file_io_handle, cache, list_element, element_value, free_element_value, write_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value of element: %d.", function, element_index ); return( -1 ); } } return( result ); } /* Retrieves the size of the list * Returns 1 if successful or -1 on error */ int libfdata_list_get_size( libfdata_list_t *list, size64_t *size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_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( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( internal_list->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_list_calculate_mapped_ranges( internal_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } } *size = internal_list->size; return( 1 ); } libesedb-20240420/libfdata/libfdata_libcdata.h0000644000175000017500000000301414610746235021676 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_LIBCDATA_H ) #define _LIBFDATA_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBFDATA_LIBCDATA_H ) */ libesedb-20240420/libfdata/libfdata_list.h0000644000175000017500000002747214610746235021124 0ustar00lordyestalordyesta/* * The list functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_H ) #define _LIBFDATA_INTERNAL_LIST_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.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 current (most recently used) element index */ int current_element_index; /* The mapped offset */ off64_t mapped_offset; /* The (list) size */ size64_t size; /* The (list) elements array */ libcdata_array_t *elements_array; /* The mapped ranges array */ libcdata_array_t *mapped_ranges_array; /* The flags */ uint8_t flags; /* 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 read element data function */ int (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ); /* The write element data function */ int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_list_initialize( libfdata_list_t **list, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_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_set_calculate_mapped_ranges_flag( libfdata_list_t *list, libcerror_error_t **error ); /* List elements functions */ LIBFDATA_EXTERN \ int libfdata_list_empty( libfdata_list_t *list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_resize( libfdata_list_t *list, int number_of_elements, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_reverse( libfdata_list_t *list, 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 ); LIBFDATA_EXTERN \ int libfdata_list_get_list_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_index( libfdata_list_t *list, int element_index, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_by_index( libfdata_list_t *list, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_prepend_element( libfdata_list_t *list, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_append_element( libfdata_list_t *list, int *element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_append_list( libfdata_list_t *list, libfdata_list_t *source_list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_is_element_set( libfdata_list_t *list, int element_index, libcerror_error_t **error ); /* Mapped range functions */ LIBFDATA_EXTERN \ int libfdata_list_get_element_mapped_range( libfdata_list_t *list, int element_index, off64_t *mapped_range_offset, size64_t *mapped_range_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_mapped_offset( libfdata_list_t *list, off64_t *mapped_offset, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_mapped_offset( libfdata_list_t *list, off64_t mapped_offset, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_mapped_size_by_index( libfdata_list_t *list, int element_index, size64_t *mapped_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_mapped_size_by_index( libfdata_list_t *list, int element_index, size64_t mapped_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_by_index_with_mapped_size( libfdata_list_t *list, int element_index, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, size64_t *mapped_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_by_index_with_mapped_size( libfdata_list_t *list, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, size64_t mapped_size, libcerror_error_t **error ); /* TODO libfdata_list_prepend_element_with_mapped_size */ LIBFDATA_EXTERN \ int libfdata_list_append_element_with_mapped_size( libfdata_list_t *list, int *element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, size64_t mapped_size, libcerror_error_t **error ); int libfdata_list_calculate_mapped_ranges( libfdata_internal_list_t *internal_list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_index_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_list_element_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, libfdata_list_element_t **element, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_at_offset( libfdata_list_t *list, off64_t offset, int *element_index, off64_t *element_data_offset, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, libcerror_error_t **error ); /* TODO add libfdata_list_set_element_at_offset */ /* List element value functions */ LIBFDATA_EXTERN \ int libfdata_list_cache_element_value( libfdata_list_t *list, libfdata_cache_t *cache, int element_index, int element_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, int64_t element_timestamp, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); int libfdata_list_get_element_value( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_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, intptr_t *file_io_handle, libfdata_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, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, int *element_index, off64_t *element_data_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); int libfdata_list_set_element_value( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_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 write_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_value_by_index( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_value_at_offset( libfdata_list_t *list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); /* IO functions */ LIBFDATA_EXTERN \ int libfdata_list_get_size( libfdata_list_t *list, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_LIST_H ) */ libesedb-20240420/libfdata/libfdata_list_element.h0000644000175000017500000000766114610746235022633 0ustar00lordyestalordyesta/* * The list element functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_ELEMENT_H ) #define _LIBFDATA_INTERNAL_LIST_ELEMENT_H #include #include #include "libfdata_extern.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 (element) mapped size */ size64_t mapped_size; /* The timestamp */ int64_t timestamp; /* 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, libcerror_error_t **error ); LIBFDATA_EXTERN \ 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, int64_t *timestamp, libcerror_error_t **error ); /* Data range functions */ LIBFDATA_EXTERN \ int libfdata_list_element_get_data_range( libfdata_list_element_t *element, int *file_index, 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, int file_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); /* Mapped range functions */ LIBFDATA_EXTERN \ int libfdata_list_element_get_mapped_size( libfdata_list_element_t *element, size64_t *mapped_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_element_set_mapped_size( libfdata_list_element_t *element, size64_t mapped_size, libcerror_error_t **error ); /* Element value functions */ LIBFDATA_EXTERN \ int libfdata_list_element_get_element_value( libfdata_list_element_t *element, intptr_t *file_io_handle, libfdata_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, intptr_t *file_io_handle, libfdata_cache_t *cache, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_LIST_ELEMENT_H ) */ libesedb-20240420/libfdata/Makefile.am0000644000175000017500000000240714610746235020175 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFDATA AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfdata.la libfdata_la_SOURCES = \ libfdata_area.c libfdata_area.h \ libfdata_cache.c libfdata_cache.h \ libfdata_definitions.h \ libfdata_error.c libfdata_error.h \ libfdata_extern.h \ libfdata_libcdata.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_mapped_range.c libfdata_mapped_range.h \ libfdata_notify.c libfdata_notify.h \ libfdata_range.c libfdata_range.h \ libfdata_range_list.c libfdata_range_list.h \ libfdata_segments_array.c libfdata_segments_array.h \ libfdata_stream.c libfdata_stream.h \ libfdata_support.c libfdata_support.h \ libfdata_types.h \ libfdata_unused.h \ libfdata_vector.c libfdata_vector.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) libesedb-20240420/libfdata/libfdata_libcnotify.h0000644000175000017500000000266014610746235022303 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBFDATA_LIBCNOTIFY_H ) */ libesedb-20240420/libfdata/libfdata_extern.h0000644000175000017500000000255514610746235021451 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFDATA_EXTERN_VARIABLE extern #else #define LIBFDATA_EXTERN_VARIABLE LIBFDATA_EXTERN #endif #else #define LIBFDATA_EXTERN /* extern */ #define LIBFDATA_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #endif /* !defined( _LIBFDATA_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfdata/libfdata_notify.c0000644000175000017500000000530214610746235021440 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #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_verbose_set( 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_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 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 /* !defined( HAVE_LOCAL_LIBFDATA ) */ libesedb-20240420/libfdata/libfdata_cache.c0000644000175000017500000000317214610746235021176 0ustar00lordyestalordyesta/* * Cache functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfdata_cache.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Creates a cache * Make sure the value cache is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_cache_initialize( libfdata_cache_t **cache, int maximum_cache_entries, libcerror_error_t **error ) { return( libfcache_cache_initialize( (libfcache_cache_t **) cache, maximum_cache_entries, error ) ); } /* Frees a cache * Returns 1 if successful or -1 on error */ int libfdata_cache_free( libfdata_cache_t **cache, libcerror_error_t **error ) { return( libfcache_cache_free( (libfcache_cache_t **) cache, error ) ); } #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ libesedb-20240420/libfdata/libfdata_stream.c0000644000175000017500000020123314610746235021424 0ustar00lordyestalordyesta/* * The stream functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libfdata_definitions.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_segments_array.h" #include "libfdata_stream.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Creates a stream * Make sure the value stream is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the stream * takes over management of the data handle and the data handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_stream_initialize( libfdata_stream_t **stream, 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 (*create_segment)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ), ssize_t (*read_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t read_flags, libcerror_error_t **error ), ssize_t (*write_segment_data)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, const uint8_t *segment_data, size_t segment_data_size, uint32_t segment_flags, uint8_t write_flags, libcerror_error_t **error ), off64_t (*seek_segment_offset)( intptr_t *data_handle, intptr_t *file_io_handle, int segment_index, int segment_file_index, off64_t segment_offset, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_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 ); } if( ( flags & 0xfe ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function ); return( -1 ); } internal_stream = memory_allocate_structure( libfdata_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( libfdata_internal_stream_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear stream.", function ); memory_free( internal_stream ); return( -1 ); } if( libcdata_array_initialize( &( internal_stream->segments_array ), 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; } if( libcdata_array_initialize( &( internal_stream->mapped_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped ranges array.", function ); goto on_error; } internal_stream->segment_offset = -1; internal_stream->flags |= flags; internal_stream->data_handle = data_handle; internal_stream->free_data_handle = free_data_handle; internal_stream->clone_data_handle = clone_data_handle; internal_stream->create_segment = create_segment; internal_stream->read_segment_data = read_segment_data; internal_stream->write_segment_data = write_segment_data; internal_stream->seek_segment_offset = seek_segment_offset; *stream = (libfdata_stream_t *) internal_stream; return( 1 ); on_error: if( internal_stream != NULL ) { if( internal_stream->segments_array != NULL ) { libcdata_array_free( &( internal_stream->segments_array ), NULL, NULL ); } memory_free( internal_stream ); } return( -1 ); } /* Frees a stream * Returns 1 if successful or -1 on error */ int libfdata_stream_free( libfdata_stream_t **stream, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_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 = (libfdata_internal_stream_t *) *stream; *stream = NULL; if( libcdata_array_free( &( internal_stream->segments_array ), (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( libcdata_array_free( &( internal_stream->mapped_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the mapped ranges array.", function ); result = -1; } if( ( internal_stream->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_stream->data_handle != NULL ) { if( internal_stream->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source stream - missing free data handle function.", function ); result = -1; } else if( internal_stream->free_data_handle( &( internal_stream->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_stream ); } return( result ); } /* Clones (duplicates) the stream * Returns 1 if successful or -1 on error */ int libfdata_stream_clone( libfdata_stream_t **destination_stream, libfdata_stream_t *source_stream, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_destination_stream = NULL; libfdata_internal_stream_t *internal_source_stream = NULL; static char *function = "libfdata_stream_clone"; if( destination_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination stream.", function ); return( -1 ); } if( *destination_stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination stream already set.", function ); return( -1 ); } if( source_stream == NULL ) { *destination_stream = NULL; return( 1 ); } internal_source_stream = (libfdata_internal_stream_t *) source_stream; internal_destination_stream = memory_allocate_structure( libfdata_internal_stream_t ); if( internal_destination_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination stream.", function ); goto on_error; } if( memory_set( internal_destination_stream, 0, sizeof( libfdata_internal_stream_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination stream.", function ); memory_free( internal_destination_stream ); return( -1 ); } if( internal_source_stream->data_handle != NULL ) { if( internal_source_stream->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source stream - missing free data handle function.", function ); goto on_error; } if( internal_source_stream->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source stream - missing clone data handle function.", function ); goto on_error; } if( internal_source_stream->clone_data_handle( &( internal_destination_stream->data_handle ), internal_source_stream->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( libcdata_array_clone( &( internal_destination_stream->segments_array ), internal_source_stream->segments_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination segments array.", function ); goto on_error; } if( libcdata_array_clone( &( internal_destination_stream->mapped_ranges_array ), internal_source_stream->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_mapped_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination mapped ranges array.", function ); goto on_error; } internal_destination_stream->size = internal_source_stream->size; internal_destination_stream->mapped_size = internal_source_stream->mapped_size; internal_destination_stream->flags = internal_source_stream->flags | LIBFDATA_DATA_HANDLE_FLAG_MANAGED; internal_destination_stream->free_data_handle = internal_source_stream->free_data_handle; internal_destination_stream->clone_data_handle = internal_source_stream->clone_data_handle; internal_destination_stream->create_segment = internal_source_stream->create_segment; internal_destination_stream->read_segment_data = internal_source_stream->read_segment_data; internal_destination_stream->write_segment_data = internal_source_stream->write_segment_data; internal_destination_stream->seek_segment_offset = internal_source_stream->seek_segment_offset; *destination_stream = (libfdata_stream_t *) internal_destination_stream; return( 1 ); on_error: if( internal_destination_stream != NULL ) { if( internal_destination_stream->segments_array != NULL ) { libcdata_array_free( &( internal_destination_stream->segments_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, NULL ); } if( ( internal_destination_stream->data_handle != NULL ) && ( internal_source_stream->free_data_handle != NULL ) ) { internal_source_stream->free_data_handle( &( internal_destination_stream->data_handle ), NULL ); } memory_free( internal_destination_stream ); } return( -1 ); } /* Segment functions */ /* Empties the stream * Returns 1 if successful or -1 on error */ int libfdata_stream_empty( libfdata_stream_t *stream, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_empty"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libcdata_array_empty( internal_stream->segments_array, (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 empty segments array.", function ); return( -1 ); } if( libcdata_array_empty( internal_stream->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty mapped ranges array.", function ); return( -1 ); } internal_stream->size = 0; return( 1 ); } /* Resizes the stream * Returns 1 if successful or -1 on error */ int libfdata_stream_resize( libfdata_stream_t *stream, int number_of_segments, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_resize"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libcdata_array_resize( internal_stream->segments_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize segments array.", function ); return( -1 ); } if( libcdata_array_resize( internal_stream->mapped_ranges_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize mapped ranges array.", function ); return( -1 ); } internal_stream->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Reverses the order of the segments * Returns 1 if successful or -1 on error */ int libfdata_stream_reverse( libfdata_stream_t *stream, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_reverse"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libcdata_array_reverse( internal_stream->segments_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to reverse segments array.", function ); return( -1 ); } internal_stream->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Retrieves the number of segments * Returns 1 if successful or -1 on error */ int libfdata_stream_get_number_of_segments( libfdata_stream_t *stream, int *number_of_segments, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_get_number_of_segments"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libcdata_array_get_number_of_entries( internal_stream->segments_array, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libfdata_stream_get_segment_by_index( libfdata_stream_t *stream, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_get_segment_by_index"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libfdata_segments_array_get_segment_by_index( internal_stream->segments_array, segment_index, segment_file_index, 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 a specific segment * Returns 1 if successful or -1 on error */ int libfdata_stream_set_segment_by_index( libfdata_stream_t *stream, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_set_segment_by_index"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libfdata_segments_array_set_segment_by_index( internal_stream->segments_array, internal_stream->mapped_ranges_array, &( internal_stream->size ), segment_index, segment_file_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 segment: %d.", function, segment_index ); return( -1 ); } internal_stream->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Prepends a segment * Returns 1 if successful or -1 on error */ int libfdata_stream_prepend_segment( libfdata_stream_t *stream, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_prepend_segment"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libfdata_segments_array_prepend_segment( internal_stream->segments_array, internal_stream->mapped_ranges_array, &( internal_stream->size ), segment_file_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 prepend segment.", function ); return( -1 ); } internal_stream->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Appends a segment * Returns 1 if successful or -1 on error */ int libfdata_stream_append_segment( libfdata_stream_t *stream, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_append_segment"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libfdata_segments_array_append_segment( internal_stream->segments_array, internal_stream->mapped_ranges_array, &( internal_stream->size ), segment_index, segment_file_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 segment.", function ); return( -1 ); } return( 1 ); } /* Sets the mapped size * The mapped size cannot be larger than the stream size * A value of 0 is equivalent for the stream size * Returns 1 if successful or -1 on error */ int libfdata_stream_set_mapped_size( libfdata_stream_t *stream, size64_t mapped_size, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_set_mapped_size"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( mapped_size > internal_stream->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid mapped size value out of bounds.", function ); return( -1 ); } internal_stream->mapped_size = mapped_size; return( 1 ); } /* Mapped range functions */ /* Retrieves the mapped range of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_stream_get_segment_mapped_range( libfdata_stream_t *stream, int segment_index, off64_t *mapped_range_offset, size64_t *mapped_range_size, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_stream_get_segment_mapped_range"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( libcdata_array_get_entry_by_index( internal_stream->mapped_ranges_array, segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, segment_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, mapped_range_offset, mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, segment_index ); return( -1 ); } return( 1 ); } /* Retrieves the segment index for a specific offset * The segment_data_offset value is set to the offset relative to the start of the segment * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_stream_get_segment_index_at_offset( libfdata_stream_t *stream, off64_t offset, int *segment_index, off64_t *segment_data_offset, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_stream_get_segment_index_at_offset"; off64_t mapped_range_end_offset = 0; off64_t mapped_range_start_offset = 0; size64_t mapped_range_size = 0; size64_t stream_size = 0; int initial_segment_index = 0; int number_of_segments = 0; int result = 0; int search_segment_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libfdata_range_t *segment_data_range = NULL; off64_t segment_offset = 0; size64_t segment_size = 0; uint32_t segment_flags = 0; int segment_file_index = -1; #endif if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; 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( segment_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid segment index.", function ); return( -1 ); } if( segment_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid segment data offset.", function ); return( -1 ); } if( ( internal_stream->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_segments_array_calculate_mapped_ranges( internal_stream->segments_array, internal_stream->mapped_ranges_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } internal_stream->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, offset, offset ); } #endif if( internal_stream->mapped_size != 0 ) { stream_size = internal_stream->mapped_size; } else { stream_size = internal_stream->size; } if( stream_size == 0 ) { return( 0 ); } if( libcdata_array_get_number_of_entries( internal_stream->mapped_ranges_array, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from mapped ranges array.", function ); return( -1 ); } /* This assumes a fairly even distribution of the sizes of the segments */ initial_segment_index = (int) ( ( number_of_segments * offset ) / stream_size ); /* Look for the corresponding segment upwards in the array */ for( search_segment_index = initial_segment_index; search_segment_index < number_of_segments; search_segment_index++ ) { if( libcdata_array_get_entry_by_index( internal_stream->mapped_ranges_array, search_segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, search_segment_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, search_segment_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment: %d - mapped range value out of bounds.", function, search_segment_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_segment_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the offset is in the mapped range */ if( ( offset >= mapped_range_start_offset ) && ( offset < mapped_range_end_offset ) ) { offset -= mapped_range_start_offset; break; } /* Check if the offset is out of bounds */ if( offset < mapped_range_start_offset ) { search_segment_index = number_of_segments; break; } } if( search_segment_index >= number_of_segments ) { /* Look for the corresponding segment downwards in the array */ for( search_segment_index = initial_segment_index; search_segment_index >= 0; search_segment_index-- ) { if( libcdata_array_get_entry_by_index( internal_stream->mapped_ranges_array, search_segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, search_segment_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, search_segment_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment: %d - mapped range value out of bounds.", function, search_segment_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, search_segment_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the offset is in the mapped range */ if( ( offset >= mapped_range_start_offset ) && ( offset < mapped_range_end_offset ) ) { offset -= mapped_range_start_offset; break; } /* Check if the offset is out of bounds */ if( offset > mapped_range_start_offset ) { search_segment_index--; break; } } } if( ( search_segment_index >= 0 ) && ( search_segment_index < number_of_segments ) ) { 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 ); } *segment_data_offset = offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, search_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 entry: %d from segments array.", function, search_segment_index ); return( -1 ); } if( libfdata_range_get( segment_data_range, &segment_file_index, &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 data range values.", function, search_segment_index ); return( -1 ); } libcnotify_printf( "%s: segment: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, search_segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_offset, segment_offset + segment_size, segment_size ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ result = 1; } if( result == 1 ) { *segment_index = search_segment_index; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } /* Retrieves the segment for a specific offset * The segment_data_offset value is set to the offset relative to the start of the segment * Returns 1 if successful, 0 if not or -1 on error */ int libfdata_stream_get_segment_at_offset( libfdata_stream_t *stream, off64_t offset, int *segment_index, off64_t *segment_data_offset, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_stream_get_segment_at_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 = (libfdata_internal_stream_t *) stream; if( segment_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid segment index.", function ); return( -1 ); } result = libfdata_stream_get_segment_index_at_offset( stream, offset, segment_index, segment_data_offset, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } else if( result != 0 ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, *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 entry: %d from segments array.", function, *segment_index ); return( -1 ); } if( libfdata_range_get( segment_data_range, segment_file_index, 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 data range values.", function, *segment_index ); return( -1 ); } } return( result ); } /* IO functions */ /* Reads data from the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_stream_read_buffer( libfdata_stream_t *stream, intptr_t *file_io_handle, uint8_t *buffer, size_t buffer_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_read_buffer"; off64_t result_offset = 0; off64_t segment_offset = 0; size64_t segment_size = 0; size64_t segment_data_size = 0; size64_t stream_size = 0; size_t buffer_offset = 0; size_t read_size = 0; ssize_t read_count = 0; uint32_t segment_flags = 0; int segment_file_index = 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 = (libfdata_internal_stream_t *) stream; if( internal_stream->read_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing read segment data function.", function ); return( -1 ); } if( internal_stream->seek_segment_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing seek segment offset function.", 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 ); } if( internal_stream->current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - current offset value out of bounds.", function ); return( -1 ); } if( internal_stream->mapped_size != 0 ) { stream_size = internal_stream->mapped_size; } else { stream_size = internal_stream->size; } /* Bail out early for requests to read empty buffers and beyond the end of the stream */ if( (size64_t) internal_stream->current_offset >= stream_size ) { buffer_size = 0; } else if( (size64_t) buffer_size > ( stream_size - internal_stream->current_offset ) ) { buffer_size = (size_t) ( stream_size - internal_stream->current_offset ); } if( buffer_size == 0 ) { return( 0 ); } if( internal_stream->current_segment_data_range == NULL ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from segments array.", function, internal_stream->current_segment_index ); return( -1 ); } } if( libfdata_range_get( internal_stream->current_segment_data_range, &segment_file_index, &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 data range values.", function, internal_stream->current_segment_index ); return( -1 ); } if( ( internal_stream->segment_data_offset < 0 ) || ( segment_offset > ( INT64_MAX - internal_stream->segment_data_offset ) ) || ( (size64_t) internal_stream->segment_data_offset >= segment_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - segment data offset value out of bounds.", function ); return( -1 ); } segment_offset += internal_stream->segment_data_offset; segment_data_size = segment_size - internal_stream->segment_data_offset; /* Make sure the file IO handle is pointing to the correct offset */ result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, segment_offset, error ); if( result_offset != segment_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset, segment_offset ); return( -1 ); } internal_stream->segment_offset = segment_offset; while( buffer_size > 0 ) { if( (size64_t) buffer_size <= segment_data_size ) { read_size = buffer_size; } else { read_size = (size_t) segment_data_size; } if( read_size == 0 ) { break; } read_count = internal_stream->read_segment_data( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, &( buffer[ buffer_offset ]), read_size, segment_flags, read_flags, 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 segment: %d data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset, segment_offset ); return( -1 ); } internal_stream->current_offset += read_size; internal_stream->segment_offset += read_size; internal_stream->segment_data_offset += read_size; segment_offset += read_size; segment_data_size -= read_size; buffer_size -= read_size; buffer_offset += read_size; if( (size64_t) internal_stream->current_offset >= stream_size ) { break; } if( (size64_t) internal_stream->segment_data_offset >= segment_size ) { if( (size64_t) internal_stream->segment_data_offset > segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - segment data offset value out of bounds.", function ); return( -1 ); } internal_stream->current_segment_index++; internal_stream->current_segment_data_range = NULL; internal_stream->segment_data_offset = 0; if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from segments array.", function, internal_stream->current_segment_index ); return( -1 ); } if( libfdata_range_get( internal_stream->current_segment_data_range, &segment_file_index, &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 data range values.", function, internal_stream->current_segment_index ); return( -1 ); } segment_data_size = segment_size; result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, segment_offset, error ); if( result_offset != segment_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset, segment_offset ); return( -1 ); } internal_stream->segment_offset = segment_offset; } } return( (ssize_t) buffer_offset ); } /* Reads data at a specific offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_stream_read_buffer_at_offset( libfdata_stream_t *stream, intptr_t *file_io_handle, uint8_t *buffer, size_t buffer_size, off64_t offset, uint8_t read_flags, libcerror_error_t **error ) { static char *function = "libfdata_stream_read_buffer_at_offset"; ssize_t read_count = 0; if( libfdata_stream_seek_offset( stream, 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 ); } read_count = libfdata_stream_read_buffer( stream, file_io_handle, buffer, buffer_size, read_flags, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer.", function ); return( -1 ); } return( read_count ); } /* Writes data in the buffer to the current offset * Returns the number of bytes written or -1 on error */ ssize_t libfdata_stream_write_buffer( libfdata_stream_t *stream, intptr_t *file_io_handle, const uint8_t *buffer, size_t buffer_size, uint8_t write_flags, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_write_buffer"; off64_t result_offset = 0; off64_t segment_offset = 0; size64_t segment_size = 0; size64_t segment_data_size = 0; size_t buffer_offset = 0; size_t write_size = 0; ssize_t write_count = 0; uint32_t segment_flags = 0; int number_of_segments = 0; int result = 0; int segment_file_index = 0; int segment_index = 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 = (libfdata_internal_stream_t *) stream; if( internal_stream->create_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing create segment function.", function ); return( -1 ); } if( internal_stream->write_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing write segment data function.", function ); return( -1 ); } if( internal_stream->seek_segment_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing seek segment offset function.", 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 ); } if( internal_stream->current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - current offset value out of bounds.", function ); return( -1 ); } /* Bail out early for requests to write empty buffers */ if( buffer_size == 0 ) { return( 0 ); } if( libcdata_array_get_number_of_entries( internal_stream->segments_array, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } if( (size64_t) internal_stream->current_offset < internal_stream->size ) { if( internal_stream->current_segment_data_range == NULL ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from segments array.", function, internal_stream->current_segment_index ); return( -1 ); } } if( libfdata_range_get( internal_stream->current_segment_data_range, &segment_file_index, &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 data range values.", function, internal_stream->current_segment_index ); return( -1 ); } if( ( internal_stream->segment_data_offset < 0 ) || ( (size64_t) internal_stream->segment_data_offset >= segment_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - segment data offset value out of bounds.", function ); return( -1 ); } segment_offset += internal_stream->segment_data_offset; segment_data_size = segment_size - internal_stream->segment_data_offset; } else while( (size64_t) internal_stream->current_offset >= internal_stream->size ) { if( internal_stream->current_segment_index < number_of_segments ) { internal_stream->current_segment_index++; internal_stream->current_segment_data_range = NULL; } internal_stream->segment_data_offset = 0; result = internal_stream->create_segment( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, &segment_file_index, &segment_offset, &segment_size, &segment_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create segment: %d.", function, internal_stream->current_segment_index ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( libfdata_stream_append_segment( stream, &segment_index, segment_file_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 segment to stream.", function ); return( -1 ); } if( internal_stream->current_segment_index != segment_index ) { 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 ); } number_of_segments++; segment_data_size = segment_size; } /* Make sure the file IO handle is pointing to the correct offset */ result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, segment_offset, error ); if( result_offset != segment_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset, segment_offset ); return( -1 ); } internal_stream->segment_offset = segment_offset; while( buffer_size > 0 ) { if( (size64_t) buffer_size <= segment_data_size ) { write_size = buffer_size; } else { write_size = (size_t) segment_data_size; } if( write_size == 0 ) { break; } write_count = internal_stream->write_segment_data( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, &( buffer[ buffer_offset ] ), write_size, segment_flags, write_flags, error ); if( write_count != (ssize_t) write_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write segment: %d data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset + internal_stream->segment_data_offset, segment_offset + internal_stream->segment_data_offset ); return( -1 ); } internal_stream->current_offset += write_size; internal_stream->segment_offset += write_size; internal_stream->segment_data_offset += write_size; segment_offset += write_size; segment_data_size -= write_size; buffer_size -= write_size; buffer_offset += write_size; if( (size64_t) internal_stream->segment_data_offset >= segment_size ) { if( (size64_t) internal_stream->segment_data_offset > segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - segment data offset value out of bounds.", function ); return( -1 ); } internal_stream->current_segment_index++; internal_stream->current_segment_data_range = NULL; internal_stream->segment_data_offset = 0; if( internal_stream->current_segment_index < number_of_segments ) { if( libcdata_array_get_entry_by_index( internal_stream->segments_array, internal_stream->current_segment_index, (intptr_t **) &( internal_stream->current_segment_data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from segments array.", function, internal_stream->current_segment_index ); return( -1 ); } if( libfdata_range_get( internal_stream->current_segment_data_range, &segment_file_index, &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 data range values.", function, internal_stream->current_segment_index ); return( -1 ); } } else { result = internal_stream->create_segment( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, &segment_file_index, &segment_offset, &segment_size, &segment_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create segment: %d.", function, internal_stream->current_segment_index ); return( -1 ); } else if( result == 0 ) { break; } if( libfdata_stream_append_segment( stream, &segment_index, segment_file_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 segment to stream.", function ); return( -1 ); } if( internal_stream->current_segment_index != segment_index ) { 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 ); } number_of_segments++; } segment_data_size = segment_size; result_offset = internal_stream->seek_segment_offset( internal_stream->data_handle, file_io_handle, internal_stream->current_segment_index, segment_file_index, segment_offset, error ); if( result_offset != segment_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek segment: %d offset: %" PRIi64 " (0x%08" PRIx64 ").", function, internal_stream->current_segment_index, segment_offset, segment_offset ); return( -1 ); } internal_stream->segment_offset = segment_offset; } } return( (ssize_t) buffer_offset ); } /* Seeks a certain offset of the data * Returns the offset if seek is successful or -1 on error */ off64_t libfdata_stream_seek_offset( libfdata_stream_t *stream, off64_t offset, int whence, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_seek_offset"; off64_t segment_data_offset = 0; size64_t stream_size = 0; int segment_index = 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 = (libfdata_internal_stream_t *) stream; if( internal_stream->current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid stream - current 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( internal_stream->mapped_size != 0 ) { stream_size = internal_stream->mapped_size; } else { stream_size = internal_stream->size; } if( whence == SEEK_CUR ) { offset += internal_stream->current_offset; } else if( whence == SEEK_END ) { offset += (off64_t) stream_size; } #if defined( HAVE_VERBOSE_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: seeking offset: %" PRIi64 " (0x%08" PRIx64 ").\n", function, offset, offset ); } #endif if( internal_stream->current_offset != offset ) { 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) stream_size ) { if( libfdata_stream_get_segment_index_at_offset( stream, 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 segment index at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } } else { if( libcdata_array_get_number_of_entries( internal_stream->segments_array, &segment_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } segment_data_offset = 0; } internal_stream->current_segment_index = segment_index; internal_stream->current_segment_data_range = NULL; internal_stream->current_offset = offset; internal_stream->segment_data_offset = segment_data_offset; } return( offset ); } /* Retrieves the offset * Returns 1 if successful or -1 on error */ int libfdata_stream_get_offset( libfdata_stream_t *stream, off64_t *offset, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_get_data_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 = (libfdata_internal_stream_t *) stream; if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } *offset = internal_stream->current_offset; return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_stream_get_size( libfdata_stream_t *stream, size64_t *size, libcerror_error_t **error ) { libfdata_internal_stream_t *internal_stream = NULL; static char *function = "libfdata_stream_get_size"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libfdata_internal_stream_t *) stream; if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( internal_stream->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_segments_array_calculate_mapped_ranges( internal_stream->segments_array, internal_stream->mapped_ranges_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } internal_stream->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } if( internal_stream->mapped_size != 0 ) { *size = internal_stream->mapped_size; } else { *size = internal_stream->size; } return( 1 ); } libesedb-20240420/libfdata/libfdata_unused.h0000644000175000017500000000260014610746235021436 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_UNUSED_H ) #define _LIBFDATA_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 /* !defined( _LIBFDATA_UNUSED_H ) */ libesedb-20240420/libfdata/libfdata_range.h0000644000175000017500000000405414610746235021234 0ustar00lordyestalordyesta/* * The range functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 file index */ int file_index; /* 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( libfdata_range_t *range, int *file_index, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ); int libfdata_range_get_size( libfdata_range_t *range, size64_t *size, libcerror_error_t **error ); int libfdata_range_set( libfdata_range_t *range, int file_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_RANGE_H ) */ libesedb-20240420/libfdata/libfdata_area.h0000644000175000017500000001623714610746235021056 0ustar00lordyestalordyesta/* * The area functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_AREA_H ) #define _LIBFDATA_INTERNAL_AREA_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_area libfdata_internal_area_t; struct libfdata_internal_area { /* The element data size */ size64_t element_data_size; /* The (area) size */ size64_t size; /* The segments array */ libcdata_array_t *segments_array; /* The mapped ranges array */ libcdata_array_t *mapped_ranges_array; /* The timestamp */ int64_t timestamp; /* The flags */ uint8_t flags; /* The calculate cache entry index value */ int (*calculate_cache_entry_index)( int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, int number_of_cache_entries ); /* 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 read element data function */ int (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ); /* The write element data function */ int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_area_initialize( libfdata_area_t **area, size64_t element_data_size, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_area_t *area, libfdata_cache_t *cache, off64_t element_value_offset, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_free( libfdata_area_t **area, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_clone( libfdata_area_t **destination_area, libfdata_area_t *source_area, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_area_empty( libfdata_area_t *area, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_resize( libfdata_area_t *area, int number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_get_number_of_segments( libfdata_area_t *area, int *number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_get_segment_by_index( libfdata_area_t *area, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_set_segment_by_index( libfdata_area_t *area, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_prepend_segment( libfdata_area_t *area, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_append_segment( libfdata_area_t *area, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); /* Area element functions */ LIBFDATA_EXTERN \ int libfdata_area_get_element_data_size( libfdata_area_t *area, size64_t *element_data_size, libcerror_error_t **error ); /* Area element value functions */ LIBFDATA_EXTERN \ int libfdata_area_get_element_value_at_offset( libfdata_area_t *area, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t element_value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_area_set_element_value_at_offset( libfdata_area_t *area, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t element_value_offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); /* IO functions */ LIBFDATA_EXTERN \ int libfdata_area_get_size( libfdata_area_t *area, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_AREA_H ) */ libesedb-20240420/libfdata/libfdata_error.c0000644000175000017500000000553614610746235021272 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfdata_error_sprint( libfdata_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfdata_error_backtrace_sprint( libfdata_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ libesedb-20240420/libfdata/libfdata_support.h0000644000175000017500000000231614610746235021653 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFDATA_SUPPORT_H ) */ libesedb-20240420/libfdata/libfdata_range.c0000644000175000017500000001575514610746235021241 0ustar00lordyestalordyesta/* * The range functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_libcerror.h" #include "libfdata_range.h" /* Creates a range * Make sure the value range is referencing, is set to NULL * 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; } ( *range )->file_index = -1; ( *range )->offset = (off64_t) -1; return( 1 ); on_error: if( *range != NULL ) { memory_free( *range ); *range = NULL; } return( -1 ); } /* Frees a 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: invalid destination range value 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( libfdata_range_t *range, int *file_index, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ) { static char *function = "libfdata_range_get"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } if( file_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file index.", 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: invalid flags.", function ); return( -1 ); } *file_index = range->file_index; *offset = range->offset; *size = range->size; *flags = range->flags; return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_range_get_size( libfdata_range_t *range, size64_t *size, libcerror_error_t **error ) { static char *function = "libfdata_range_get_size"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", 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 = range->size; return( 1 ); } /* Sets the range values * Returns 1 if successful or -1 on error */ int libfdata_range_set( libfdata_range_t *range, int file_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { static char *function = "libfdata_range_set"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } range->file_index = file_index; range->offset = offset; range->size = size; range->flags = flags; return( 1 ); } libesedb-20240420/libfdata/libfdata_mapped_range.h0000644000175000017500000000371314610746235022563 0ustar00lordyestalordyesta/* * The (data) mapped range functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_MAPPED_RANGE_H ) #define _LIBFDATA_MAPPED_RANGE_H #include #include #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_mapped_range libfdata_mapped_range_t; struct libfdata_mapped_range { /* The (start) offset */ off64_t offset; /* The size */ size64_t size; }; int libfdata_mapped_range_initialize( libfdata_mapped_range_t **mapped_range, libcerror_error_t **error ); int libfdata_mapped_range_free( libfdata_mapped_range_t **mapped_range, libcerror_error_t **error ); int libfdata_mapped_range_clone( libfdata_mapped_range_t **destination_mapped_range, libfdata_mapped_range_t *source_mapped_range, libcerror_error_t **error ); int libfdata_mapped_range_get( libfdata_mapped_range_t *mapped_range, off64_t *offset, size64_t *size, libcerror_error_t **error ); int libfdata_mapped_range_set( libfdata_mapped_range_t *mapped_range, off64_t offset, size64_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_MAPPED_RANGE_H ) */ libesedb-20240420/libfdata/libfdata_support.c0000644000175000017500000000222414610746235021644 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) */ libesedb-20240420/libfdata/libfdata_list_element.c0000644000175000017500000004560114610746235022622 0ustar00lordyestalordyesta/* * The list element functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_range.h" #include "libfdata_types.h" /* Creates an element * Make sure the value element is referencing, is set to NULL * 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 ); memory_free( internal_element ); return( -1 ); } 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; } if( libfcache_date_time_get_timestamp( &( internal_element->timestamp ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); goto on_error; } internal_element->list = list; internal_element->element_index = element_index; *element = (libfdata_list_element_t *) internal_element; return( 1 ); on_error: if( internal_element != NULL ) { if( internal_element->data_range != NULL ) { libfdata_range_free( &( internal_element->data_range ), NULL ); } memory_free( internal_element ); } return( -1 ); } /* Frees an 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( 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, 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( 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; } if( libfcache_date_time_get_timestamp( &( internal_destination_element->timestamp ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve destination timestamp.", function ); goto on_error; } internal_destination_element->list = internal_source_element->list; internal_destination_element->element_index = internal_source_element->element_index; internal_destination_element->mapped_size = internal_source_element->mapped_size; *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, int64_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 ); } /* 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, int *file_index, 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( internal_element->data_range, file_index, 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, int file_index, 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( file_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid file index less than zero.", 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 ); } if( libfdata_range_set( internal_element->data_range, file_index, 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 ); } if( libfcache_date_time_get_timestamp( &( internal_element->timestamp ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); return( -1 ); } return( 1 ); } /* Mapped range functions */ /* Retrieves the mapped size * Returns 1 if successful, 0 if not set or -1 on error */ int libfdata_list_element_get_mapped_size( libfdata_list_element_t *element, size64_t *mapped_size, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_mapped_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( mapped_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mapped size.", function ); return( -1 ); } if( ( internal_element->flags & LIBFDATA_LIST_ELEMENT_FLAG_HAS_MAPPED_SIZE ) == 0 ) { return( 0 ); } *mapped_size = internal_element->mapped_size; return( 1 ); } /* Sets the mapped size * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_mapped_size( libfdata_list_element_t *element, size64_t mapped_size, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_mapped_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( mapped_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid mapped size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: element: %03d\tmapped size: %" PRIu64 "\n", function, internal_element->element_index, mapped_size ); libcnotify_printf( "\n" ); } #endif internal_element->mapped_size = mapped_size; internal_element->flags |= LIBFDATA_LIST_ELEMENT_FLAG_HAS_MAPPED_SIZE; if( libfdata_list_set_calculate_mapped_ranges_flag( internal_element->list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set the calculate mapped ranges flag in list.", function ); return( -1 ); } 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, intptr_t *file_io_handle, libfdata_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, intptr_t *file_io_handle, libfdata_cache_t *cache, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_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, file_io_handle, cache, element, element_value, free_element_value, write_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 ); } libesedb-20240420/libfdata/libfdata_segments_array.c0000644000175000017500000005142714610746235023164 0ustar00lordyestalordyesta/* * The segments array functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_segments_array.h" /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libfdata_segments_array_get_segment_by_index( libcdata_array_t *segments_array, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_segments_array_get_segment_by_index"; if( libcdata_array_get_entry_by_index( segments_array, 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 entry: %d from segments array.", function, segment_index ); return( -1 ); } if( libfdata_range_get( segment_data_range, segment_file_index, 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 data range values.", 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_segments_array_set_segment_by_index( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_mapped_range_t *mapped_range = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_segments_array_set_segment_by_index"; off64_t previous_segment_offset = 0; size64_t previous_segment_size = 0; uint32_t previous_segment_flags = 0; int previous_segment_file_index = 0; 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( segment_file_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment file index value out of bounds.", function ); return( -1 ); } if( segment_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment offset value out of bounds.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( segments_array, 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 entry: %d from segments array.", function, segment_index ); return( -1 ); } if( segment_data_range == NULL ) { 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 ); return( -1 ); } if( libcdata_array_set_entry_by_index( segments_array, segment_index, (intptr_t *) segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d to segments array.", function, segment_index ); libfdata_range_free( &segment_data_range, NULL ); return( -1 ); } } else { if( libfdata_range_get( segment_data_range, &previous_segment_file_index, &previous_segment_offset, &previous_segment_size, &previous_segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d data range values.", function, segment_index ); return( -1 ); } *data_size -= previous_segment_size; } if( libfdata_range_set( segment_data_range, segment_file_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 segment data range values.", function ); return( -1 ); } /* Make sure there is a mapped range entry for every segment */ if( libcdata_array_get_entry_by_index( mapped_ranges_array, segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, segment_index ); return( -1 ); } if( mapped_range == NULL ) { if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( mapped_ranges_array, segment_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in mapped ranges array.", function, segment_index ); libfdata_mapped_range_free( &mapped_range, NULL ); return( -1 ); } } *data_size += segment_size; return( 1 ); } /* Prepends a segment * Returns 1 if successful or -1 on error */ int libfdata_segments_array_prepend_segment( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_mapped_range_t *mapped_range = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_segments_array_prepend_segment"; int mapped_range_index = -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( segment_file_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment file index value out of bounds.", function ); return( -1 ); } if( segment_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment offset value out of bounds.", function ); return( -1 ); } if( segment_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment size value out of bounds.", function ); return( -1 ); } if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); goto on_error; } if( libfdata_mapped_range_set( mapped_range, (off64_t) *data_size, segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range values.", function ); goto on_error; } if( libcdata_array_append_entry( mapped_ranges_array, &mapped_range_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append mapped range to array.", function ); goto on_error; } 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( segment_data_range, segment_file_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 segment data range values.", function ); goto on_error; } if( libcdata_array_prepend_entry( segments_array, (intptr_t *) segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend data range to segments array.", function ); goto on_error; } *data_size += segment_size; return( 1 ); on_error: if( segment_data_range != NULL ) { libfdata_range_free( &segment_data_range, NULL ); } if( mapped_range_index != -1 ) { libcdata_array_set_entry_by_index( mapped_ranges_array, mapped_range_index, NULL, NULL ); } if( mapped_range != NULL ) { libfdata_mapped_range_free( &mapped_range, NULL ); } return( -1 ); } /* Appends a segment * Returns 1 if successful or -1 on error */ int libfdata_segments_array_append_segment( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_mapped_range_t *mapped_range = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_segments_array_append_segment"; int mapped_range_index = -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( segment_file_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment file index value out of bounds.", function ); return( -1 ); } if( segment_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment offset value out of bounds.", function ); return( -1 ); } if( libfdata_mapped_range_initialize( &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped range.", function ); goto on_error; } if( libfdata_mapped_range_set( mapped_range, (off64_t) *data_size, segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range values.", function ); goto on_error; } if( libcdata_array_append_entry( mapped_ranges_array, &mapped_range_index, (intptr_t *) mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append mapped range to array.", function ); goto on_error; } 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( segment_data_range, segment_file_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 segment data range values.", function ); goto on_error; } if( libcdata_array_append_entry( segments_array, 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; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_size ); libcnotify_printf( "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, *segment_index, *data_size, *data_size + segment_size, segment_size ); libcnotify_printf( "\n" ); } #endif *data_size += segment_size; return( 1 ); on_error: if( segment_data_range != NULL ) { libfdata_range_free( &segment_data_range, NULL ); } if( mapped_range_index != -1 ) { libcdata_array_set_entry_by_index( mapped_ranges_array, mapped_range_index, NULL, NULL ); } if( mapped_range != NULL ) { libfdata_mapped_range_free( &mapped_range, NULL ); } return( -1 ); } /* Calculates the mapped ranges from the segments * Returns 1 if successful or -1 on error */ int libfdata_segments_array_calculate_mapped_ranges( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, libcerror_error_t **error ) { libfdata_mapped_range_t *mapped_range = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_segments_array_calculate_mapped_ranges"; off64_t mapped_offset = 0; off64_t segment_offset = 0; size64_t segment_size = 0; uint32_t segment_flags = 0; int number_of_segments = 0; int segment_file_index = 0; int segment_index = 0; if( libcdata_array_get_number_of_entries( segments_array, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { if( libcdata_array_get_entry_by_index( segments_array, 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 entry: %d from segments array.", function, segment_index ); return( -1 ); } if( libcdata_array_get_entry_by_index( mapped_ranges_array, segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, segment_index ); return( -1 ); } if( libfdata_range_get( segment_data_range, &segment_file_index, &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 data range values.", function, segment_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tfile index: %03d offset: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_size ); libcnotify_printf( "%s: segment: %03d\tmapped range: 0x%08" PRIx64 " - 0x%08" PRIx64 " (size: %" PRIu64 ")\n", function, segment_index, mapped_offset, mapped_offset + segment_size, segment_size ); } #endif if( libfdata_mapped_range_set( mapped_range, mapped_offset, segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set mapped range: %d values.", function, segment_index ); return( -1 ); } mapped_offset += (off64_t) segment_size; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Retrieves the segment data range for a specific offset * Returns 1 if successful or -1 on error */ int libfdata_segments_array_get_data_range_at_offset( libcdata_array_t *segments_array, off64_t value_offset, off64_t *segment_data_offset, libfdata_range_t **segment_data_range, libcerror_error_t **error ) { static char *function = "libfdata_segments_array_get_data_range_at_offset"; size64_t segment_size = 0; int number_of_segments = 0; int segment_index = 0; if( segment_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid segment data offset.", function ); return( -1 ); } if( segment_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid segment data range.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( segments_array, &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( libcdata_array_get_entry_by_index( segments_array, 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( libfdata_range_get_size( *segment_data_range, &segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from segment data range: %d.", function, segment_index ); return( -1 ); } /* TODO what about compressed data ranges */ if( (size64_t) value_offset < segment_size ) { *segment_data_offset = value_offset; break; } value_offset -= segment_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 ); } return( 1 ); } libesedb-20240420/libfdata/libfdata_types.h0000644000175000017500000000400614610746235021301 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_area {} libfdata_area_t; typedef struct libfdata_cache {} libfdata_cache_t; typedef struct libfdata_list {} libfdata_list_t; typedef struct libfdata_list_element {} libfdata_list_element_t; typedef struct libfdata_range_list {} libfdata_range_list_t; typedef struct libfdata_stream {} libfdata_stream_t; typedef struct libfdata_vector {} libfdata_vector_t; #else typedef intptr_t libfdata_area_t; typedef intptr_t libfdata_cache_t; typedef intptr_t libfdata_list_t; typedef intptr_t libfdata_list_element_t; typedef intptr_t libfdata_range_list_t; typedef intptr_t libfdata_stream_t; typedef intptr_t libfdata_vector_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFDATA ) */ #endif /* !defined( _LIBFDATA_INTERNAL_TYPES_H ) */ libesedb-20240420/libfdata/libfdata_notify.h0000644000175000017500000000307114610746235021446 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_NOTIFY_H ) */ libesedb-20240420/libfdata/libfdata_range_list.h0000644000175000017500000001357514610746235022277 0ustar00lordyestalordyesta/* * The range list functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_RANGE_LIST_H ) #define _LIBFDATA_INTERNAL_RANGE_LIST_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_range_list libfdata_internal_range_list_t; struct libfdata_internal_range_list { /* The (list) elements range list */ libcdata_range_list_t *elements_range_list; /* The flags */ uint8_t flags; /* 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 read element data function */ int (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t read_flags, libcerror_error_t **error ); /* The write element data function */ int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t write_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_range_list_initialize( libfdata_range_list_t **range_list, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_list_element_t *list_element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t write_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_range_list_free( libfdata_range_list_t **range_list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_range_list_clone( libfdata_range_list_t **destination_range_list, libfdata_range_list_t *source_range_list, libcerror_error_t **error ); /* List elements functions */ LIBFDATA_EXTERN \ int libfdata_range_list_empty( libfdata_range_list_t *range_list, libcerror_error_t **error ); /* Mapped range functions */ LIBFDATA_EXTERN \ int libfdata_range_list_get_list_element_at_offset( libfdata_range_list_t *range_list, off64_t offset, off64_t *element_data_offset, libfdata_list_element_t **element, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_range_list_get_element_at_offset( libfdata_range_list_t *range_list, off64_t offset, off64_t *element_data_offset, int *element_file_index, off64_t *element_offset, size64_t *element_size, uint32_t *element_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_range_list_insert_element( libfdata_range_list_t *range_list, off64_t offset, size64_t size, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, libcerror_error_t **error ); /* List element value functions */ LIBFDATA_EXTERN \ int libfdata_range_list_get_element_value_at_offset( libfdata_range_list_t *range_list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, off64_t *element_data_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_range_list_set_element_value_at_offset( libfdata_range_list_t *range_list, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t offset, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_RANGE_LIST_H ) */ libesedb-20240420/libfdata/libfdata_segments_array.h0000644000175000017500000000536414610746235023170 0ustar00lordyestalordyesta/* * The segments array functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_SEGMENTS_ARRAY_H ) #define _LIBFDATA_SEGMENTS_ARRAY_H #include #include #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_range.h" int libfdata_segments_array_get_segment_by_index( libcdata_array_t *segments_array, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); int libfdata_segments_array_set_segment_by_index( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); int libfdata_segments_array_prepend_segment( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); int libfdata_segments_array_append_segment( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, size64_t *data_size, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); int libfdata_segments_array_calculate_mapped_ranges( libcdata_array_t *segments_array, libcdata_array_t *mapped_ranges_array, libcerror_error_t **error ); int libfdata_segments_array_get_data_range_at_offset( libcdata_array_t *segments_array, off64_t value_offset, off64_t *segment_data_offset, libfdata_range_t **segment_data_range, libcerror_error_t **error ); #if defined( __cplusplus ) extern "C" { #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_SEGMENTS_ARRAY_H ) */ libesedb-20240420/libfdata/Makefile.in0000644000175000017500000010365414610746265020217 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_area.c libfdata_area.h \ libfdata_cache.c libfdata_cache.h libfdata_definitions.h \ libfdata_error.c libfdata_error.h libfdata_extern.h \ libfdata_libcdata.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_mapped_range.c libfdata_mapped_range.h \ libfdata_notify.c libfdata_notify.h libfdata_range.c \ libfdata_range.h libfdata_range_list.c libfdata_range_list.h \ libfdata_segments_array.c libfdata_segments_array.h \ libfdata_stream.c libfdata_stream.h libfdata_support.c \ libfdata_support.h libfdata_types.h libfdata_unused.h \ libfdata_vector.c libfdata_vector.h @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_OBJECTS = libfdata_area.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_cache.lo libfdata_error.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list_element.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_mapped_range.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_notify.lo libfdata_range.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_range_list.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_segments_array.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_stream.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.lo libfdata_la_OBJECTS = $(am_libfdata_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfdata_area.Plo \ ./$(DEPDIR)/libfdata_cache.Plo ./$(DEPDIR)/libfdata_error.Plo \ ./$(DEPDIR)/libfdata_list.Plo \ ./$(DEPDIR)/libfdata_list_element.Plo \ ./$(DEPDIR)/libfdata_mapped_range.Plo \ ./$(DEPDIR)/libfdata_notify.Plo ./$(DEPDIR)/libfdata_range.Plo \ ./$(DEPDIR)/libfdata_range_list.Plo \ ./$(DEPDIR)/libfdata_segments_array.Plo \ ./$(DEPDIR)/libfdata_stream.Plo \ ./$(DEPDIR)/libfdata_support.Plo \ ./$(DEPDIR)/libfdata_vector.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfdata_la_SOURCES) DIST_SOURCES = $(am__libfdata_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATA_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBFCACHE_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBFDATA_TRUE@noinst_LTLIBRARIES = libfdata.la @HAVE_LOCAL_LIBFDATA_TRUE@libfdata_la_SOURCES = \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_area.c libfdata_area.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_cache.c libfdata_cache.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_libcdata.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_mapped_range.c libfdata_mapped_range.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_range_list.c libfdata_range_list.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_segments_array.c libfdata_segments_array.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_stream.c libfdata_stream.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.c libfdata_support.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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfdata.la: $(libfdata_la_OBJECTS) $(libfdata_la_DEPENDENCIES) $(EXTRA_libfdata_la_DEPENDENCIES) $(AM_V_CCLD)$(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_area.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_cache.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list_element.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_mapped_range.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_notify.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_range.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_range_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_segments_array.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_vector.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfdata_area.Plo -rm -f ./$(DEPDIR)/libfdata_cache.Plo -rm -f ./$(DEPDIR)/libfdata_error.Plo -rm -f ./$(DEPDIR)/libfdata_list.Plo -rm -f ./$(DEPDIR)/libfdata_list_element.Plo -rm -f ./$(DEPDIR)/libfdata_mapped_range.Plo -rm -f ./$(DEPDIR)/libfdata_notify.Plo -rm -f ./$(DEPDIR)/libfdata_range.Plo -rm -f ./$(DEPDIR)/libfdata_range_list.Plo -rm -f ./$(DEPDIR)/libfdata_segments_array.Plo -rm -f ./$(DEPDIR)/libfdata_stream.Plo -rm -f ./$(DEPDIR)/libfdata_support.Plo -rm -f ./$(DEPDIR)/libfdata_vector.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfdata_area.Plo -rm -f ./$(DEPDIR)/libfdata_cache.Plo -rm -f ./$(DEPDIR)/libfdata_error.Plo -rm -f ./$(DEPDIR)/libfdata_list.Plo -rm -f ./$(DEPDIR)/libfdata_list_element.Plo -rm -f ./$(DEPDIR)/libfdata_mapped_range.Plo -rm -f ./$(DEPDIR)/libfdata_notify.Plo -rm -f ./$(DEPDIR)/libfdata_range.Plo -rm -f ./$(DEPDIR)/libfdata_range_list.Plo -rm -f ./$(DEPDIR)/libfdata_segments_array.Plo -rm -f ./$(DEPDIR)/libfdata_stream.Plo -rm -f ./$(DEPDIR)/libfdata_support.Plo -rm -f ./$(DEPDIR)/libfdata_vector.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfdata/libfdata_vector.c0000644000175000017500000014100614610746235021434 0ustar00lordyestalordyesta/* * The vector functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libcdata.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_mapped_range.h" #include "libfdata_range.h" #include "libfdata_segments_array.h" #include "libfdata_types.h" #include "libfdata_unused.h" #include "libfdata_vector.h" /* Creates a vector * Make sure the value vector is referencing, is set to NULL * * If the flag LIBFDATA_DATA_HANDLE_FLAG_MANAGED is set the vector * takes over management of the data handle and the data 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_data_size, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_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_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid element data size value zero or less.", 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 ); memory_free( internal_vector ); return( -1 ); } if( libcdata_array_initialize( &( internal_vector->segments_array ), 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; } if( libcdata_array_initialize( &( internal_vector->mapped_ranges_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create mapped ranges array.", function ); goto on_error; } if( libfcache_date_time_get_timestamp( &( internal_vector->timestamp ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache timestamp.", function ); goto on_error; } internal_vector->element_data_size = element_data_size; internal_vector->flags |= flags; internal_vector->data_handle = data_handle; internal_vector->free_data_handle = free_data_handle; internal_vector->clone_data_handle = clone_data_handle; internal_vector->read_element_data = read_element_data; internal_vector->write_element_data = write_element_data; *vector = (libfdata_vector_t *) internal_vector; return( 1 ); on_error: if( internal_vector != NULL ) { if( internal_vector->mapped_ranges_array != NULL ) { libcdata_array_free( &( internal_vector->mapped_ranges_array ), NULL, NULL ); } if( internal_vector->segments_array != NULL ) { libcdata_array_free( &( internal_vector->segments_array ), NULL, NULL ); } memory_free( internal_vector ); } return( -1 ); } /* Frees a 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( libcdata_array_free( &( internal_vector->segments_array ), (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( libcdata_array_free( &( internal_vector->mapped_ranges_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the mapped ranges array.", function ); result = -1; } if( ( internal_vector->flags & LIBFDATA_DATA_HANDLE_FLAG_MANAGED ) != 0 ) { if( internal_vector->data_handle != NULL ) { if( internal_vector->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid vector - missing free data handle function.", function ); result = -1; } else if( internal_vector->free_data_handle( &( internal_vector->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_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_destination_vector = NULL; libfdata_internal_vector_t *internal_source_vector = 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: invalid destination vector value already set.", function ); return( -1 ); } if( source_vector == NULL ) { *destination_vector = source_vector; return( 1 ); } internal_source_vector = (libfdata_internal_vector_t *) source_vector; internal_destination_vector = memory_allocate_structure( libfdata_internal_vector_t ); if( internal_destination_vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination vector.", function ); goto on_error; } if( memory_set( internal_destination_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 destination vector.", function ); memory_free( internal_destination_vector ); return( -1 ); } if( internal_source_vector->data_handle != NULL ) { if( internal_source_vector->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source vector - missing free data handle function.", function ); goto on_error; } if( internal_source_vector->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source vector - missing clone data handle function.", function ); goto on_error; } if( internal_source_vector->clone_data_handle( &( internal_destination_vector->data_handle ), internal_source_vector->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( libcdata_array_clone( &( internal_destination_vector->segments_array ), internal_source_vector->segments_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination segments array.", function ); goto on_error; } if( libcdata_array_clone( &( internal_destination_vector->mapped_ranges_array ), internal_source_vector->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfdata_mapped_range_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination mapped ranges array.", function ); goto on_error; } internal_destination_vector->element_data_size = internal_source_vector->element_data_size; internal_destination_vector->timestamp = internal_source_vector->timestamp; internal_destination_vector->flags = internal_source_vector->flags | LIBFDATA_DATA_HANDLE_FLAG_MANAGED; internal_destination_vector->data_handle = internal_source_vector->data_handle; internal_destination_vector->free_data_handle = internal_source_vector->free_data_handle; internal_destination_vector->clone_data_handle = internal_source_vector->clone_data_handle; internal_destination_vector->read_element_data = internal_source_vector->read_element_data; internal_destination_vector->write_element_data = internal_source_vector->write_element_data; *destination_vector = (libfdata_vector_t *) internal_destination_vector; return( 1 ); on_error: if( internal_destination_vector != NULL ) { if( internal_destination_vector->segments_array != NULL ) { libcdata_array_free( &( internal_destination_vector->segments_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, NULL ); } if( ( internal_destination_vector->data_handle != NULL ) && ( internal_source_vector->free_data_handle != NULL ) ) { internal_source_vector->free_data_handle( &( internal_destination_vector->data_handle ), NULL ); } memory_free( internal_destination_vector ); } return( -1 ); } /* Segment functions */ /* Empties the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_empty( libfdata_vector_t *vector, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_empty"; 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( libcdata_array_empty( internal_vector->segments_array, (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 empty segments array.", function ); return( -1 ); } if( libcdata_array_empty( internal_vector->mapped_ranges_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty mapped ranges array.", function ); return( -1 ); } internal_vector->size = 0; return( 1 ); } /* Resizes the segments * Returns 1 if successful or -1 on error */ int libfdata_vector_resize( libfdata_vector_t *vector, int number_of_segments, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_resize"; 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( libcdata_array_resize( internal_vector->segments_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize segments array.", function ); return( -1 ); } if( libcdata_array_resize( internal_vector->mapped_ranges_array, number_of_segments, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_mapped_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize mapped ranges array.", function ); return( -1 ); } internal_vector->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Retrieves the number of segments of the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_get_number_of_segments( libfdata_vector_t *vector, int *number_of_segments, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_number_of_segments"; 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( libcdata_array_get_number_of_entries( internal_vector->segments_array, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from segments array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the offset and size of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_vector_get_segment_by_index( libfdata_vector_t *vector, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_segment_by_index"; 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_segments_array_get_segment_by_index( internal_vector->segments_array, segment_index, segment_file_index, 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_vector_set_segment_by_index( libfdata_vector_t *vector, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_set_segment_by_index"; 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_segments_array_set_segment_by_index( internal_vector->segments_array, internal_vector->mapped_ranges_array, &( internal_vector->size ), segment_index, segment_file_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 segment: %d.", function, segment_index ); return( -1 ); } internal_vector->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Prepends a segment * Returns 1 if successful or -1 on error */ int libfdata_vector_prepend_segment( libfdata_vector_t *vector, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_prepend_segment"; 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_segments_array_prepend_segment( internal_vector->segments_array, internal_vector->mapped_ranges_array, &( internal_vector->size ), segment_file_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 prepend segment.", function ); return( -1 ); } internal_vector->flags |= LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES; return( 1 ); } /* Appends a segment * Returns 1 if successful or -1 on error */ int libfdata_vector_append_segment( libfdata_vector_t *vector, int *segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_append_segment"; 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_segments_array_append_segment( internal_vector->segments_array, internal_vector->mapped_ranges_array, &( internal_vector->size ), segment_index, segment_file_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 segment.", function ); return( -1 ); } return( 1 ); } /* Vector element functions */ /* Retrieves the element data size of the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_data_size( libfdata_vector_t *vector, size64_t *element_data_size, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_element_data_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_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element data size.", function ); return( -1 ); } *element_data_size = internal_vector->element_data_size; 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"; size64_t safe_number_of_elements = 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_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element data 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 ); } safe_number_of_elements = internal_vector->size / internal_vector->element_data_size; if( ( internal_vector->size % internal_vector->element_data_size ) != 0 ) { safe_number_of_elements++; } if( safe_number_of_elements > (size64_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of elements value out of bounds.", function ); return( -1 ); } *number_of_elements = (int) safe_number_of_elements; return( 1 ); } /* Mapped range functions */ /* 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 element_value_offset, int *element_index, off64_t *element_data_offset, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; libfdata_mapped_range_t *mapped_range = NULL; static char *function = "libfdata_vector_get_element_index_at_offset"; off64_t mapped_range_end_offset = 0; off64_t mapped_range_start_offset = 0; off64_t segment_data_offset = 0; size64_t mapped_range_size = 0; uint64_t calculated_element_index = 0; int initial_segment_index = 0; int number_of_segments = 0; int segment_index = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) libfdata_range_t *segment_data_range = NULL; off64_t segment_offset = 0; size64_t segment_size = 0; uint32_t segment_flags = 0; int segment_file_index = -1; #endif 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_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element data size value out of bounds.", function ); return( -1 ); } if( internal_vector->size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - size value out of bounds.", function ); return( -1 ); } if( element_value_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid element 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_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element data offset.", function ); return( -1 ); } if( ( internal_vector->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_segments_array_calculate_mapped_ranges( internal_vector->segments_array, internal_vector->mapped_ranges_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges from segments array.", function ); return( -1 ); } internal_vector->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, element_value_offset, element_value_offset ); } #endif if( internal_vector->size == 0 ) { return( 0 ); } if( libcdata_array_get_number_of_entries( internal_vector->mapped_ranges_array, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from mapped ranges array.", function ); return( -1 ); } /* This assumes a fairly even distribution of the sizes of the segments */ initial_segment_index = (int) ( ( number_of_segments * element_value_offset ) / internal_vector->size ); /* Look for the corresponding segment upwards in the array */ for( segment_index = initial_segment_index; segment_index < number_of_segments; segment_index++ ) { if( libcdata_array_get_entry_by_index( internal_vector->mapped_ranges_array, segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, segment_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, segment_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment: %d - mapped range value out of bounds.", function, segment_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the element value offset is in the mapped range */ if( ( element_value_offset >= mapped_range_start_offset ) && ( element_value_offset < mapped_range_end_offset ) ) { break; } /* Check if the element value offset is out of bounds */ if( element_value_offset < mapped_range_start_offset ) { segment_index = number_of_segments; break; } } if( segment_index >= number_of_segments ) { /* Look for the corresponding segment downwards in the array */ for( segment_index = initial_segment_index; segment_index >= 0; segment_index-- ) { if( libcdata_array_get_entry_by_index( internal_vector->mapped_ranges_array, segment_index, (intptr_t **) &mapped_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from mapped ranges array.", function, segment_index ); return( -1 ); } if( libfdata_mapped_range_get( mapped_range, &mapped_range_start_offset, &mapped_range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve values from mapped range: %d.", function, segment_index ); return( -1 ); } mapped_range_end_offset = mapped_range_start_offset + (off64_t) mapped_range_size; if( mapped_range_end_offset < mapped_range_start_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment: %d - mapped range value out of bounds.", function, segment_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: segment: %03d\tmapped range: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, mapped_range_start_offset, mapped_range_end_offset, mapped_range_start_offset, mapped_range_end_offset, mapped_range_size ); } #endif /* Check if the element value offset is in the mapped range */ if( ( element_value_offset >= mapped_range_start_offset ) && ( element_value_offset < mapped_range_end_offset ) ) { break; } /* Check if the element value offset is out of bounds */ if( element_value_offset > mapped_range_start_offset ) { segment_index = -1; break; } segment_data_offset += (off64_t) mapped_range_size; } } if( ( segment_index >= 0 ) && ( segment_index < number_of_segments ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libcdata_array_get_entry_by_index( internal_vector->segments_array, 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 entry: %d from segments array.", function, segment_index ); return( -1 ); } if( libfdata_range_get( segment_data_range, &segment_file_index, &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 data range values.", function, segment_index ); return( -1 ); } libcnotify_printf( "%s: segment: %03d\tfile index: %03d offset: %" PRIi64 " - %" PRIi64 " (0x%08" PRIx64 " - 0x%08" PRIx64 ") (size: %" PRIu64 ")\n", function, segment_index, segment_file_index, segment_offset, segment_offset + segment_size, segment_offset, segment_offset + segment_size, segment_size ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ calculated_element_index = (uint64_t) element_value_offset / internal_vector->element_data_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 ); } /* The element data offset is relative from the start of the vector element not the underlying segment */ *element_index = (int) calculated_element_index; *element_data_offset = element_value_offset % internal_vector->element_data_size; result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } /* Vector element value functions */ /* 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, intptr_t *file_io_handle, libfdata_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; int64_t cache_value_timestamp = 0; uint32_t element_data_flags = 0; int cache_value_file_index = -1; int element_data_file_index = -1; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) const char *hit_or_miss = NULL; #endif 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->read_element_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid vector - missing read element data function.", function ); return( -1 ); } if( internal_vector->element_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element data size value out of bounds.", function ); return( -1 ); } if( ( internal_vector->size == 0 ) || ( internal_vector->size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - size value out of bounds.", function ); return( -1 ); } if( ( element_index < 0 ) || ( (uint64_t) element_index > ( (uint64_t) INT64_MAX / internal_vector->element_data_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 ); } element_data_offset = (off64_t) ( element_index * internal_vector->element_data_size ); if( (size64_t) element_data_offset > internal_vector->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_segments_array_get_data_range_at_offset( internal_vector->segments_array, element_data_offset, &element_data_offset, &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 for offset: %" PRIi64 " (0x%08" PRIx64 ").", function, element_data_offset, element_data_offset ); 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.", function ); return( -1 ); } if( segment_data_range->offset > ( (off64_t) INT64_MAX - element_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element data offset value out of bounds.", function ); return( -1 ); } element_data_file_index = segment_data_range->file_index; element_data_offset += segment_data_range->offset; element_data_flags = segment_data_range->flags; if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { result = libfcache_cache_get_value_by_identifier( (libfcache_cache_t *) cache, element_data_file_index, element_data_offset, internal_vector->timestamp, &cache_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from cache.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { hit_or_miss = "miss"; } else { hit_or_miss = "hit"; } libcnotify_printf( "%s: cache: 0x%08" PRIjx " %s\n", function, (intptr_t) cache, hit_or_miss ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ } 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_data_size ); } #endif if( internal_vector->read_element_data( internal_vector->data_handle, file_io_handle, vector, cache, element_index, element_data_file_index, element_data_offset, internal_vector->element_data_size, element_data_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 " (0x%08" PRIx64 ").", function, element_data_offset, element_data_offset ); return( -1 ); } if( libfcache_cache_get_value_by_identifier( (libfcache_cache_t *) cache, element_data_file_index, element_data_offset, internal_vector->timestamp, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from cache.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_file_index, &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_file_index != cache_value_file_index ) || ( element_data_offset != cache_value_offset ) || ( internal_vector->timestamp != cache_value_timestamp ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid cache value - identifier value out of bounds.", 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, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t element_value_offset, off64_t *element_data_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { static char *function = "libfdata_vector_get_element_value_at_offset"; int element_index = 0; if( libfdata_vector_get_element_index_at_offset( vector, element_value_offset, &element_index, element_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 " (0x%08" PRIx64 ").", function, element_value_offset, element_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, intptr_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfdata_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_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; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) 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_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element data size value out of bounds.", function ); return( -1 ); } if( ( internal_vector->size == 0 ) || ( internal_vector->size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - size value out of bounds.", function ); return( -1 ); } if( ( element_index < 0 ) || ( (uint64_t) element_index > ( (uint64_t) INT64_MAX / internal_vector->element_data_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 ); } element_data_offset = (off64_t) ( element_index * internal_vector->element_data_size ); if( (size64_t) element_data_offset > internal_vector->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_segments_array_get_data_range_at_offset( internal_vector->segments_array, element_data_offset, &element_data_offset, &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 for offset: %" PRIi64 " (0x%08" PRIx64 ").", function, element_data_offset, element_data_offset ); 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.", function ); return( -1 ); } if( segment_data_range->offset > ( (off64_t) INT64_MAX - element_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element data offset value out of bounds.", function ); return( -1 ); } element_data_offset += segment_data_range->offset; if( libfcache_cache_set_value_by_identifier( (libfcache_cache_t *) cache, segment_data_range->file_index, element_data_offset, internal_vector->timestamp, element_value, free_element_value, write_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_vector_get_size( libfdata_vector_t *vector, size64_t *size, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_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( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( internal_vector->flags & LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ) != 0 ) { if( libfdata_segments_array_calculate_mapped_ranges( internal_vector->segments_array, internal_vector->mapped_ranges_array, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate mapped ranges.", function ); return( -1 ); } internal_vector->flags &= ~( LIBFDATA_FLAG_CALCULATE_MAPPED_RANGES ); } *size = internal_vector->size; return( 1 ); } libesedb-20240420/libfdata/libfdata_libfcache.h0000644000175000017500000000264114610746235022040 0ustar00lordyestalordyesta/* * The libfcache header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFDATA_LIBFCACHE_H ) */ libesedb-20240420/libfdata/libfdata_vector.h0000644000175000017500000001720214610746235021441 0ustar00lordyestalordyesta/* * The vector functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_VECTOR_H ) #define _LIBFDATA_INTERNAL_VECTOR_H #include #include #include "libfdata_extern.h" #include "libfdata_libcdata.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 data size */ size64_t element_data_size; /* The (vector) size */ size64_t size; /* The segments array */ libcdata_array_t *segments_array; /* The mapped ranges array */ libcdata_array_t *mapped_ranges_array; /* The timestamp */ int64_t timestamp; /* The flags */ uint8_t flags; /* 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 read element data function */ int (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ); /* The write element data function */ int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_vector_initialize( libfdata_vector_t **vector, size64_t element_data_size, 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 (*read_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), int (*write_element_data)( intptr_t *data_handle, intptr_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_data_file_index, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t write_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 ); LIBFDATA_EXTERN \ int libfdata_vector_empty( libfdata_vector_t *vector, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_resize( libfdata_vector_t *vector, int number_of_segments, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_number_of_segments( libfdata_vector_t *vector, int *number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_segment_by_index( libfdata_vector_t *vector, int segment_index, int *segment_file_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_set_segment_by_index( libfdata_vector_t *vector, int segment_index, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_prepend_segment( libfdata_vector_t *vector, int segment_file_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_append_segment( libfdata_vector_t *vector, int *segment_index, int segment_file_index, 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_element_data_size( libfdata_vector_t *vector, size64_t *element_data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_number_of_elements( libfdata_vector_t *vector, int *number_of_elements, libcerror_error_t **error ); /* Mapped range functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_element_index_at_offset( libfdata_vector_t *vector, off64_t element_value_offset, int *element_index, off64_t *element_data_offset, libcerror_error_t **error ); /* Vector element value functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_element_value_by_index( libfdata_vector_t *vector, intptr_t *file_io_handle, libfdata_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, intptr_t *file_io_handle, libfdata_cache_t *cache, off64_t element_value_offset, off64_t *element_data_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, intptr_t *file_io_handle, libfdata_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t write_flags, libcerror_error_t **error ); /* IO functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_size( libfdata_vector_t *vector, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATA_INTERNAL_VECTOR_H ) */ libesedb-20240420/COPYING0000644000175000017500000010451514610727243015427 0ustar00lordyestalordyesta GNU 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. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . libesedb-20240420/install-sh0000755000175000017500000003577614610746265016421 0ustar00lordyestalordyesta#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly 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 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. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -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 By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi 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 # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # 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 # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_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 && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # 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 "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$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 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libesedb-20240420/NEWS0000644000175000017500000000000014610727243015053 0ustar00lordyestalordyestalibesedb-20240420/depcomp0000755000175000017500000005602014610746266015754 0ustar00lordyestalordyesta#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 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 outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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" # Avoid interferences from the environment. gccflag= dashmflag= # 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 if test "$depmode" = msvc7msys; then # This is just like msvc7 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=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then 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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # 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 ;; 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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then 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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then 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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #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|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | 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" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | 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::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$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 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libesedb-20240420/libfguid/0000755000175000017500000000000014610746414016154 5ustar00lordyestalordyestalibesedb-20240420/libfguid/libfguid_error.c0000644000175000017500000000553614610746240021324 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfguid_error_sprint( libfguid_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfguid_error_backtrace_sprint( libfguid_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */ libesedb-20240420/libfguid/libfguid_support.h0000644000175000017500000000225014610746240021702 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFGUID_SUPPORT_H ) */ libesedb-20240420/libfguid/libfguid_identifier.h0000644000175000017500000001307014610746240022312 0ustar00lordyestalordyesta/* * Global (or Universal) Unique Identifier (GUID/UUID) functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_copy_to_byte_stream( libfguid_identifier_t *identifier, 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_from_utf8_string( libfguid_identifier_t *identifier, const uint8_t *utf8_string, size_t utf8_string_length, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_from_utf8_string_with_index( libfguid_identifier_t *identifier, const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, 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_from_utf16_string( libfguid_identifier_t *identifier, const uint16_t *utf16_string, size_t utf16_string_length, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_from_utf16_string_with_index( libfguid_identifier_t *identifier, const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_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_from_utf32_string( libfguid_identifier_t *identifier, const uint32_t *utf32_string, size_t utf32_string_length, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_from_utf32_string_with_index( libfguid_identifier_t *identifier, const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_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 /* !defined( _LIBFGUID_INTERNAL_IDENTIFIER_H ) */ libesedb-20240420/libfguid/libfguid_libcerror.h0000644000175000017500000000263614610746240022161 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFGUID_LIBCERROR_H ) */ libesedb-20240420/libfguid/Makefile.am0000644000175000017500000000124514610746240020207 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFGUID AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ noinst_LTLIBRARIES = libfguid.la libfguid_la_SOURCES = \ libfguid_definitions.h \ libfguid_extern.h \ libfguid_error.c libfguid_error.h \ libfguid_libcerror.h \ libfguid_identifier.c libfguid_identifier.h \ libfguid_support.c libfguid_support.h \ libfguid_types.h \ libfguid_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) libesedb-20240420/libfguid/libfguid_unused.h0000644000175000017500000000260014610746240021470 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFGUID_UNUSED_H ) #define _LIBFGUID_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 /* !defined( _LIBFGUID_UNUSED_H ) */ libesedb-20240420/libfguid/libfguid_extern.h0000644000175000017500000000255514610746240021503 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFGUID_EXTERN_VARIABLE extern #else #define LIBFGUID_EXTERN_VARIABLE LIBFGUID_EXTERN #endif #else #define LIBFGUID_EXTERN /* extern */ #define LIBFGUID_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFGUID_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfguid/libfguid_types.h0000644000175000017500000000275314610746240021342 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFGUID_INTERNAL_TYPES_H ) */ libesedb-20240420/libfguid/libfguid_identifier.c0000644000175000017500000020376314610746240022317 0ustar00lordyestalordyesta/* * GUID functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfguid_definitions.h" #include "libfguid_identifier.h" #include "libfguid_libcerror.h" #include "libfguid_types.h" /* Creates an identifier * Make sure the value identifier is referencing, is set to NULL * 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 ); } /* Copies the identifier to a byte stream * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_byte_stream( libfguid_identifier_t *identifier, 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_to_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_from_uint32_little_endian( byte_stream, internal_identifier->time.lower ); byte_stream += 4; byte_stream_copy_from_uint16_little_endian( byte_stream, internal_identifier->time.middle ); byte_stream += 2; byte_stream_copy_from_uint16_little_endian( byte_stream, internal_identifier->time.upper ); byte_stream += 2; } else if( byte_order == LIBFGUID_ENDIAN_BIG ) { byte_stream_copy_from_uint32_big_endian( byte_stream, internal_identifier->time.lower ); byte_stream += 4; byte_stream_copy_from_uint16_big_endian( byte_stream, internal_identifier->time.middle ); byte_stream += 2; byte_stream_copy_from_uint16_big_endian( byte_stream, internal_identifier->time.upper ); byte_stream += 2; } byte_stream[ 0 ] = internal_identifier->clock_sequence.upper; byte_stream[ 1 ] = internal_identifier->clock_sequence.lower; byte_stream[ 2 ] = internal_identifier->node[ 0 ]; byte_stream[ 3 ] = internal_identifier->node[ 1 ]; byte_stream[ 4 ] = internal_identifier->node[ 2 ]; byte_stream[ 5 ] = internal_identifier->node[ 3 ]; byte_stream[ 6 ] = internal_identifier->node[ 4 ]; byte_stream[ 7 ] = internal_identifier->node[ 5 ]; 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 required_flags = 0; 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 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { *string_size += 2; } return( 1 ); } /* Copies the identifier from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf8_string( libfguid_identifier_t *identifier, const uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_from_utf8_string"; size_t utf8_string_index = 0; if( libfguid_identifier_copy_from_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 from UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf8_string_with_index( libfguid_identifier_t *identifier, const uint8_t *utf8_string, size_t utf8_string_length, 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_from_utf8_string_with_index"; size_t byte_index = 0; size_t node_index = 0; size_t string_index = 0; size_t string_length = 0; uint32_t required_flags = 0; 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 ); } 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 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 index.", function ); return( -1 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES; 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_length = 36; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { string_length += 2; } string_index = *utf8_string_index; if( ( string_index + string_length ) > utf8_string_length ) { 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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf8_string[ string_index ] != (uint8_t) '{' ) { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 8; byte_index++ ) { internal_identifier->time.lower <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->time.lower |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->time.lower |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->time.lower |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf8_string[ string_index ] != (uint8_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.middle <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->time.middle |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->time.middle |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->time.middle |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf8_string[ string_index ] != (uint8_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.upper <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->time.upper |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->time.upper |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->time.upper |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf8_string[ string_index ] != (uint8_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.upper <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->clock_sequence.upper |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->clock_sequence.upper |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->clock_sequence.upper |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.lower <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->clock_sequence.lower |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->clock_sequence.lower |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->clock_sequence.lower |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf8_string[ string_index ] != (uint8_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 12; byte_index++ ) { node_index = byte_index / 2; internal_identifier->node[ node_index ] <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { internal_identifier->node[ node_index ] |= utf8_string[ string_index ] - (uint8_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { internal_identifier->node[ node_index ] |= utf8_string[ string_index ] - (uint8_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { internal_identifier->node[ node_index ] |= utf8_string[ string_index ] - (uint8_t) 'A' + 10; } else { goto on_error; } string_index++; } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf8_string[ string_index ] != (uint8_t) '}' ) { goto on_error; } string_index++; } *utf8_string_index = string_index; return( 1 ); on_error: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); 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 required_flags = 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 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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 from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf16_string( libfguid_identifier_t *identifier, const uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_from_utf16_string"; size_t utf16_string_index = 0; if( libfguid_identifier_copy_from_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 from UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf16_string_with_index( libfguid_identifier_t *identifier, const uint16_t *utf16_string, size_t utf16_string_length, 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_from_utf16_string_with_index"; size_t byte_index = 0; size_t node_index = 0; size_t string_index = 0; size_t string_length = 0; uint32_t required_flags = 0; 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 ); } 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 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 index.", function ); return( -1 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES; 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_length = 36; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { string_length += 2; } string_index = *utf16_string_index; if( ( string_index + string_length ) > utf16_string_length ) { 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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf16_string[ string_index ] != (uint16_t) '{' ) { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 8; byte_index++ ) { internal_identifier->time.lower <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->time.lower |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->time.lower |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->time.lower |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf16_string[ string_index ] != (uint16_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.middle <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->time.middle |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->time.middle |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->time.middle |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf16_string[ string_index ] != (uint16_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.upper <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->time.upper |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->time.upper |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->time.upper |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf16_string[ string_index ] != (uint16_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.upper <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->clock_sequence.upper |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->clock_sequence.upper |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->clock_sequence.upper |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.lower <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->clock_sequence.lower |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->clock_sequence.lower |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->clock_sequence.lower |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf16_string[ string_index ] != (uint16_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 12; byte_index++ ) { node_index = byte_index / 2; internal_identifier->node[ node_index ] <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { internal_identifier->node[ node_index ] |= utf16_string[ string_index ] - (uint16_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { internal_identifier->node[ node_index ] |= utf16_string[ string_index ] - (uint16_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { internal_identifier->node[ node_index ] |= utf16_string[ string_index ] - (uint16_t) 'A' + 10; } else { goto on_error; } string_index++; } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf16_string[ string_index ] != (uint16_t) '}' ) { goto on_error; } string_index++; } *utf16_string_index = string_index; return( 1 ); on_error: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%04" PRIx16 " at index: %d.", function, utf16_string[ 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 required_flags = 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 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_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_FLAG_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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '{'; } 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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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 from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf32_string( libfguid_identifier_t *identifier, const uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_from_utf32_string"; size_t utf32_string_index = 0; if( libfguid_identifier_copy_from_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 from UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_utf32_string_with_index( libfguid_identifier_t *identifier, const uint32_t *utf32_string, size_t utf32_string_length, 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_from_utf32_string_with_index"; size_t byte_index = 0; size_t node_index = 0; size_t string_index = 0; size_t string_length = 0; uint32_t required_flags = 0; 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 ); } 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 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 index.", function ); return( -1 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES; 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_length = 36; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { string_length += 2; } string_index = *utf32_string_index; if( ( string_index + string_length ) > utf32_string_length ) { 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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf32_string[ string_index ] != (uint32_t) '{' ) { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 8; byte_index++ ) { internal_identifier->time.lower <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->time.lower |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->time.lower |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->time.lower |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf32_string[ string_index ] != (uint32_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.middle <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->time.middle |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->time.middle |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->time.middle |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf32_string[ string_index ] != (uint32_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 4; byte_index++ ) { internal_identifier->time.upper <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->time.upper |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->time.upper |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->time.upper |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf32_string[ string_index ] != (uint32_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.upper <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->clock_sequence.upper |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->clock_sequence.upper |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->clock_sequence.upper |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } for( byte_index = 0; byte_index < 2; byte_index++ ) { internal_identifier->clock_sequence.lower <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->clock_sequence.lower |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->clock_sequence.lower |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->clock_sequence.lower |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } if( utf32_string[ string_index ] != (uint32_t) '-' ) { goto on_error; } string_index++; for( byte_index = 0; byte_index < 12; byte_index++ ) { node_index = byte_index / 2; internal_identifier->node[ node_index ] <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { internal_identifier->node[ node_index ] |= utf32_string[ string_index ] - (uint32_t) '0'; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { internal_identifier->node[ node_index ] |= utf32_string[ string_index ] - (uint32_t) 'a' + 10; } else if( ( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE ) != 0 ) && ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { internal_identifier->node[ node_index ] |= utf32_string[ string_index ] - (uint32_t) 'A' + 10; } else { goto on_error; } string_index++; } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { if( utf32_string[ string_index ] != (uint32_t) '}' ) { goto on_error; } string_index++; } *utf32_string_index = string_index; return( 1 ); on_error: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%08" PRIx32 " at index: %d.", function, utf32_string[ 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 required_flags = 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 ); } required_flags = LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE; if( ( string_format_flags & required_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing string format flags.", function ); return( -1 ); } supported_flags = required_flags | LIBFGUID_STRING_FORMAT_FLAG_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_FLAG_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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '{'; } 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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_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_FLAG_USE_SURROUNDING_BRACES ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '}'; } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } libesedb-20240420/libfguid/libfguid_support.c0000644000175000017500000000215614610746240021702 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfguid/libfguid_definitions.h0000644000175000017500000000444514610746240022511 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240415 /* The version string */ #define LIBFGUID_VERSION_STRING "20240415" /* 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_FLAG_USE_LOWER_CASE = 0x00000001UL, /* Format the using upper case */ LIBFGUID_STRING_FORMAT_FLAG_USE_UPPER_CASE = 0x00000002UL, /* Format the using mixed case */ LIBFGUID_STRING_FORMAT_FLAG_USE_MIXED_CASE = 0x00000003UL, /* Format the using surrounding braces { GUID } */ LIBFGUID_STRING_FORMAT_FLAG_USE_SURROUNDING_BRACES = 0x00000004UL }; #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( LIBFGUID_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfguid/Makefile.in0000644000175000017500000007350514610746265020237 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_libcerror.h libfguid_identifier.c \ libfguid_identifier.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) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFGUID_TRUE@am_libfguid_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfguid_error.Plo \ ./$(DEPDIR)/libfguid_identifier.Plo \ ./$(DEPDIR)/libfguid_support.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfguid_la_SOURCES) DIST_SOURCES = $(am__libfguid_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCERROR_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_libcerror.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_identifier.c libfguid_identifier.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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfguid.la: $(libfguid_la_OBJECTS) $(libfguid_la_DEPENDENCIES) $(EXTRA_libfguid_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_support.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfguid_error.Plo -rm -f ./$(DEPDIR)/libfguid_identifier.Plo -rm -f ./$(DEPDIR)/libfguid_support.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfguid_error.Plo -rm -f ./$(DEPDIR)/libfguid_identifier.Plo -rm -f ./$(DEPDIR)/libfguid_support.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfguid/libfguid_error.h0000644000175000017500000000340314610746240021320 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( HAVE_LOCAL_LIBFGUID ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFGUID_INTERNAL_ERROR_H ) */ libesedb-20240420/m4/0000755000175000017500000000000014610746412014705 5ustar00lordyestalordyestalibesedb-20240420/m4/libfwnt.m40000644000175000017500000002152014610727254016617 0ustar00lordyestalordyestadnl Checks for libfwnt required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfwnt" = xno], [ac_cv_libfwnt=no], [ac_cv_libfwnt=check dnl Check if the directory provided as parameter exists dnl For both --with-libfwnt which returns "yes" and --with-libfwnt= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfwnt], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfwnt], [libfwnt >= 20191217], [ac_cv_libfwnt=yes], [ac_cv_libfwnt=check]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [ac_cv_libfwnt_CPPFLAGS="$pkg_cv_libfwnt_CFLAGS" ac_cv_libfwnt_LIBADD="$pkg_cv_libfwnt_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xcheck], [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 Security descriptor functions AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_initialize, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_free, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_copy_from_byte_stream, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_get_owner, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_get_group, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_get_discretionary_acl, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_descriptor_get_system_acl, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl Security identifier (SID) functions AC_CHECK_LIB( fwnt, libfwnt_security_identifier_initialize, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_free, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_from_byte_stream, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_get_string_size, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf8_string, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf8_string_with_index, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf16_string, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf16_string_with_index, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf32_string, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_security_identifier_copy_to_utf32_string_with_index, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl Access control list (ACL) functions AC_CHECK_LIB( fwnt, libfwnt_access_control_list_free, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_list_get_number_of_entries, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_list_get_entry_by_index, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl Access control entry (ACE) functions AC_CHECK_LIB( fwnt, libfwnt_access_control_entry_free, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_entry_get_type, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_entry_get_flags, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_entry_get_access_mask, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_access_control_entry_get_security_identifier, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl LZNT1 functions AC_CHECK_LIB( fwnt, libfwnt_lznt1_decompress, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl LZXPRESS functions AC_CHECK_LIB( fwnt, libfwnt_lzx_decompress, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl LZXPRESS functions AC_CHECK_LIB( fwnt, libfwnt_lzxpress_decompress, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) AC_CHECK_LIB( fwnt, libfwnt_lzxpress_huffman_decompress, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) ac_cv_libfwnt_LIBADD="-lfwnt"]) ]) AS_IF( [test "x$ac_cv_libfwnt" != xyes && test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes], [AC_MSG_FAILURE( [unable to find supported libfwnt in directory: $ac_cv_with_libfwnt], [1]) ]) ]) 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 if libfwnt dependencies are available AC_DEFUN([AX_LIBFWNT_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfwnt_CPPFLAGS="-I../libfwnt -I\$(top_srcdir)/libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local ]) 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], [AX_LIBFWNT_CHECK_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]) ]) ]) libesedb-20240420/m4/libcfile.m40000644000175000017500000002672614610727254016740 0ustar00lordyestalordyestadnl Checks for libcfile required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcfile" = xno], [ac_cv_libcfile=no], [ac_cv_libcfile=check dnl Check if the directory provided as parameter exists dnl For both --with-libcfile which returns "yes" and --with-libcfile= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libcfile], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcfile], [libcfile >= 20160409], [ac_cv_libcfile=yes], [ac_cv_libcfile=check]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes && test "x$ac_cv_enable_wide_character_type" != xno], [AC_CACHE_CHECK( [whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1], [ac_cv_header_libcfile_features_h_have_wide_character_type], [AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCFILE_HAVE_WIDE_CHARACTER_TYPE not defined #endif]] )], [ac_cv_header_libcfile_features_h_have_wide_character_type=yes], [ac_cv_header_libcfile_features_h_have_wide_character_type=no]) AC_LANG_POP(C)], [ac_cv_header_libcfile_features_h_have_wide_character_type=no]) AS_IF( [test "x$ac_cv_header_libcfile_features_h_have_wide_character_type" = xno], [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"]) ]) AS_IF( [test "x$ac_cv_libcfile" = xcheck], [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_open_with_error_code, [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_read_buffer_with_error_code, [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_write_buffer_with_error_code, [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]) AC_CHECK_LIB( cfile, libcfile_file_is_device, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_io_control_read, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_io_control_read_with_error_code, [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]) AC_CHECK_LIB( cfile, libcfile_file_open_wide_with_error_code, [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]) AC_CHECK_LIB( cfile, libcfile_file_remove, [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_CHECK_LIB( cfile, libcfile_file_remove_wide, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) ]) ac_cv_libcfile_LIBADD="-lcfile"]) ]) AS_IF( [test "x$ac_cv_libcfile" != xyes && test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes], [AC_MSG_FAILURE( [unable to find supported libcfile in directory: $ac_cv_with_libcfile], [1]) ]) ]) 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 posix_fadvise is available AC_DEFUN([AX_LIBCFILE_CHECK_FUNC_POSIX_FADVISE], [AC_CHECK_FUNCS([posix_fadvise]) AS_IF( [test "x$ac_cv_func_posix_fadvise" = xyes], [AC_MSG_CHECKING( [whether posix_fadvise can be linked]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( POSIX_FADV_SEQUENTIAL ) #define POSIX_FADV_SEQUENTIAL 2 #endif posix_fadvise( 0, 0, 0, POSIX_FADV_SEQUENTIAL )]] )], [ac_cv_func_posix_fadvise=yes], [ac_cv_func_posix_fadvise=no]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_func_posix_fadvise" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( [HAVE_POSIX_FADVISE], [1], [Define to 1 if you have the posix_fadvise function.]) ], [AC_MSG_RESULT( [no]) ]) ]) ]) dnl Function to detect if libcfile dependencies are available AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [dnl Headers included in libcfile/libcfile_file.c and libcfile/libcfile_support.c AC_CHECK_HEADERS([errno.h stdio.h sys/stat.h]) dnl Headers included in libcfile/libcfile_file.c AC_CHECK_HEADERS([cygwin/fs.h fcntl.h linux/fs.h sys/disk.h sys/disklabel.h sys/ioctl.h unistd.h]) dnl File input/output functions used in libcfile/libcfile_file.c AC_CHECK_FUNCS([close fstat ftruncate ioctl lseek open read write]) AS_IF( [test "x$ac_cv_func_close" != xyes], [AC_MSG_FAILURE( [Missing function: close], [1]) ]) AX_LIBCFILE_CHECK_FUNC_POSIX_FADVISE 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_enable_winapi" = xno], [AS_IF( [test "x$ac_cv_func_ioctl" != xyes], [AC_MSG_FAILURE( [Missing function: ioctl], [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 input/output functions used in libcfile/libcfile_support.c AC_CHECK_FUNCS([stat unlink]) AS_IF( [test "x$ac_cv_func_stat" != xyes], [AC_MSG_FAILURE( [Missing function: stat], [1]) ]) AS_IF( [test "x$ac_cv_func_unlink" != xyes], [AC_MSG_FAILURE( [Missing function: unlink], [1]) ]) ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/libfdatetime.m40000644000175000017500000004407114610727254017611 0ustar00lordyestalordyestadnl Checks for libfdatetime required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdatetime" = xno], [ac_cv_libfdatetime=no], [ac_cv_libfdatetime=check dnl Check if the directory provided as parameter exists dnl For both --with-libfdatetime which returns "yes" and --with-libfdatetime= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfdatetime], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdatetime], [libfdatetime >= 20180910], [ac_cv_libfdatetime=yes], [ac_cv_libfdatetime=check]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xcheck], [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_32bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_32bit, [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_64bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_64bit, [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_64bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_64bit, [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 HFS time functions AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_from_32bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_32bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_hfs_time_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_64bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_64bit, [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_32bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_32bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_from_64bit, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_64bit, [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_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 && test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes], [AC_MSG_FAILURE( [unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime], [1]) ]) ]) 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 if libfdatetime dependencies are available AC_DEFUN([AX_LIBFDATETIME_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime -I\$(top_srcdir)/libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local ]) 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], [AX_LIBFDATETIME_CHECK_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]) ]) ]) libesedb-20240420/m4/tests.m40000644000175000017500000000136414533041722016311 0ustar00lordyestalordyestadnl Functions for testing dnl dnl Version: 20200712 dnl Function to detect if tests dependencies are available AC_DEFUN([AX_TESTS_CHECK_LOCAL], [AC_CHECK_HEADERS([dlfcn.h]) AC_CHECK_FUNCS([fmemopen getopt mkstemp setenv tzset unlink]) AC_CHECK_LIB( dl, dlsym) AS_IF( [test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes], [AC_DEFINE( [HAVE_GNU_DL_DLSYM], [1], [Define to 1 if dlsym function is available in GNU dl.]) ]) ]) dnl Function to detect if OSS-Fuzz build environment is available AC_DEFUN([AX_TESTS_CHECK_OSSFUZZ], [AM_CONDITIONAL( HAVE_LIB_FUZZING_ENGINE, [test "x${LIB_FUZZING_ENGINE}" != x]) AC_SUBST( [LIB_FUZZING_ENGINE], ["${LIB_FUZZING_ENGINE}"]) ]) libesedb-20240420/m4/libcpath.m40000644000175000017500000002261714610727254016750 0ustar00lordyestalordyestadnl Checks for libcpath required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcpath" = xno], [ac_cv_libcpath=no], [ac_cv_libcpath=check dnl Check if the directory provided as parameter exists dnl For both --with-libcpath which returns "yes" and --with-libcpath= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libcpath], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcpath], [libcpath >= 20180716], [ac_cv_libcpath=yes], [ac_cv_libcpath=check]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes && test "x$ac_cv_enable_wide_character_type" != xno], [AC_CACHE_CHECK( [whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1], [ac_cv_header_libcpath_features_h_have_wide_character_type], [AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCPATH_HAVE_WIDE_CHARACTER_TYPE not defined #endif]] )], [ac_cv_header_libcpath_features_h_have_wide_character_type=yes], [ac_cv_header_libcpath_features_h_have_wide_character_type=no]) AC_LANG_POP(C)], [ac_cv_header_libcpath_features_h_have_wide_character_type=no]) AS_IF( [test "x$ac_cv_header_libcpath_features_h_have_wide_character_type" = xno], [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"]) ]) AS_IF( [test "x$ac_cv_libcpath" = xcheck], [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_get_sanitized_filename, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_sanitized_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]) 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_get_sanitized_filename_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_sanitized_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_cv_libcpath_LIBADD="-lcpath"]) ]) AS_IF( [test "x$ac_cv_libcpath" != xyes && test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes], [AC_MSG_FAILURE( [unable to find supported libcpath in directory: $ac_cv_with_libcpath], [1]) ]) ]) 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 -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/lib-prefix.m40000644000175000017500000002725014533041722017212 0ustar00lordyestalordyesta# lib-prefix.m4 serial 17 dnl Copyright (C) 2001-2005, 2008-2020 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_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_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 dnl - a function acl_is_expected_elfclass, that tests whether standard input dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing dnl the basename of the libdir to try in turn, either "lib" or "lib64" or dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib, lib32, and lib64. dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. dnl We determine the compiler's default mode by looking at the compiler's dnl library search path. If at least one of its elements ends in /lib64 or dnl points to a directory whose absolute pathname ends in /lib64, we use that dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], [#ifdef __ELF__ Extensible Linking Format #endif ], [gl_cv_elf=yes], [gl_cv_elf=no]) ]) if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac changequote([,])dnl else acl_is_expected_elfclass () { : } fi dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], [dnl Try 'lib' first, because that's the default for libdir in GNU, see dnl . acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. dnl Find the compiler's search path. However, non-system compilers dnl sometimes have odd library search paths. But we can't simply invoke dnl '/usr/bin/gcc -print-search-dirs' because that would not take into dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ]) dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and dnl acl_libdirstem3. changequote(,)dnl acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` changequote([,])dnl ]) libesedb-20240420/m4/progtest.m40000644000175000017500000000602214533041722017012 0ustar00lordyestalordyesta# progtest.m4 serial 8 (gettext-0.20.2) dnl Copyright (C) 1996-2003, 2005, 2008-2020 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 be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser 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 Lesser General Public License, and the rest of the GNU dnl gettext 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 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. 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 # 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 ]) libesedb-20240420/m4/libuna.m40000644000175000017500000007540714610727254016441 0ustar00lordyestalordyestadnl Checks for libuna or required headers and functions dnl dnl Version: 20240413 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], [AC_CACHE_CHECK( [if `$1' is defined], [$2], [AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int test = $1; return( 0 ); ]] )], [$2=yes], [$2=no]) AC_LANG_POP(C)]) ]) dnl Function to detect if libuna is available dnl ac_libuna_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBUNA_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libuna" = xno], [ac_cv_libuna=no], [ac_cv_libuna=check dnl Check if the directory provided as parameter exists dnl For both --with-libuna which returns "yes" and --with-libuna= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libuna], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libuna], [libuna >= 20230702], [ac_cv_libuna=yes], [ac_cv_libuna=check]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS"]) ]) AS_IF( [test "x$ac_cv_libuna" = xcheck], [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 Unicode character functions AC_CHECK_LIB( una, libuna_unicode_character_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_size_to_ucs2, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_ucs2, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_ucs2, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_size_to_ucs4, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_ucs4, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_ucs4, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_size_to_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_size_to_utf8_rfc2279, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf8_rfc2279, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf8_rfc2279, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_size_to_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_unicode_character_copy_to_utf32_stream, [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_compare_with_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_compare_with_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_compare_with_utf8_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_compare_with_utf16, [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_compare_with_utf16_stream, [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]) AC_CHECK_LIB( una, libuna_utf8_string_compare_with_utf32, [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_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_scsu_stream, [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_compare_with_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_compare_with_utf7_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]) dnl libuna_utf16_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf16 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_compare_with_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_compare_with_utf16_stream, [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]) AC_CHECK_LIB( una, libuna_utf16_string_compare_with_utf32, [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_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_scsu_stream, [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_compare_with_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_compare_with_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_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]) dnl libuna_utf32_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf32 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_compare_with_utf8_stream, [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]) dnl libuna_utf32_string_compare_with_utf16 is implemented by libuna_utf16_string_compare_with_utf32 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_compare_with_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_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_scsu_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Check for definitions AX_LIBUNA_CHECK_DEFINITION( LIBUNA_COMPARE_LESS, [ac_cv_libuna_defines_compare_less]) AS_IF( [test "x$ac_cv_libuna_defines_compare_less" != xyes], [ac_cv_libuna=no]) AX_LIBUNA_CHECK_DEFINITION( LIBUNA_COMPARE_EQUAL, [ac_cv_libuna_defines_compare_equal]) AS_IF( [test "x$ac_cv_libuna_defines_compare_less" != xyes], [ac_cv_libuna=no]) AX_LIBUNA_CHECK_DEFINITION( LIBUNA_COMPARE_GREATER, [ac_cv_libuna_defines_compare_greater]) AS_IF( [test "x$ac_cv_libuna_defines_compare_less" != xyes], [ac_cv_libuna=no]) AX_LIBUNA_CHECK_DEFINITION( LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE, [ac_cv_libuna_defines_compare_greater]) AS_IF( [test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes], [ac_cv_libuna=no]) ac_cv_libuna_LIBADD="-luna"]) ]) AS_IF( [test "x$ac_cv_libuna" != xyes && test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes], [AC_MSG_FAILURE( [unable to find supported libuna in directory: $ac_cv_with_libuna], [1]) ]) ]) 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 if libuna dependencies are available AC_DEFUN([AX_LIBUNA_CHECK_LOCAL], [dnl No additional checks. ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local ]) 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], [AX_LIBUNA_CHECK_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]) ]) ]) libesedb-20240420/m4/gettext.m40000644000175000017500000003423014533041722016631 0ustar00lordyestalordyesta# gettext.m4 serial 71 (gettext-0.20.2) dnl Copyright (C) 1995-2014, 2016, 2018-2020 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 be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser 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 Lesser General Public License, and the rest of the GNU dnl gettext 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, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL must be one of 'external', 'use-libtool'. dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. 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). 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], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. ])]) 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], [no], [yes])) 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 not documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS 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_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [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_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [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_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [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.la $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $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 In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' dnl because some of the testsuite requires it. BUILD_INCLUDED_LIBINTL=yes 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 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], []) dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) libesedb-20240420/m4/lib-ld.m40000644000175000017500000001237214533041722016313 0ustar00lordyestalordyesta# lib-ld.m4 serial 9 dnl Copyright (C) 1996-2003, 2009-2020 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/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.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 lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then AC_MSG_CHECKING([for ld]) elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi if test -n "$LD"; then # Let the user override the test with a path. : else AC_CACHE_VAL([acl_cv_path_LD], [ acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" 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 variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 arguments AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libclocale" = xno], [ac_cv_libclocale=no], [ac_cv_libclocale=check dnl Check if the directory provided as parameter exists dnl For both --with-libclocale which returns "yes" and --with-libclocale= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libclocale], [1]) ]) ], [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=check]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes && test "x$ac_cv_enable_wide_character_type" != xno], [AC_CACHE_CHECK( [whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1], [ac_cv_header_libclocale_features_h_have_wide_character_type], [AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE not defined #endif]] )], [ac_cv_header_libclocale_features_h_have_wide_character_type=yes], [ac_cv_header_libclocale_features_h_have_wide_character_type=no]) AC_LANG_POP(C)], [ac_cv_header_libclocale_features_h_have_wide_character_type=no]) AS_IF( [test "x$ac_cv_header_libclocale_features_h_have_wide_character_type" = xno], [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"]) ]) AS_IF( [test "x$ac_cv_libclocale" = xcheck], [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 && test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes], [AC_MSG_FAILURE( [unable to find supported libclocale in directory: $ac_cv_with_libclocale], [1]) ]) ]) 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 -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/libcdata.m40000644000175000017500000004174714610727254016732 0ustar00lordyestalordyestadnl Checks for libcdata required headers and functions dnl dnl Version: 20240413 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCDATA_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcdata" = xno], [ac_cv_libcdata=no], [ac_cv_libcdata=check dnl Check if the directory provided as parameter exists dnl For both --with-libcdata which returns "yes" and --with-libcdata= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], [AS_IF( [test -d "$ac_cv_with_libcdata"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdata}/lib"], [AC_MSG_FAILURE( [no such directory: $ac_cv_with_libcdata], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcdata], [libcdata >= 20230108], [ac_cv_libcdata=yes], [ac_cv_libcdata=check]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [ac_cv_libcdata_CPPFLAGS="$pkg_cv_libcdata_CFLAGS" ac_cv_libcdata_LIBADD="$pkg_cv_libcdata_LIBS"]) ]) AS_IF( [test "x$ac_cv_libcdata" = xcheck], [dnl Check for headers AC_CHECK_HEADERS([libcdata.h]) AS_IF( [test "x$ac_cv_header_libcdata_h" = xno], [ac_cv_libcdata=no], [dnl Check for the individual functions ac_cv_libcdata=yes AC_CHECK_LIB( cdata, libcdata_get_version, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) dnl Array functions AC_CHECK_LIB( cdata, libcdata_array_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_empty, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_clone, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_resize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_reverse, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_get_number_of_entries, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_get_entry_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_get_entry_by_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_set_entry_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_prepend_entry, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_append_entry, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_insert_entry, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_array_remove_entry, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) dnl Balanced tree functions AC_CHECK_LIB( cdata, libcdata_btree_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_get_number_of_values, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_get_value_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_get_value_by_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_insert_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_replace_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_btree_remove_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) dnl List functions AC_CHECK_LIB( cdata, libcdata_list_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_empty, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_clone, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_get_number_of_elements, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_get_first_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_get_last_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_get_element_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_get_value_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_prepend_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_prepend_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_append_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_append_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_insert_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_insert_element_with_existing, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_insert_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_insert_value_with_existing, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_remove_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) dnl List element functions AC_CHECK_LIB( cdata, libcdata_list_element_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_get_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_set_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_get_previous_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_set_previous_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_get_next_element, [ac_cv_libcdata_dummy=yes], AC_CHECK_LIB( cdata, libcdata_list_element_set_next_element, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_get_elements, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_list_element_set_elements, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) [ac_cv_libcdata=no]) dnl Range list functions AC_CHECK_LIB( cdata, libcdata_range_list_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_empty, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_clone, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_get_number_of_elements, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_insert_range, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_insert_range_list, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_remove_range, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_get_range_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_get_range_at_offset, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_range_is_present, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_range_has_overlapping_range, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_range_list_get_spanning_range, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) dnl Tree node functions AC_CHECK_LIB( cdata, libcdata_tree_node_initialize, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_free, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_empty, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_clone, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_set_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_parent_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_set_parent_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_previous_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_set_previous_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_next_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_set_next_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_nodes, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_set_nodes, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_append_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_append_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_insert_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_insert_value, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_replace_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_remove_node, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_number_of_sub_nodes, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_sub_node_by_index, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) AC_CHECK_LIB( cdata, libcdata_tree_node_get_leaf_node_list, [ac_cv_libcdata_dummy=yes], [ac_cv_libcdata=no]) ac_cv_libcdata_LIBADD="-lcdata"]) ]) AS_IF( [test "x$ac_cv_libcdata" != xyes && test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes], [AC_MSG_FAILURE( [unable to find supported libcdata in directory: $ac_cv_with_libcdata], [1]) ]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [AC_DEFINE( [HAVE_LIBCDATA], [1], [Define to 1 if you have the `cdata' library (-lcdata).]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [AC_SUBST( [HAVE_LIBCDATA], [1]) ], [AC_SUBST( [HAVE_LIBCDATA], [0]) ]) ]) dnl Function to detect if libcdata dependencies are available AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL], [dnl No additional checks. ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local ]) dnl Function to detect how to enable libcdata AC_DEFUN([AX_LIBCDATA_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcdata], [libcdata], [search for libcdata 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_LIBCDATA_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcdata" != xyes], [AX_LIBCDATA_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCDATA], [1], [Define to 1 if the local version of libcdata is used.]) AC_SUBST( [HAVE_LOCAL_LIBCDATA], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCDATA], [test "x$ac_cv_libcdata" = xlocal]) AS_IF( [test "x$ac_cv_libcdata_CPPFLAGS" != "x"], [AC_SUBST( [LIBCDATA_CPPFLAGS], [$ac_cv_libcdata_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcdata_LIBADD" != "x"], [AC_SUBST( [LIBCDATA_LIBADD], [$ac_cv_libcdata_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [AC_SUBST( [ax_libcdata_pc_libs_private], [-lcdata]) ]) AS_IF( [test "x$ac_cv_libcdata" = xyes], [AC_SUBST( [ax_libcdata_spec_requires], [libcdata]) AC_SUBST( [ax_libcdata_spec_build_requires], [libcdata-devel]) ]) ]) libesedb-20240420/m4/libcsplit.m40000644000175000017500000001671114610727254017145 0ustar00lordyestalordyestadnl Checks for libcsplit required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcsplit" = xno], [ac_cv_libcsplit=no], [ac_cv_libcsplit=check dnl Check if the directory provided as parameter exists dnl For both --with-libcsplit which returns "yes" and --with-libcsplit= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libcsplit], [1]) ]) ], [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=check]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes && test "x$ac_cv_enable_wide_character_type" != xno], [AC_CACHE_CHECK( [whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1], [ac_cv_header_libcsplit_features_h_have_wide_character_type], [AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE not defined #endif]] )], [ac_cv_header_libcsplit_features_h_have_wide_character_type=yes], [ac_cv_header_libcsplit_features_h_have_wide_character_type=no]) AC_LANG_POP(C)], [ac_cv_header_libcsplit_features_h_have_wide_character_type=no]) AS_IF( [test "x$ac_cv_header_libcsplit_features_h_have_wide_character_type" = xno], [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"]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xcheck], [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 && test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes], [AC_MSG_FAILURE( [unable to find supported libcsplit in directory: $ac_cv_with_libcsplit], [1]) ]) ]) 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 if libcsplit dependencies are available AC_DEFUN([AX_LIBCSPLIT_CHECK_LOCAL], [dnl No additional checks. ac_cv_libcsplit_CPPFLAGS="-I../libcsplit -I\$(top_srcdir)/libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local ]) 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], [AX_LIBCSPLIT_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCSPLIT], [1], [Define to 1 if the local version of libcsplit is used.]) AC_SUBST( [HAVE_LOCAL_LIBCSPLIT], [1]) ]) 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]) ]) ]) libesedb-20240420/m4/common.m40000644000175000017500000003345714610727254016456 0ustar00lordyestalordyestadnl Checks for common headers and functions dnl dnl Version: 20240308 dnl Function to test if a certain feature was disabled AC_DEFUN([AX_COMMON_ARG_DISABLE], [ AC_ARG_ENABLE( [$1], [AS_HELP_STRING( [--disable-$1], [$3])], [ac_cv_enable_$2=$enableval], [ac_cv_enable_$2="yes"])dnl AC_CACHE_CHECK( [whether to disable $3], [ac_cv_enable_$2], [ac_cv_enable_$2="yes"])dnl ]) dnl Function to test if a certain feature was enabled AC_DEFUN([AX_COMMON_ARG_ENABLE], [ AC_ARG_ENABLE( [$1], [AS_HELP_STRING( [--enable-$1], [$3 @<:@default=$4@:>@])], [ac_cv_enable_$2=$enableval], [ac_cv_enable_$2=$4])dnl AC_CACHE_CHECK( [whether to enable $3], [ac_cv_enable_$2], [ac_cv_enable_$2=$4])dnl ]) dnl Function to test if the location of a certain feature was provided AC_DEFUN([AX_COMMON_ARG_WITH], [ AC_ARG_WITH( [$1], [AS_HELP_STRING( [--with-$1[[=$5]]], [$3 @<:@default=$4@:>@])], [ac_cv_with_$2=$withval], [ac_cv_with_$2=$4])dnl AC_CACHE_CHECK( [whether to use $3], [ac_cv_with_$2], [ac_cv_with_$2=$4])dnl ]) dnl Function to detect whether shared libary support should be disabled AC_DEFUN([AX_COMMON_CHECK_DISABLE_SHARED_LIBS], [ AX_COMMON_ARG_DISABLE( [shared-libs], [shared_libs], [disable shared library support]) ]) dnl Function to detect whether debug output should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT], [ AX_COMMON_ARG_ENABLE( [debug-output], [debug_output], [enable debug output], [no]) AS_IF( [test "x$ac_cv_enable_debug_output" != xno ], [AC_DEFINE( [HAVE_DEBUG_OUTPUT], [1], [Define to 1 if debug output should be used.]) ac_cv_enable_debug_output=yes]) ]) dnl Function to detect whether static executables support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES], [ AX_COMMON_ARG_ENABLE( [static-executables], [static_executables], [build static executables (binaries)], [no]) AS_IF( [test "x$ac_cv_enable_static_executables" != xno], [STATIC_LDFLAGS="-all-static"; AC_SUBST( [STATIC_LDFLAGS]) ac_cv_enable_static_executables=yes enable_shared=no]) ]) dnl Function to detect whether verbose output should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT], [ AX_COMMON_ARG_ENABLE( [verbose-output], [verbose_output], [enable verbose output], [no]) AS_IF( [test "x$ac_cv_enable_verbose_output" != xno ], [AC_DEFINE( [HAVE_VERBOSE_OUTPUT], [1], [Define to 1 if verbose output should be used.]) ac_cv_enable_verbose_output=yes]) ]) dnl Function to detect whether static executables support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE], [ AX_COMMON_ARG_ENABLE( [wide-character-type], [wide_character_type], [enable wide character type support], [no]) ]) dnl Function to detect whether WINAPI support should be enabled AC_DEFUN([AX_COMMON_CHECK_ENABLE_WINAPI], [ AX_COMMON_ARG_ENABLE( [winapi], [winapi], [enable WINAPI support for cross-compilation], [auto-detect]) AS_IF( [test "x$ac_cv_enable_winapi" = xauto-detect], [ac_common_check_winapi_target_string="$target" AS_IF( [test "x$ac_common_check_winapi_target_string" = x], [ac_common_check_winapi_target_string="$host"]) AS_CASE( [$ac_common_check_winapi_target_string], [*mingw*],[AC_MSG_NOTICE( [detected MinGW enabling WINAPI support for cross-compilation]) ac_cv_enable_winapi=yes], [*msys*],[AC_MSG_NOTICE( [detected MSYS enabling WINAPI support for cross-compilation]) ac_cv_enable_winapi=yes], [*],[ac_cv_enable_winapi=no]) ]) ]) dnl Function to detect whether printf conversion specifier "%jd" is available AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_JD], [ AC_MSG_CHECKING( [whether printf supports the conversion specifier "%jd"]) 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( "%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 and common/narrow_string.h AC_CHECK_HEADERS([stdlib.h string.h]) dnl Headers included in common/wide_string.h AC_CHECK_HEADERS([wchar.h wctype.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 Narrow character string functions used in common/narrow_string.h AC_CHECK_FUNCS([memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf]) 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 && test "x$ac_cv_func_strnicmp" != xyes], [AC_MSG_FAILURE( [Missing functions: strncasecmp, strcasecmp and strnicmp], [1]) ]) AS_IF( [test "x$ac_cv_func_strstr" != xyes], [AC_MSG_FAILURE( [Missing function: strstr], [1]) ]) AS_IF( [test "x$ac_cv_func_vsnprintf" != xyes], [AC_MSG_FAILURE( [Missing function: vsnprintf], [1]) ]) dnl Wide character string functions used in common/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 wcsnicmp 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_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes], [AC_MSG_FAILURE( [Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower], [1]) ]) AS_IF( [test "x$ac_cv_func_wcsstr" != xyes], [AC_MSG_FAILURE( [Missing function: wcsstr], [1]) ]) ]) dnl Check for printf conversion specifier support AX_COMMON_CHECK_FUNC_PRINTF_JD AX_COMMON_CHECK_FUNC_PRINTF_ZD ]) libesedb-20240420/m4/libcthreads.m40000644000175000017500000002614214610727254017443 0ustar00lordyestalordyestadnl Checks for libcthreads required headers and functions dnl dnl Version: 20240413 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCTHREADS_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcthreads" = xno], [ac_cv_libcthreads=no], [ac_cv_libcthreads=check dnl Check if the directory provided as parameter exists dnl For both --with-libcthreads which returns "yes" and --with-libcthreads= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], [AS_IF( [test -d "$ac_cv_with_libcthreads"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcthreads}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcthreads}/lib"], [AC_MSG_FAILURE( [no such directory: $ac_cv_with_libcthreads], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcthreads], [libcthreads >= 20160404], [ac_cv_libcthreads=yes], [ac_cv_libcthreads=check]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [ac_cv_libcthreads_CPPFLAGS="$pkg_cv_libcthreads_CFLAGS" ac_cv_libcthreads_LIBADD="$pkg_cv_libcthreads_LIBS"]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xcheck], [dnl Check for headers AC_CHECK_HEADERS([libcthreads.h]) AS_IF( [test "x$ac_cv_header_libcthreads_h" = xno], [ac_cv_libcthreads=no], [dnl Check for the individual functions ac_cv_libcthreads=yes AC_CHECK_LIB( cthreads, libcthreads_get_version, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Thread functions AC_CHECK_LIB( cthreads, libcthreads_thread_create, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_thread_join, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Thread attributes functions AC_CHECK_LIB( cthreads, libcthreads_thread_attributes_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_thread_attributes_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Condition functions AC_CHECK_LIB( cthreads, libcthreads_condition_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_condition_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_condition_broadcast, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_condition_signal, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_condition_wait, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Lock functions AC_CHECK_LIB( cthreads, libcthreads_lock_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_lock_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_lock_grab, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_lock_release, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Mutex functions AC_CHECK_LIB( cthreads, libcthreads_mutex_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_mutex_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_mutex_grab, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_mutex_try_grab, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_mutex_release, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Read/Write lock functions AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_grab_for_read, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_grab_for_write, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_release_for_read, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_read_write_lock_release_for_write, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Queue functions AC_CHECK_LIB( cthreads, libcthreads_queue_initialize, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_free, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_type_pop, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_pop, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_try_push, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_push, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_queue_push_sorted, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) dnl Thread pool functions AC_CHECK_LIB( cthreads, libcthreads_thread_pool_create, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_thread_pool_push, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_thread_pool_push_sorted, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) AC_CHECK_LIB( cthreads, libcthreads_thread_pool_join, [ac_cv_libcthreads_dummy=yes], [ac_cv_libcthreads=no]) ac_cv_libcthreads_LIBADD="-lcthreads"]) ]) AS_IF( [test "x$ac_cv_libcthreads" != xyes && test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes], [AC_MSG_FAILURE( [unable to find supported libcthreads in directory: $ac_cv_with_libcthreads], [1]) ]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [AC_DEFINE( [HAVE_LIBCTHREADS], [1], [Define to 1 if you have the `cthreads' library (-lcthreads).]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [ac_cv_libcthreads_multi_threading=libcthreads], [ac_cv_libcthreads_multi_threading=no]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [AC_SUBST( [HAVE_LIBCTHREADS], [1]) ], [AC_SUBST( [HAVE_LIBCTHREADS], [0]) ]) ]) dnl Function to detect if libcthreads dependencies are available AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL], [AS_IF( [test "x$ac_cv_enable_winapi" = xno], [dnl Check for enabling pthread support AX_PTHREAD_CHECK_ENABLE ac_cv_libcthreads_multi_threading=$ac_cv_pthread], [ac_cv_libcthreads_multi_threading="winapi"]) AS_IF( [test "x$ac_cv_libcthreads_multi_threading" != xno], [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local], [ac_cv_libcthreads=no]) ]) dnl Function to detect how to enable libcthreads AC_DEFUN([AX_LIBCTHREADS_CHECK_ENABLE], [AX_COMMON_ARG_ENABLE( [multi-threading-support], [multi_threading_support], [enable multi-threading support], [yes]) AX_COMMON_ARG_WITH( [libcthreads], [libcthreads], [search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) AS_IF( [test "x$ac_cv_enable_multi_threading_support" = xno], [ac_cv_libcthreads="no" ac_cv_libcthreads_multi_threading="no"], [dnl Check for a shared library version AX_LIBCTHREADS_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcthreads" != xyes], [AX_LIBCTHREADS_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCTHREADS], [1], [Define to 1 if the local version of libcthreads is used.]) AC_SUBST( [HAVE_LOCAL_LIBCTHREADS], [1]) ]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCTHREADS], [test "x$ac_cv_libcthreads" = xlocal]) AS_IF( [test "x$ac_cv_libcthreads_CPPFLAGS" != "x"], [AC_SUBST( [LIBCTHREADS_CPPFLAGS], [$ac_cv_libcthreads_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcthreads_LIBADD" != "x"], [AC_SUBST( [LIBCTHREADS_LIBADD], [$ac_cv_libcthreads_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcthreads" != xno], [AC_DEFINE( [HAVE_MULTI_THREAD_SUPPORT], [1], [Define to 1 if multi thread support should be used.]) AC_SUBST( [HAVE_MULTI_THREAD_SUPPORT], [1]) ], [AC_SUBST( [HAVE_MULTI_THREAD_SUPPORT], [0]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [AC_SUBST( [ax_libcthreads_pc_libs_private], [-lcthreads]) ]) AS_IF( [test "x$ac_cv_libcthreads" = xyes], [AC_SUBST( [ax_libcthreads_spec_requires], [libcthreads]) AC_SUBST( [ax_libcthreads_spec_build_requires], [libcthreads-devel]) ]) ]) libesedb-20240420/m4/libmapidb.m40000644000175000017500000001032714610727254017100 0ustar00lordyestalordyestadnl Checks for libmapidb required headers and functions dnl dnl Version: 20240413 dnl Function to detect if libmapidb is available dnl ac_libmapidb_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBMAPIDB_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libmapidb" = xno], [ac_cv_libmapidb=no], [ac_cv_libmapidb=check dnl Check if the directory provided as parameter exists dnl For both --with-libmapidb which returns "yes" and --with-libmapidb= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libmapidb" != x && test "x$ac_cv_with_libmapidb" != xauto-detect && test "x$ac_cv_with_libmapidb" != xyes], [AS_IF( [test -d "$ac_cv_with_libmapidb"], [CFLAGS="$CFLAGS -I${ac_cv_with_libmapidb}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libmapidb}/lib"], [AC_MSG_FAILURE( [no such directory: $ac_cv_with_libmapidb], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libmapidb], [libmapidb >= 20120425], [ac_cv_libmapidb=yes], [ac_cv_libmapidb=check]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xyes], [ac_cv_libmapidb_CPPFLAGS="$pkg_cv_libmapidb_CFLAGS" ac_cv_libmapidb_LIBADD="$pkg_cv_libmapidb_LIBS"]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xcheck], [dnl Check for headers AC_CHECK_HEADERS([libmapidb.h]) AS_IF( [test "x$ac_cv_header_libmapidb_h" = xno], [ac_cv_libmapidb=no], [dnl Check for the individual functions ac_cv_libmapidb=yes AC_CHECK_LIB( mapidb, libmapidb_get_version, [ac_cv_libmapidb_dummy=yes], [ac_cv_libmapidb=no]) dnl TODO add functions ac_cv_libmapidb_LIBADD="-lmapidb"]) ]) AS_IF( [test "x$ac_cv_libmapidb" != xyes && test "x$ac_cv_with_libmapidb" != x && test "x$ac_cv_with_libmapidb" != xauto-detect && test "x$ac_cv_with_libmapidb" != xyes], [AC_MSG_FAILURE( [unable to find supported libmapidb in directory: $ac_cv_with_libmapidb], [1]) ]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xyes], [AC_DEFINE( [HAVE_LIBMAPIDB], [1], [Define to 1 if you have the `mapidb' library (-lmapidb).]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xyes], [AC_SUBST( [HAVE_LIBMAPIDB], [1]) ], [AC_SUBST( [HAVE_LIBMAPIDB], [0]) ]) ]) dnl Function to detect if libmapidb dependencies are available AC_DEFUN([AX_LIBMAPIDB_CHECK_LOCAL], [ac_cv_libmapidb_CPPFLAGS="-I../libmapidb -I\$(top_srcdir)/libmapidb"; ac_cv_libmapidb_LIBADD="../libmapidb/libmapidb.la"; ac_cv_libmapidb=local ]) dnl Function to detect how to enable libmapidb AC_DEFUN([AX_LIBMAPIDB_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libmapidb], [libmapidb], [search for libmapidb 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_LIBMAPIDB_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libmapidb" != xyes], [AX_LIBMAPIDB_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBMAPIDB], [1], [Define to 1 if the local version of libmapidb is used.]) AC_SUBST( [HAVE_LOCAL_LIBMAPIDB], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBMAPIDB], [test "x$ac_cv_libmapidb" = xlocal]) AS_IF( [test "x$ac_cv_libmapidb_CPPFLAGS" != "x"], [AC_SUBST( [LIBMAPIDB_CPPFLAGS], [$ac_cv_libmapidb_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libmapidb_LIBADD" != "x"], [AC_SUBST( [LIBMAPIDB_LIBADD], [$ac_cv_libmapidb_LIBADD]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xyes], [AC_SUBST( [ax_libmapidb_pc_libs_private], [-lmapidb]) ]) AS_IF( [test "x$ac_cv_libmapidb" = xyes], [AC_SUBST( [ax_libmapidb_spec_requires], [libmapidb]) AC_SUBST( [ax_libmapidb_spec_build_requires], [libmapidb-devel]) ]) ]) libesedb-20240420/m4/ltversion.m40000644000175000017500000000131214610746256017177 0ustar00lordyestalordyesta# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2019, 2021-2022 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 4245 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.7]) m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.7' macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libesedb-20240420/m4/ltsugar.m40000644000175000017500000001045314610746256016641 0ustar00lordyestalordyesta# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 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 ]) libesedb-20240420/m4/libfdata.m40000644000175000017500000003664514610727254016736 0ustar00lordyestalordyestadnl Functions for libfdata dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdata" = xno], [ac_cv_libfdata=no], [ac_cv_libfdata=check dnl Check if the directory provided as parameter exists dnl For both --with-libfdata which returns "yes" and --with-libfdata= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfdata], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdata], [libfdata >= 20201129], [ac_cv_libfdata=yes], [ac_cv_libfdata=check]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfdata" = xcheck], [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 Area functions AC_CHECK_LIB( fdata, libfdata_area_initialize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_free, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_clone, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_empty, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_resize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_get_number_of_segments, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_get_segment_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_set_segment_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_prepend_segment, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_append_segment, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_get_element_data_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_get_element_value_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_set_element_value_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_area_get_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl List functions AC_CHECK_LIB( fdata, libfdata_list_initialize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_free, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_clone, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_empty, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_resize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_reverse, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_number_of_elements, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_list_element_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_element_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_prepend_element, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_append_element, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_append_list, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_is_element_set, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_mapped_range, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_mapped_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_mapped_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_mapped_size_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_mapped_size_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_by_index_with_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_element_by_index_with_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_append_element_with_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_index_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_list_element_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_cache_element_value, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_value_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_element_value_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_element_value_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_set_element_value_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_get_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_get_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_set_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_get_element_value, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_set_element_value, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl List element functions AC_CHECK_LIB( fdata, libfdata_list_element_get_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_set_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_get_element_value, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_list_element_set_element_value, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl Range list functions dnl TODO: add functions dnl Stream functions AC_CHECK_LIB( fdata, libfdata_stream_initialize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_free, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_clone, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_empty, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_resize, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_reverse, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_number_of_segments, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_segment_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_set_segment_by_index, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_prepend_segment, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_append_segment, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_set_mapped_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_segment_mapped_range, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_segment_index_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_segment_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_read_buffer, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_read_buffer_at_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_write_buffer, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_seek_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_offset, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) AC_CHECK_LIB( fdata, libfdata_stream_get_size, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl Tree list functions dnl TODO: add functions dnl Vector list functions dnl TODO: add functions ac_cv_libfdata_LIBADD="-lfdata"]) ]) AS_IF( [test "x$ac_cv_libfdata" != xyes && test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes], [AC_MSG_FAILURE( [unable to find supported libfdata in directory: $ac_cv_with_libfdata], [1]) ]) ]) 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 if libfdata dependencies are available AC_DEFUN([AX_LIBFDATA_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfdata_CPPFLAGS="-I../libfdata -I\$(top_srcdir)/libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local ]) 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], [AX_LIBFDATA_CHECK_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]) ]) ]) libesedb-20240420/m4/host-cpu-c-abi.m40000644000175000017500000005364014533041722017666 0ustar00lordyestalordyesta# host-cpu-c-abi.m4 serial 13 dnl Copyright (C) 2002-2020 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 and Sam Steingold. dnl Sets the HOST_CPU variable to the canonical name of the CPU. dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its dnl C language ABI (application binary interface). dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in dnl config.h. dnl dnl This canonical name can be used to select a particular assembly language dnl source file that will interoperate with C code on the given host. dnl dnl For example: dnl * 'i386' and 'sparc' are different canonical names, because code for i386 dnl will not run on SPARC CPUs and vice versa. They have different dnl instruction sets. dnl * 'sparc' and 'sparc64' are different canonical names, because code for dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit dnl mode, but not both. dnl * 'mips' and 'mipsn32' are different canonical names, because they use dnl different argument passing and return conventions for C functions, and dnl although the instruction set of 'mips' is a large subset of the dnl instruction set of 'mipsn32'. dnl * 'mipsn32' and 'mips64' are different canonical names, because they use dnl different sizes for the C types like 'int' and 'void *', and although dnl the instruction sets of 'mipsn32' and 'mips64' are the same. dnl * The same canonical name is used for different endiannesses. You can dnl determine the endianness through preprocessor symbols: dnl - 'arm': test __ARMEL__. dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because dnl - Instructions that do not exist on all of these CPUs (cmpxchg, dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your dnl assembly language source files use such instructions, you will dnl need to make the distinction. dnl - Speed of execution of the common instruction set is reasonable across dnl the entire family of CPUs. If you have assembly language source files dnl that are optimized for particular CPU types (like GNU gmp has), you dnl will need to make the distinction. dnl See . AC_DEFUN([gl_HOST_CPU_C_ABI], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], [case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl gl_cv_host_cpu_c_abi=i386 ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=x86_64-x32], [gl_cv_host_cpu_c_abi=x86_64])], [gl_cv_host_cpu_c_abi=i386]) ;; changequote(,)dnl alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) changequote([,])dnl gl_cv_host_cpu_c_abi=alpha ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __aarch64__ int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=arm64-ilp32], [gl_cv_host_cpu_c_abi=arm64])], [# Don't distinguish little-endian and big-endian arm, since they # don't require different machine code for simple operations and # since the user can distinguish them through the preprocessor # defines __ARMEL__ vs. __ARMEB__. # But distinguish arm which passes floating-point arguments and # return values in integer registers (r0, r1, ...) - this is # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which # passes them in float registers (s0, s1, ...) and double registers # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer # sets the preprocessor defines __ARM_PCS (for the first case) and # __ARM_PCS_VFP (for the second case), but older GCC does not. echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c # Look for a reference to the register d0 in the .s file. AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then gl_cv_host_cpu_c_abi=armhf else gl_cv_host_cpu_c_abi=arm fi rm -f conftest* ]) ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __LP64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=hppa64], [gl_cv_host_cpu_c_abi=hppa]) ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=ia64-ilp32], [gl_cv_host_cpu_c_abi=ia64]) ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mips64], [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIN32. # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIO32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (_MIPS_SIM == _ABIN32) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mipsn32], [gl_cv_host_cpu_c_abi=mips])]) ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif ]])], [# On powerpc64, there are two ABIs on Linux: The AIX compatible # one and the ELFv2 one. The latter defines _CALL_ELF=2. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _CALL_ELF && _CALL_ELF == 2 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=powerpc64-elfv2], [gl_cv_host_cpu_c_abi=powerpc64]) ], [gl_cv_host_cpu_c_abi=powerpc]) ;; rs6000 ) gl_cv_host_cpu_c_abi=powerpc ;; riscv32 | riscv64 ) # There are 2 architectures (with variants): rv32* and rv64*. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if __riscv_xlen == 64 int ok; #else error fail #endif ]])], [cpu=riscv64], [cpu=riscv32]) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ int ok; #else error fail #endif ]])], [main_abi=lp64], [main_abi=ilp32]) # Float ABIs: # __riscv_float_abi_double: # 'float' and 'double' are passed in floating-point registers. # __riscv_float_abi_single: # 'float' are passed in floating-point registers. # __riscv_float_abi_soft: # No values are passed in floating-point registers. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_double int ok; #else error fail #endif ]])], [float_abi=d], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_single int ok; #else error fail #endif ]])], [float_abi=f], [float_abi='']) ]) gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=s390x], [gl_cv_host_cpu_c_abi=s390]) ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=sparc64], [gl_cv_host_cpu_c_abi=sparc]) ;; *) gl_cv_host_cpu_c_abi="$host_cpu" ;; esac ]) dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" AC_SUBST([HOST_CPU]) AC_SUBST([HOST_CPU_C_ABI]) # This was # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) # earlier, but KAI C++ 3.2d doesn't like this. sed -e 's/-/_/g' >> confdefs.h <. ]) # serial 59 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.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 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_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _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([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 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_DECL_FILECMD])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 m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that 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 set != "${COLLECT_NAMES+set}"; 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 and # ICC, which need '.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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 0 = "$lt_write_fail" && 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) 2011 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 yes = "$silent" && 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 that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) 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' 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)], [Go], [_LT_LANG(GO)], [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 m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _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([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 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 there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; 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 $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR $AR_FLAGS 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 -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; 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*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # 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 yes = "$lt_cv_ld_force_load"; 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\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes != "$lt_cv_apple_cc_single_mod"; 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 set = "${lt_cv_aix_libpath+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 that will find a shell with a builtin # printf (that 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], [m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--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 yes = "$GCC"; 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 where 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 no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) 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} _LT_DECL([], [AR], [1], [The archiver]) # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], [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 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; 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 bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "[$]$2"; 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 yes = "[$]$2"; 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 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 yes = "$cross_compiling"; 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 -fvisibility=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 yes != "$enable_dlopen"; 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 ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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 yes = "$lt_cv_dlopen_self"; 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 no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; 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 no = "$hard_links"; 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 where 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 yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; 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 relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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 -z "$STRIP"; then AC_MSG_RESULT([no]) else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _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 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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 # correct to gnu/linux during the next big refactor 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* | *,icl*) # Native MSVC or ICC 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 and ICC 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 # correct to gnu/linux during the next big refactor 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 ;; freebsd* | dragonfly* | midnightbsd*) # 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[[23]].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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 # correct to gnu/linux during the next big refactor 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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=sco 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 yes = "$with_gnu_ld"; 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _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], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that 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 that 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 no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [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 # that 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='$FILECMD -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. if ( 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* | midnightbsd*) 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=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | 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=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; 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 -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) 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 one 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 yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _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_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _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 yes = "$GXX"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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* | midnightbsd*) # 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 ia64 != "$host_cpu"; 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 | 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; 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 ia64 = "$host_cpu"; 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 ;; 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' case $cc_basename in 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' ;; esac ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 | 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' ;; tcc*) # Fabrice Bellard et al's Tiny 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)='-static' ;; 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\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # 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\ F* | *Sun*Fortran*) _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 ' ;; *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,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; 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 that 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. 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) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _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_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++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/([[^)]]\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; 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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; 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)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$_LT_TAGVAR(ld_shlibs, $1)"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. 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) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC _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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _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 and ICC 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 ;; # 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* | midnightbsd*) _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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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 yes = "$lt_cv_irix_exported_symbol"; 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 _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' 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 shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes,yes = "$GCC,$enable_shared"; 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_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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); 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_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 yes != "$_lt_caught_CXX_error"; 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 yes = "$GXX"; 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 yes = "$GXX"; 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 yes = "$with_gnu_ld"; 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 ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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* | ,icl* | no,icl*) # Native MSVC or ICC # 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $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 ;; freebsd2.*) # 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* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; 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 "x$output_objdir/$soname" = "x$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 yes = "$GXX"; 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 "x$output_objdir/$soname" = "x$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 no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 | 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 yes = "$supports_anon_versioning"; 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 ;; openbsd* | bitrig*) 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__`"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 $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 $wl-h $wl$soname -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 CANNOT 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes != "$_lt_caught_CXX_error" 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 @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@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 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 no = "$pre_test_object_deps_done"; 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)= ;; 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 no = "$F77"; 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_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 yes != "$_lt_disable_F77"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_F77" 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 no = "$FC"; 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_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 yes != "$_lt_disable_FC"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_FC" 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_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # 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=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go 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_GO_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 set = "${GCJFLAGS+set}" || 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_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # 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_FILECMD # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], [AC_CHECK_TOOL([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD # _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 10 -lt "$lt_ac_count" && 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], [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_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what 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 libesedb-20240420/m4/po.m40000644000175000017500000004461714533041722015575 0ustar00lordyestalordyesta# po.m4 serial 31 (gettext-0.20.2) dnl Copyright (C) 1995-2014, 2016, 2018-2020 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 be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser 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 Lesser General Public License, and the rest of the GNU dnl gettext 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.60]) 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([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl 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.20]) 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 `$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 Test whether it is GNU msgmerge >= 0.20. if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else dnl Test whether it is GNU msgmerge >= 0.12. if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is dnl slow. But this is not a big problem, as such old gettext versions are dnl hardly in use any more. MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) 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" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/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"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. 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. 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" tab=`printf '\t'` 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" < arguments AC_DEFUN([AX_LIBCERROR_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcerror" = xno], [ac_cv_libcerror=no], [ac_cv_libcerror=check dnl Check if the directory provided as parameter exists dnl For both --with-libcerror which returns "yes" and --with-libcerror= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libcerror], [1]) ]) ], [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=check]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS"]) ]) AS_IF( [test "x$ac_cv_libcerror" = xcheck], [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 error 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 && test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes], [AC_MSG_FAILURE( [unable to find supported libcerror in directory: $ac_cv_with_libcerror], [1]) ]) ]) 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 -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/libcnotify.m40000644000175000017500000001337614610727254017326 0ustar00lordyestalordyestadnl Checks for libcnotify required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcnotify" = xno], [ac_cv_libcnotify=no], [ac_cv_libcnotify=check dnl Check if the directory provided as parameter exists dnl For both --with-libcnotify which returns "yes" and --with-libcnotify= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libcnotify], [1]) ]) ], [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=check]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS"]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xcheck], [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_with_libcnotify" != xyes && test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes], [AC_MSG_FAILURE( [unable to find supported libcnotify in directory: $ac_cv_with_libcnotify], [1]) ]) ]) 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 -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/libfguid.m40000644000175000017500000001336414610727254016746 0ustar00lordyestalordyestadnl Checks for libfguid required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfguid" = xno], [ac_cv_libfguid=no], [ac_cv_libfguid=check dnl Check if the directory provided as parameter exists dnl For both --with-libfguid which returns "yes" and --with-libfguid= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfguid], [1]) ]) ], [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=check]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfguid" = xcheck], [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 && test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes], [AC_MSG_FAILURE( [unable to find supported libfguid in directory: $ac_cv_with_libfguid], [1]) ]) ]) 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 if libfguid dependencies are available AC_DEFUN([AX_LIBFGUID_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfguid_CPPFLAGS="-I../libfguid -I\$(top_srcdir)/libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local ]) 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], [AX_LIBFGUID_CHECK_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]) ]) ]) libesedb-20240420/m4/libbfio.m40000644000175000017500000002722314610727254016566 0ustar00lordyestalordyestadnl Checks for libbfio required headers and functions dnl dnl Version: 20240413 dnl Function to detect if libbfio is available dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBBFIO_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libbfio" = xno], [ac_cv_libbfio=no], [ac_cv_libbfio=check dnl Check if the directory provided as parameter exists dnl For both --with-libbfio which returns "yes" and --with-libbfio= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libbfio], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libbfio], [libbfio >= 20201125], [ac_cv_libbfio=yes], [ac_cv_libbfio=check]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes && test "x$ac_cv_enable_wide_character_type" != xno], [AC_CACHE_CHECK( [whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1], [ac_cv_header_libbfio_features_h_have_wide_character_type], [AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[#if !defined( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBBFIO_HAVE_WIDE_CHARACTER_TYPE not defined #endif]] )], [ac_cv_header_libbfio_features_h_have_wide_character_type=yes], [ac_cv_header_libbfio_features_h_have_wide_character_type=no]) AC_LANG_POP(C)], [ac_cv_header_libbfio_features_h_have_wide_character_type=no]) AS_IF( [test "x$ac_cv_header_libbfio_features_h_have_wide_character_type" = xno], [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"]) ]) AS_IF( [test "x$ac_cv_libbfio" = xcheck], [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_read_buffer_at_offset, [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_write_buffer_at_offset, [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_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_remove_handle, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_maximum_number_of_open_handles, [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_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_read_buffer_at_offset, [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_write_buffer_at_offset, [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_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]) dnl File pool functions AC_CHECK_LIB( bfio, libbfio_file_pool_open, [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_pool_open_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) ]) ac_cv_libbfio_LIBADD="-lbfio"]) ]) AS_IF( [test "x$ac_cv_libbfio" != xyes && test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes], [AC_MSG_FAILURE( [unable to find supported libbfio in directory: $ac_cv_with_libbfio], [1]) ]) ]) 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 if libbfio dependencies are available AC_DEFUN([AX_LIBBFIO_CHECK_LOCAL], [dnl No additional checks. ac_cv_libbfio_CPPFLAGS="-I../libbfio -I\$(top_srcdir)/libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local ]) 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], [AX_LIBBFIO_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBBFIO], [1], [Define to 1 if the local version of libbfio is used.]) AC_SUBST( [HAVE_LOCAL_LIBBFIO], [1]) ]) 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]) ]) ]) libesedb-20240420/m4/libfmapi.m40000644000175000017500000002173114610727254016741 0ustar00lordyestalordyestadnl Checks for libfmapi required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfmapi" = xno], [ac_cv_libfmapi=no], [ac_cv_libfmapi=check dnl Check if the directory provided as parameter exists dnl For both --with-libfmapi which returns "yes" and --with-libfmapi= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xauto-detect && test "x$ac_cv_with_libfmapi" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfmapi], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfmapi], [libfmapi >= 20230404], [ac_cv_libfmapi=yes], [ac_cv_libfmapi=check]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [ac_cv_libfmapi_CPPFLAGS="$pkg_cv_libfmapi_CFLAGS" ac_cv_libfmapi_LIBADD="$pkg_cv_libfmapi_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xcheck], [dnl Check for headers AC_CHECK_HEADERS([libfmapi.h]) AS_IF( [test "x$ac_cv_header_libfmapi_h" = xno], [ac_cv_libfmapi=no], [dnl Check for the individual functions ac_cv_libfmapi=yes AC_CHECK_LIB( fmapi, libfmapi_get_version, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) dnl Entry identifier functions AC_CHECK_LIB( fmapi, libfmapi_entry_identifier_initialize, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_entry_identifier_free, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_entry_identifier_copy_from_byte_stream, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_entry_identifier_get_service_provider_identifier, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) dnl One-off entry identifier functions AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_initialize, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_free, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_copy_from_byte_stream, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_version, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_flags, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_display_name_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_display_name, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_display_name_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_display_name, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_address_type_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_address_type, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_address_type_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_address_type, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_email_address_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf8_email_address, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_email_address_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_one_off_entry_identifier_get_utf16_email_address, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) dnl MAPI class identifiers AC_CHECK_LIB( fmapi, libfmapi_class_identifier_public_strings, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) dnl LZFu (de)compression functions AC_CHECK_LIB( fmapi, libfmapi_lzfu_get_uncompressed_data_size, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_lzfu_decompress, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) ac_cv_libfmapi_LIBADD="-lfmapi"]) ]) AS_IF( [test "x$ac_cv_libfmapi" != xyes && test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xauto-detect && test "x$ac_cv_with_libfmapi" != xyes], [AC_MSG_FAILURE( [unable to find supported libfmapi in directory: $ac_cv_with_libfmapi], [1]) ]) ]) dnl Check for debug functions AS_IF( [test "x$ac_cv_libfmapi" = xyes && test "x$ac_cv_enable_debug_output" != xno], [AC_CHECK_LIB( fmapi, libfmapi_property_identifier_get_identifier, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_property_identifier_get_description, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_value_type_get_identifier, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) AC_CHECK_LIB( fmapi, libfmapi_value_type_get_description, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_DEFINE( [HAVE_LIBFMAPI], [1], [Define to 1 if you have the `fmapi' library (-lfmapi).]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_SUBST( [HAVE_LIBFMAPI], [1]) ], [AC_SUBST( [HAVE_LIBFMAPI], [0]) ]) ]) dnl Function to detect if libfmapi dependencies are available AC_DEFUN([AX_LIBFMAPI_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfmapi_CPPFLAGS="-I../libfmapi -I\$(top_srcdir)/libfmapi"; ac_cv_libfmapi_LIBADD="../libfmapi/libfmapi.la"; ac_cv_libfmapi=local ]) 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 shared library version AX_LIBFMAPI_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfmapi" != xyes], [AX_LIBFMAPI_CHECK_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]) ]) ]) libesedb-20240420/m4/intlmacosx.m40000644000175000017500000000623514533041722017332 0ustar00lordyestalordyesta# intlmacosx.m4 serial 8 (gettext-0.20.2) dnl Copyright (C) 2004-2014, 2016, 2019-2020 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 be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser 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 Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.4. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#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 Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, dnl because in macOS 10.13.4 it has the following behaviour: dnl When two or more languages are specified in the dnl "System Preferences > Language & Region > Preferred Languages" panel, dnl it returns en_CC where CC is the territory (even when English is not among dnl the preferred languages!). What we want instead is what dnl CFLocaleCopyCurrent returned in earlier macOS releases and what dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the dnl first among the preferred languages and CC is the territory. AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyPreferredLanguages();]])], [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) libesedb-20240420/m4/lt~obsolete.m40000644000175000017500000001400714610746256017531 0ustar00lordyestalordyesta# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 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])]) libesedb-20240420/m4/lib-link.m40000644000175000017500000010376214533041722016655 0ustar00lordyestalordyesta# lib-link.m4 serial 31 dnl Copyright (C) 2001-2020 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.61]) 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]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_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 popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) 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. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and 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]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_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" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. dnl Otherwise, add it to the front of LIBS, because it may be a static dnl library that depends on another static library that is present in LIBS. dnl Static libraries benefit only from the static libraries listed after dnl it. case " $LIB[]NAME" in *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; *) LIBS="$LIB[]NAME $LIBS" ;; esac AC_LINK_IFELSE( [AC_LANG_PROGRAM([[$3]], [[$4]])], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) 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 lib][$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]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_libname_spec, dnl acl_library_names_spec, 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 Complain if config.rpath is missing. 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_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) 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]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], [[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]PACK[[-prefix don't search for ]PACKLIBS[ 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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= 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= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= 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 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then 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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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 fi done 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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; 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/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi 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*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $dependency_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$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; 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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_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 popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) 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" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; 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" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; 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]) ]) libesedb-20240420/m4/iconv.m40000644000175000017500000002300314533041722016257 0ustar00lordyestalordyesta# iconv.m4 serial 21 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation, dnl 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_LINK_IFELSE will then fail, the second AC_LINK_IFELSE 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_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #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_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #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, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* 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 ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_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, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #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 ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_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, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done 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]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_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_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || 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([ $am_cv_proto_iconv]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. am_cv_proto_iconv_arg1="" fi AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) ]) libesedb-20240420/m4/ltoptions.m40000644000175000017500000003427514610746256017223 0ustar00lordyestalordyesta# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 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 8 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_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _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_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _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@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [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])]) libesedb-20240420/m4/nls.m40000644000175000017500000000232214533041722015736 0ustar00lordyestalordyesta# nls.m4 serial 6 (gettext-0.20.2) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free dnl 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 be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser 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 Lesser General Public License, and the rest of the GNU dnl gettext 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]) ]) libesedb-20240420/m4/python.m40000644000175000017500000001451414610727254016500 0ustar00lordyestalordyestadnl Functions for Python bindings dnl dnl Version: 20240418 dnl Function to check if the python binary is available dnl "python${PYTHON_VERSION} python python# python#.#" AC_DEFUN([AX_PROG_PYTHON], [AS_IF( [test "x${PYTHON_VERSION}" != x], [ax_python_progs="python${PYTHON_VERSION}"], [ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"]) AC_CHECK_PROGS( [PYTHON], [$ax_python_progs]) AS_IF( [test "x${PYTHON}" != x], [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write('%d.%d' % (sys.version_info[[0]], sys.version_info[[1]]))" 2>/dev/null`; ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; AC_SUBST( [PYTHON_PLATFORM], [$ax_prog_python_platform]) ], [AC_MSG_ERROR( [Unable to find python]) ]) AC_SUBST( [PYTHON], [$PYTHON]) ]) dnl Function to check if the python-config binary is available dnl "python${PYTHON_VERSION}-config python-config" AC_DEFUN([AX_PROG_PYTHON_CONFIG], [AS_IF( [test "x${PYTHON_CONFIG}" = x && test "x${PYTHON_VERSION}" != x], [AC_CHECK_PROGS( [PYTHON_CONFIG], [python${PYTHON_VERSION}-config]) ]) AS_IF( [test "x${PYTHON_CONFIG}" = x], [AC_CHECK_PROGS( [PYTHON_CONFIG], [python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config]) ]) AS_IF( [test "x${PYTHON_CONFIG}" = x], [AC_MSG_ERROR( [Unable to find python-config]) ]) AC_SUBST( [PYTHON_CONFIG], [$PYTHON_CONFIG]) ]) dnl Function to detect if a Python build environment is available AC_DEFUN([AX_PYTHON_CHECK], [AX_PROG_PYTHON AX_PROG_PYTHON_CONFIG AS_IF( [test "x${PYTHON_CONFIG}" != x], [dnl Check for Python includes PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2>/dev/null`; AC_MSG_CHECKING( [for Python includes]) AC_MSG_RESULT( [$PYTHON_INCLUDES]) dnl Check for Python libraries PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`; AC_MSG_CHECKING( [for Python libraries]) AC_MSG_RESULT( [$PYTHON_LDFLAGS]) dnl For CygWin and MinGW add the -no-undefined linker flag AS_CASE( [$build], [*-*-cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], [*-*-mingw*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], [*-*-msys*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], [*],[]) dnl Check for the existence of Python.h BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON_INCLUDES}" AC_CHECK_HEADERS( [Python.h], [ac_cv_header_python_h=yes], [ac_cv_header_python_h=no]) CPPFLAGS="${BACKUP_CPPFLAGS}" ]) AS_IF( [test "x${ac_cv_header_python_h}" != xyes], [ac_cv_enable_python=no], [ac_cv_enable_python=${ax_prog_python_version} AC_SUBST( [PYTHON_CPPFLAGS], [$PYTHON_INCLUDES]) AC_SUBST( [PYTHON_LDFLAGS], [$PYTHON_LDFLAGS]) dnl Check for Python prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python_prefix="\${prefix}"], [ax_python_prefix=`${PYTHON_CONFIG} --prefix 2>/dev/null`]) AC_SUBST( [PYTHON_PREFIX], [$ax_python_prefix]) dnl Check for Python exec-prefix AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python_exec_prefix="\${exec_prefix}"], [ax_python_exec_prefix=`${PYTHON_CONFIG} --exec-prefix 2>/dev/null`]) AC_SUBST( [PYTHON_EXEC_PREFIX], [$ax_python_exec_prefix]) dnl Check for Python library directory ax_python_pythondir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; AS_IF( [test "x${ac_cv_with_pythondir}" = x || test "x${ac_cv_with_pythondir}" = xno], [AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python_pythondir="${ax_python_prefix}/${ax_python_pythondir_suffix}"], [ax_python_pythondir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], [ax_python_pythondir=$ac_cv_with_pythondir]) AC_SUBST( [pythondir], [$ax_python_pythondir]) dnl Check for Python platform specific library directory ax_python_pyexecdir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python_library_dir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; AS_IF( [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], [ax_python_pyexecdir="${ax_python_exec_prefix}/${ax_python_pyexecdir_suffix}"], [ax_python_pyexecdir=$ax_python_library_dir]) AC_SUBST( [pyexecdir], [$ax_python_pyexecdir]) AC_SUBST( [PYTHON_LIBRARY_DIR], [$ax_python_pyexecdir_suffix]) AC_SUBST( [PYTHON_PACKAGE_DIR], [$ax_python_library_dir]) ]) ]) dnl Function to determine the prefix of pythondir AC_DEFUN([AX_PYTHON_CHECK_PYPREFIX], [AX_COMMON_ARG_WITH( [pyprefix], [pyprefix], [use `python-config --prefix' to determine the prefix of pythondir instead of --prefix], [no], [no]) ]) dnl Function to detect if to enable Python AC_DEFUN([AX_PYTHON_CHECK_ENABLE], [AX_PYTHON_CHECK_PYPREFIX AX_COMMON_ARG_ENABLE( [python], [python], [build Python bindings], [no]) AX_COMMON_ARG_WITH( [pythondir], [pythondir], [use to specify the Python directory (pythondir)], [no], [no]) AS_IF( [test "x${ac_cv_enable_python}" != xno], [AX_PYTHON_CHECK]) AM_CONDITIONAL( HAVE_PYTHON, [test "x${ac_cv_enable_python}" != xno]) AM_CONDITIONAL( HAVE_PYTHON_TESTS, [test "x${ac_cv_enable_python}" != xno]) ]) ]) libesedb-20240420/m4/libfvalue.m40000644000175000017500000004710014610727254017125 0ustar00lordyestalordyestadnl Checks for libfvalue required headers and functions dnl dnl Version: 20240413 dnl Function to detect if libfvalue is available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfvalue" = xno], [ac_cv_libfvalue=no], [ac_cv_libfvalue=check dnl Check if the directory provided as parameter exists dnl For both --with-libfvalue which returns "yes" and --with-libfvalue= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfvalue], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfvalue], [libfvalue >= 20200711], [ac_cv_libfvalue=yes], [ac_cv_libfvalue=check]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [ac_cv_libfvalue_CPPFLAGS="$pkg_cv_libfvalue_CFLAGS" ac_cv_libfvalue_LIBADD="$pkg_cv_libfvalue_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xcheck], [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 Data handle functions AC_CHECK_LIB( fvalue, libfvalue_data_handle_initialize, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_free, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_clone, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_clear, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_get_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_set_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_get_data_flags, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_set_data_flags, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_get_number_of_value_entries, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_get_value_entry, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_set_value_entry, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_data_handle_append_value_entry, [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_resize, [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_index_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_get_value_by_identifier, [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_set_value, [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_clear, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_type, [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_handle, [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_data_size, [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_copy_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_format_flags, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_set_format_flags, [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_boolean, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_boolean, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_8bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_8bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_16bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_16bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_32bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_32bit, [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_copy_from_float, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_float, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_double, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_double, [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_get_utf8_string_size, [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_copy_to_utf8_string_with_index, [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_get_utf16_string_size, [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_copy_to_utf16_string_with_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_utf32_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_utf32_string_size, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_utf32_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_utf32_string_with_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_read_from_file_stream, [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_initialize_with_data_handle, [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_CHECK_LIB( fvalue, libfvalue_value_type_set_data_strings_array, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) ac_cv_libfvalue_LIBADD="-lfvalue"]) ]) AS_IF( [test "x$ac_cv_libfvalue" != xyes && test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AC_MSG_FAILURE( [unable to find supported libfvalue in directory: $ac_cv_with_libfvalue], [1]) ]) ]) 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 if libfvalue dependencies are available AC_DEFUN([AX_LIBFVALUE_CHECK_LOCAL], [dnl No additional checks. ac_cv_libfvalue_CPPFLAGS="-I../libfvalue -I\$(top_srcdir)/libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local ]) 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], [AX_LIBFVALUE_CHECK_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]) ]) ]) libesedb-20240420/m4/types.m40000644000175000017500000000401214533041722016304 0ustar00lordyestalordyestadnl Functions for type definitions dnl dnl Version: 20180727 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_CHECK_HEADERS([sys/types.h inttypes.h stdint.h wchar.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]) ]) AS_IF( [test "x$ac_cv_header_wchar_h" = xyes], [AC_SUBST( [HAVE_WCHAR_H], [1]) ], [AC_SUBST( [HAVE_WCHAR_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([int]) AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([off_t]) AC_CHECK_SIZEOF([size_t]) AS_IF( [test "x$ac_cv_header_wchar_h" = xyes], [AC_CHECK_SIZEOF([wchar_t])]) ]) libesedb-20240420/m4/libfcache.m40000644000175000017500000001661614610727254017064 0ustar00lordyestalordyestadnl Checks for libfcache required headers and functions dnl dnl Version: 20240413 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], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfcache" = xno], [ac_cv_libfcache=no], [ac_cv_libfcache=check dnl Check if the directory provided as parameter exists dnl For both --with-libfcache which returns "yes" and --with-libfcache= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes], [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_FAILURE( [no such directory: $ac_cv_with_libfcache], [1]) ]) ], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfcache], [libfcache >= 20191109], [ac_cv_libfcache=yes], [ac_cv_libfcache=check]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS"]) ]) AS_IF( [test "x$ac_cv_libfcache" = xcheck], [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 Cache functions AC_CHECK_LIB( fcache, libfcache_cache_initialize, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_free, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_clone, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_clear, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_get_number_of_entries, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_get_number_of_cache_values, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_clear_value_by_index, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_get_value_by_identifier, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_get_value_by_index, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_set_value_by_identifier, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_set_value_by_index, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) dnl Cache value functions AC_CHECK_LIB( fcache, libfcache_cache_value_free, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_value_clear, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_value_get_identifier, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_value_set_identifier, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_value_get_value, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) AC_CHECK_LIB( fcache, libfcache_cache_value_set_value, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) dnl Date time functions AC_CHECK_LIB( fcache, libfcache_date_time_get_timestamp, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) ac_cv_libfcache_LIBADD="-lfcache"]) ]) AS_IF( [test "x$ac_cv_libfcache" != xyes && test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes], [AC_MSG_FAILURE( [unable to find supported libfcache in directory: $ac_cv_with_libfcache], [1]) ]) ]) 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_CHECK_HEADERS([sys/time.h]) dnl Date and time functions used in libfcache/libfcache_date_time.h AC_CHECK_FUNCS([clock_gettime time]) AS_IF( [test "x$ac_cv_func_time" != xyes], [AC_MSG_FAILURE( [Missing function: time], [1]) ]) ac_cv_libfcache_CPPFLAGS="-I../libfcache -I\$(top_srcdir)/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]) ]) ]) libesedb-20240420/m4/pthread.m40000644000175000017500000001174514610727254016611 0ustar00lordyestalordyestadnl Functions for pthread dnl dnl Version: 20240308 dnl Function to detect if pthread is available AC_DEFUN([AX_PTHREAD_CHECK_LIB], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_pthread" = xno], [ac_cv_pthread=no], [ac_cv_pthread=check dnl Check if parameters were provided dnl For both --with-pthread which returns "yes" and --with-pthread= which returns "" dnl treat them as auto-detection. AS_IF( [test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes], [AS_IF( [test -d "$ac_cv_with_pthread"], [CFLAGS="$CFLAGS -I${ac_cv_with_pthread}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_pthread}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_pthread]) ]) ]) ]) AS_IF( [test "x$ac_cv_pthread" = xcheck], [dnl Check for headers AC_CHECK_HEADERS([pthread.h]) AS_IF( [test "x$ac_cv_header_pthread_h" = xno], [ac_cv_pthread=no], [dnl Check for the individual functions ac_cv_pthread=pthread dnl Thread functions AC_CHECK_LIB( pthread, pthread_create, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_exit, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_join, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) dnl Condition functions AC_CHECK_LIB( pthread, pthread_cond_init, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_cond_destroy, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_cond_broadcast, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_cond_signal, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_cond_wait, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) dnl Mutex functions AC_CHECK_LIB( pthread, pthread_mutex_init, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_mutex_destroy, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_mutex_lock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_mutex_trylock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_mutex_unlock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) dnl Read/Write lock functions AC_CHECK_LIB( pthread, pthread_rwlock_init, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_rwlock_destroy, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_rwlock_rdlock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_rwlock_wrlock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) AC_CHECK_LIB( pthread, pthread_rwlock_unlock, [ac_pthread_dummy=yes], [ac_cv_pthread=no]) ac_cv_pthread_LIBADD="-lpthread"; ]) AS_IF( [test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes], [AC_MSG_FAILURE( [unable to find supported pthread in directory: $ac_cv_with_pthread], [1]) ]) ]) AS_IF( [test "x$ac_cv_pthread" = xpthread], [AC_DEFINE( [HAVE_PTHREAD], [1], [Define to 1 if you have the 'pthread' library (-lpthread).]) ]) AS_IF( [test "x$ac_cv_pthread" != xno], [AC_SUBST( [HAVE_PTHREAD], [1]) ], [AC_SUBST( [HAVE_PTHREAD], [0]) ]) ]) dnl Function to detect how to enable pthread AC_DEFUN([AX_PTHREAD_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [pthread], [pthread], [search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread], [auto-detect], [DIR]) dnl Check for a shared library version AX_PTHREAD_CHECK_LIB AS_IF( [test "x$ac_cv_pthread_CPPFLAGS" != "x"], [AC_SUBST( [PTHREAD_CPPFLAGS], [$ac_cv_pthread_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_pthread_LIBADD" != "x"], [AC_SUBST( [PTHREAD_LIBADD], [$ac_cv_pthread_LIBADD]) ]) AS_IF( [test "x$ac_cv_pthread" = xpthread], [AC_SUBST( [ax_pthread_pc_libs_private], [-lpthread]) ]) ]) libesedb-20240420/include/0000755000175000017500000000000014610746413016011 5ustar00lordyestalordyestalibesedb-20240420/include/Makefile.am0000644000175000017500000000065114610730402020036 0ustar00lordyestalordyestainclude_HEADERS = \ libesedb.h pkginclude_HEADERS = \ libesedb/codepage.h \ libesedb/definitions.h \ libesedb/error.h \ libesedb/extern.h \ libesedb/features.h \ libesedb/types.h EXTRA_DIST = \ libesedb.h.in \ libesedb/definitions.h.in \ libesedb/features.h.in \ libesedb/types.h.in DISTCLEANFILES = \ libesedb.h \ libesedb/definitions.h \ libesedb/features.h \ libesedb/types.h \ Makefile \ Makefile.in libesedb-20240420/include/libesedb/0000755000175000017500000000000014610746413017562 5ustar00lordyestalordyestalibesedb-20240420/include/libesedb/definitions.h.in0000644000175000017500000000564514610727247022671 0ustar00lordyestalordyesta/* * Definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DEFINITIONS_H ) #define _LIBESEDB_DEFINITIONS_H #include #define LIBESEDB_VERSION @VERSION@ /* The version string */ #define LIBESEDB_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 LIBESEDB_ACCESS_FLAGS { LIBESEDB_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBESEDB_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE ) /* The file types */ enum LIBESEDB_FILE_TYPES { LIBESEDB_FILE_TYPE_DATABASE = 0, LIBESEDB_FILE_TYPE_STREAMING_FILE = 1 }; /* The get columns flags */ enum LIBESEDB_GET_COLUMN_FLAGS { LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01 }; /* The column types */ enum LIBESEDB_COLUMN_TYPES { LIBESEDB_COLUMN_TYPE_NULL = 0, LIBESEDB_COLUMN_TYPE_BOOLEAN = 1, LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4, LIBESEDB_COLUMN_TYPE_CURRENCY = 5, LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6, LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7, LIBESEDB_COLUMN_TYPE_DATE_TIME = 8, LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9, LIBESEDB_COLUMN_TYPE_TEXT = 10, LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11, LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12, LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14, LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15, LIBESEDB_COLUMN_TYPE_GUID = 16, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17 }; /* The value flags */ enum LIBESEDB_VALUE_FLAGS { LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01, LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02, LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04, LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08, }; #endif /* !defined( _LIBESEDB_DEFINITIONS_H ) */ libesedb-20240420/include/libesedb/definitions.h0000644000175000017500000000564314610746302022253 0ustar00lordyestalordyesta/* * Definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DEFINITIONS_H ) #define _LIBESEDB_DEFINITIONS_H #include #define LIBESEDB_VERSION 20240420 /* The version string */ #define LIBESEDB_VERSION_STRING "20240420" /* 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 LIBESEDB_ACCESS_FLAGS { LIBESEDB_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBESEDB_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE ) /* The file types */ enum LIBESEDB_FILE_TYPES { LIBESEDB_FILE_TYPE_DATABASE = 0, LIBESEDB_FILE_TYPE_STREAMING_FILE = 1 }; /* The get columns flags */ enum LIBESEDB_GET_COLUMN_FLAGS { LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01 }; /* The column types */ enum LIBESEDB_COLUMN_TYPES { LIBESEDB_COLUMN_TYPE_NULL = 0, LIBESEDB_COLUMN_TYPE_BOOLEAN = 1, LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4, LIBESEDB_COLUMN_TYPE_CURRENCY = 5, LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6, LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7, LIBESEDB_COLUMN_TYPE_DATE_TIME = 8, LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9, LIBESEDB_COLUMN_TYPE_TEXT = 10, LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11, LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12, LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14, LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15, LIBESEDB_COLUMN_TYPE_GUID = 16, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17 }; /* The value flags */ enum LIBESEDB_VALUE_FLAGS { LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01, LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02, LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04, LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08, }; #endif /* !defined( _LIBESEDB_DEFINITIONS_H ) */ libesedb-20240420/include/libesedb/types.h.in0000644000175000017500000001205514610727247021513 0ustar00lordyestalordyesta/* * Type definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_TYPES_H ) #define _LIBESEDB_TYPES_H #include /* Integer type definitions */ #if ( defined( _MSC_VER ) && ( _MSC_VER < 1600 ) ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) #ifdef __cplusplus extern "C" { #endif /* Microsoft Visual Studio C++ before Visual Studio 2010 or earlier versions of the Borland C++ Builder * do not support the (u)int#_t type definitions but have __int# definitions 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 #ifdef __cplusplus } #endif #elif defined( _MSC_VER ) || defined( __BORLANDC__ ) /* Later versions of Microsoft Visual Studio C++ and Borland C/C++ 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( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) /* Microsoft Visual Studio C++ 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 ) */ #endif /* defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) /* Earlier versions of 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 ) */ #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 LIBESEDB_DEFINITION_UNIX98 #endif #include #if defined( LIBESEDB_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBESEDB_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libesedb_column_t; typedef intptr_t libesedb_file_t; typedef intptr_t libesedb_index_t; typedef intptr_t libesedb_long_value_t; typedef intptr_t libesedb_multi_value_t; typedef intptr_t libesedb_record_t; typedef intptr_t libesedb_table_t; #ifdef __cplusplus } #endif #endif /* !defined( _LIBESEDB_TYPES_H ) */ libesedb-20240420/include/libesedb/types.h0000644000175000017500000001165214610746302021101 0ustar00lordyestalordyesta/* * Type definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_TYPES_H ) #define _LIBESEDB_TYPES_H #include /* Integer type definitions */ #if ( defined( _MSC_VER ) && ( _MSC_VER < 1600 ) ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) #ifdef __cplusplus extern "C" { #endif /* Microsoft Visual Studio C++ before Visual Studio 2010 or earlier versions of the Borland C++ Builder * do not support the (u)int#_t type definitions but have __int# definitions 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 #ifdef __cplusplus } #endif #elif defined( _MSC_VER ) || defined( __BORLANDC__ ) /* Later versions of Microsoft Visual Studio C++ and Borland C/C++ 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( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) /* Microsoft Visual Studio C++ 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 ) */ #endif /* defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) /* Earlier versions of 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 ) */ #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 1 || defined( HAVE_WCHAR_H ) /* __USE_UNIX98 is required to add swprintf definition */ #if !defined( __USE_UNIX98 ) #define __USE_UNIX98 #define LIBESEDB_DEFINITION_UNIX98 #endif #include #if defined( LIBESEDB_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBESEDB_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libesedb_column_t; typedef intptr_t libesedb_file_t; typedef intptr_t libesedb_index_t; typedef intptr_t libesedb_long_value_t; typedef intptr_t libesedb_multi_value_t; typedef intptr_t libesedb_record_t; typedef intptr_t libesedb_table_t; #ifdef __cplusplus } #endif #endif /* !defined( _LIBESEDB_TYPES_H ) */ libesedb-20240420/include/libesedb/features.h.in0000644000175000017500000000301714610727247022163 0ustar00lordyestalordyesta/* * Features of libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_FEATURES_H ) #define _LIBESEDB_FEATURES_H /* The libesedb type support features */ #if defined( WINAPI ) || @HAVE_WIDE_CHARACTER_TYPE@ #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1 #endif #if defined( WINAPI ) || @HAVE_MULTI_THREAD_SUPPORT@ #define LIBESEDB_HAVE_MULTI_THREAD_SUPPORT 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && @HAVE_LIBBFIO@ ) #define LIBESEDB_HAVE_BFIO 1 #endif #if !defined( LIBESEDB_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBESEDB_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBESEDB_DEPRECATED __declspec(deprecated) #else #define LIBESEDB_DEPRECATED #endif #endif #endif /* !defined( _LIBESEDB_FEATURES_H ) */ libesedb-20240420/include/libesedb/error.h0000644000175000017500000001514614610727247021077 0ustar00lordyestalordyesta/* * The error code definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_ERROR_H ) #define _LIBESEDB_ERROR_H #include /* External error type definition hides internal structure */ typedef intptr_t libesedb_error_t; /* The error domains */ enum LIBESEDB_ERROR_DOMAINS { LIBESEDB_ERROR_DOMAIN_ARGUMENTS = (int) 'a', LIBESEDB_ERROR_DOMAIN_CONVERSION = (int) 'c', LIBESEDB_ERROR_DOMAIN_COMPRESSION = (int) 'C', LIBESEDB_ERROR_DOMAIN_IO = (int) 'I', LIBESEDB_ERROR_DOMAIN_INPUT = (int) 'i', LIBESEDB_ERROR_DOMAIN_MEMORY = (int) 'm', LIBESEDB_ERROR_DOMAIN_OUTPUT = (int) 'o', LIBESEDB_ERROR_DOMAIN_RUNTIME = (int) 'r' }; /* The argument error codes * to signify errors regarding arguments passed to a function */ enum LIBESEDB_ARGUMENT_ERROR { LIBESEDB_ARGUMENT_ERROR_GENERIC = 0, /* The argument contains an invalid value */ LIBESEDB_ARGUMENT_ERROR_INVALID_VALUE = 1, /* The argument contains a value less than zero */ LIBESEDB_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2, /* The argument contains a value zero or less */ LIBESEDB_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3, /* The argument contains a value that exceeds the maximum * for the specific type */ LIBESEDB_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4, /* The argument contains a value that is too small */ LIBESEDB_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5, /* The argument contains a value that is too large */ LIBESEDB_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6, /* The argument contains a value that is out of bounds */ LIBESEDB_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS = 7, /* The argument contains a value that is not supported */ LIBESEDB_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8, /* The argument contains a value that conficts with another argument */ LIBESEDB_ARGUMENT_ERROR_CONFLICTING_VALUE = 9 }; /* The conversion error codes * to signify errors regarding conversions */ enum LIBESEDB_CONVERSION_ERROR { LIBESEDB_CONVERSION_ERROR_GENERIC = 0, /* The conversion failed on the input */ LIBESEDB_CONVERSION_ERROR_INPUT_FAILED = 1, /* The conversion failed on the output */ LIBESEDB_CONVERSION_ERROR_OUTPUT_FAILED = 2 }; /* The compression error codes * to signify errors regarding compression */ enum LIBESEDB_COMPRESSION_ERROR { LIBESEDB_COMPRESSION_ERROR_GENERIC = 0, /* The compression failed */ LIBESEDB_COMPRESSION_ERROR_COMPRESS_FAILED = 1, /* The decompression failed */ LIBESEDB_COMPRESSION_ERROR_DECOMPRESS_FAILED = 2 }; /* The input/output error codes * to signify errors regarding input/output */ enum LIBESEDB_IO_ERROR { LIBESEDB_IO_ERROR_GENERIC = 0, /* The open failed */ LIBESEDB_IO_ERROR_OPEN_FAILED = 1, /* The close failed */ LIBESEDB_IO_ERROR_CLOSE_FAILED = 2, /* The seek failed */ LIBESEDB_IO_ERROR_SEEK_FAILED = 3, /* The read failed */ LIBESEDB_IO_ERROR_READ_FAILED = 4, /* The write failed */ LIBESEDB_IO_ERROR_WRITE_FAILED = 5, /* Access denied */ LIBESEDB_IO_ERROR_ACCESS_DENIED = 6, /* The resource is invalid i.e. a missing file */ LIBESEDB_IO_ERROR_INVALID_RESOURCE = 7, /* The ioctl failed */ LIBESEDB_IO_ERROR_IOCTL_FAILED = 8, /* The unlink failed */ LIBESEDB_IO_ERROR_UNLINK_FAILED = 9 }; /* The input error codes * to signify errors regarding handing input data */ enum LIBESEDB_INPUT_ERROR { LIBESEDB_INPUT_ERROR_GENERIC = 0, /* The input contains invalid data */ LIBESEDB_INPUT_ERROR_INVALID_DATA = 1, /* The input contains an unsupported signature */ LIBESEDB_INPUT_ERROR_SIGNATURE_MISMATCH = 2, /* A checksum in the input did not match */ LIBESEDB_INPUT_ERROR_CHECKSUM_MISMATCH = 3, /* A value in the input did not match a previously * read value or calculated value */ LIBESEDB_INPUT_ERROR_VALUE_MISMATCH = 4 }; /* The memory error codes * to signify errors regarding memory */ enum LIBESEDB_MEMORY_ERROR { LIBESEDB_MEMORY_ERROR_GENERIC = 0, /* There is insufficient memory available */ LIBESEDB_MEMORY_ERROR_INSUFFICIENT = 1, /* The memory failed to be copied */ LIBESEDB_MEMORY_ERROR_COPY_FAILED = 2, /* The memory failed to be set */ LIBESEDB_MEMORY_ERROR_SET_FAILED = 3 }; /* The output error codes */ enum LIBESEDB_OUTPUT_ERROR { LIBESEDB_OUTPUT_ERROR_GENERIC = 0, /* There is insuficient space to write the output */ LIBESEDB_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1 }; /* The runtime error codes * to signify errors regarding runtime processing */ enum LIBESEDB_RUNTIME_ERROR { LIBESEDB_RUNTIME_ERROR_GENERIC = 0, /* The value is missing */ LIBESEDB_RUNTIME_ERROR_VALUE_MISSING = 1, /* The value was already set */ LIBESEDB_RUNTIME_ERROR_VALUE_ALREADY_SET = 2, /* The creation and/or initialization of an internal structure failed */ LIBESEDB_RUNTIME_ERROR_INITIALIZE_FAILED = 3, /* The resize of an internal structure failed */ LIBESEDB_RUNTIME_ERROR_RESIZE_FAILED = 4, /* The free and/or finalization of an internal structure failed */ LIBESEDB_RUNTIME_ERROR_FINALIZE_FAILED = 5, /* The value could not be determined */ LIBESEDB_RUNTIME_ERROR_GET_FAILED = 6, /* The value could not be set */ LIBESEDB_RUNTIME_ERROR_SET_FAILED = 7, /* The value could not be appended/prepended */ LIBESEDB_RUNTIME_ERROR_APPEND_FAILED = 8, /* The value could not be copied */ LIBESEDB_RUNTIME_ERROR_COPY_FAILED = 9, /* The value could not be removed */ LIBESEDB_RUNTIME_ERROR_REMOVE_FAILED = 10, /* The value could not be printed */ LIBESEDB_RUNTIME_ERROR_PRINT_FAILED = 11, /* The value was out of bounds */ LIBESEDB_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS = 12, /* The value exceeds the maximum for its specific type */ LIBESEDB_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13, /* The value is unsupported */ LIBESEDB_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14, /* An abort was requested */ LIBESEDB_RUNTIME_ERROR_ABORT_REQUESTED = 15 }; #endif /* !defined( _LIBESEDB_ERROR_H ) */ libesedb-20240420/include/libesedb/extern.h0000644000175000017500000000262014610727247021244 0ustar00lordyestalordyesta/* * The extern definition * * This header should be included in header files that export or import * library functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_EXTERN_H ) #define _LIBESEDB_EXTERN_H /* To export functions from the libesedb DLL define LIBESEDB_DLL_EXPORT * To import functions from the libesedb DLL define LIBESEDB_DLL_IMPORT * Otherwise use default extern statement */ #if defined( LIBESEDB_DLL_EXPORT ) #define LIBESEDB_EXTERN __declspec(dllexport) #elif defined( LIBESEDB_DLL_IMPORT ) #define LIBESEDB_EXTERN extern __declspec(dllimport) #else #define LIBESEDB_EXTERN extern #endif #endif /* !defined( _LIBESEDB_EXTERN_H ) */ libesedb-20240420/include/libesedb/features.h0000644000175000017500000000271714610746302021555 0ustar00lordyestalordyesta/* * Features of libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_FEATURES_H ) #define _LIBESEDB_FEATURES_H /* The libesedb type support features */ #if defined( WINAPI ) || 0 #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1 #endif #if defined( WINAPI ) || 1 #define LIBESEDB_HAVE_MULTI_THREAD_SUPPORT 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 ) #define LIBESEDB_HAVE_BFIO 1 #endif #if !defined( LIBESEDB_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBESEDB_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBESEDB_DEPRECATED __declspec(deprecated) #else #define LIBESEDB_DEPRECATED #endif #endif #endif /* !defined( _LIBESEDB_FEATURES_H ) */ libesedb-20240420/include/libesedb/codepage.h0000644000175000017500000001227214610727247021512 0ustar00lordyestalordyesta/* * Codepage definitions for libesedb * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_CODEPAGE_H ) #define _LIBESEDB_CODEPAGE_H #include #if defined( __cplusplus ) extern "C" { #endif /* The codepage definitions */ enum LIBESEDB_CODEPAGES { LIBESEDB_CODEPAGE_ASCII = 20127, LIBESEDB_CODEPAGE_ISO_8859_1 = 28591, LIBESEDB_CODEPAGE_ISO_8859_2 = 28592, LIBESEDB_CODEPAGE_ISO_8859_3 = 28593, LIBESEDB_CODEPAGE_ISO_8859_4 = 28594, LIBESEDB_CODEPAGE_ISO_8859_5 = 28595, LIBESEDB_CODEPAGE_ISO_8859_6 = 28596, LIBESEDB_CODEPAGE_ISO_8859_7 = 28597, LIBESEDB_CODEPAGE_ISO_8859_8 = 28598, LIBESEDB_CODEPAGE_ISO_8859_9 = 28599, LIBESEDB_CODEPAGE_ISO_8859_10 = 28600, LIBESEDB_CODEPAGE_ISO_8859_11 = 28601, LIBESEDB_CODEPAGE_ISO_8859_13 = 28603, LIBESEDB_CODEPAGE_ISO_8859_14 = 28604, LIBESEDB_CODEPAGE_ISO_8859_15 = 28605, LIBESEDB_CODEPAGE_ISO_8859_16 = 28606, LIBESEDB_CODEPAGE_KOI8_R = 20866, LIBESEDB_CODEPAGE_KOI8_U = 21866, LIBESEDB_CODEPAGE_WINDOWS_874 = 874, LIBESEDB_CODEPAGE_WINDOWS_932 = 932, LIBESEDB_CODEPAGE_WINDOWS_936 = 936, LIBESEDB_CODEPAGE_WINDOWS_949 = 949, LIBESEDB_CODEPAGE_WINDOWS_950 = 950, LIBESEDB_CODEPAGE_WINDOWS_1250 = 1250, LIBESEDB_CODEPAGE_WINDOWS_1251 = 1251, LIBESEDB_CODEPAGE_WINDOWS_1252 = 1252, LIBESEDB_CODEPAGE_WINDOWS_1253 = 1253, LIBESEDB_CODEPAGE_WINDOWS_1254 = 1254, LIBESEDB_CODEPAGE_WINDOWS_1255 = 1255, LIBESEDB_CODEPAGE_WINDOWS_1256 = 1256, LIBESEDB_CODEPAGE_WINDOWS_1257 = 1257, LIBESEDB_CODEPAGE_WINDOWS_1258 = 1258 }; #define LIBESEDB_CODEPAGE_US_ASCII LIBESEDB_CODEPAGE_ASCII #define LIBESEDB_CODEPAGE_ISO_WESTERN_EUROPEAN LIBESEDB_CODEPAGE_ISO_8859_1 #define LIBESEDB_CODEPAGE_ISO_CENTRAL_EUROPEAN LIBESEDB_CODEPAGE_ISO_8859_2 #define LIBESEDB_CODEPAGE_ISO_SOUTH_EUROPEAN LIBESEDB_CODEPAGE_ISO_8859_3 #define LIBESEDB_CODEPAGE_ISO_NORTH_EUROPEAN LIBESEDB_CODEPAGE_ISO_8859_4 #define LIBESEDB_CODEPAGE_ISO_CYRILLIC LIBESEDB_CODEPAGE_ISO_8859_5 #define LIBESEDB_CODEPAGE_ISO_ARABIC LIBESEDB_CODEPAGE_ISO_8859_6 #define LIBESEDB_CODEPAGE_ISO_GREEK LIBESEDB_CODEPAGE_ISO_8859_7 #define LIBESEDB_CODEPAGE_ISO_HEBREW LIBESEDB_CODEPAGE_ISO_8859_8 #define LIBESEDB_CODEPAGE_ISO_TURKISH LIBESEDB_CODEPAGE_ISO_8859_9 #define LIBESEDB_CODEPAGE_ISO_NORDIC LIBESEDB_CODEPAGE_ISO_8859_10 #define LIBESEDB_CODEPAGE_ISO_THAI LIBESEDB_CODEPAGE_ISO_8859_11 #define LIBESEDB_CODEPAGE_ISO_BALTIC LIBESEDB_CODEPAGE_ISO_8859_13 #define LIBESEDB_CODEPAGE_ISO_CELTIC LIBESEDB_CODEPAGE_ISO_8859_14 #define LIBESEDB_CODEPAGE_ISO_LATIN_1 LIBESEDB_CODEPAGE_ISO_8859_1 #define LIBESEDB_CODEPAGE_ISO_LATIN_2 LIBESEDB_CODEPAGE_ISO_8859_2 #define LIBESEDB_CODEPAGE_ISO_LATIN_3 LIBESEDB_CODEPAGE_ISO_8859_3 #define LIBESEDB_CODEPAGE_ISO_LATIN_4 LIBESEDB_CODEPAGE_ISO_8859_4 #define LIBESEDB_CODEPAGE_ISO_LATIN_5 LIBESEDB_CODEPAGE_ISO_8859_9 #define LIBESEDB_CODEPAGE_ISO_LATIN_6 LIBESEDB_CODEPAGE_ISO_8859_10 #define LIBESEDB_CODEPAGE_ISO_LATIN_7 LIBESEDB_CODEPAGE_ISO_8859_13 #define LIBESEDB_CODEPAGE_ISO_LATIN_8 LIBESEDB_CODEPAGE_ISO_8859_14 #define LIBESEDB_CODEPAGE_ISO_LATIN_9 LIBESEDB_CODEPAGE_ISO_8859_15 #define LIBESEDB_CODEPAGE_ISO_LATIN_10 LIBESEDB_CODEPAGE_ISO_8859_16 #define LIBESEDB_CODEPAGE_KOI8_RUSSIAN LIBESEDB_CODEPAGE_KOI8_R #define LIBESEDB_CODEPAGE_KOI8_UKRAINIAN LIBESEDB_CODEPAGE_KOI8_U #define LIBESEDB_CODEPAGE_WINDOWS_THAI LIBESEDB_CODEPAGE_WINDOWS_874 #define LIBESEDB_CODEPAGE_WINDOWS_JAPANESE LIBESEDB_CODEPAGE_WINDOWS_932 #define LIBESEDB_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBESEDB_CODEPAGE_WINDOWS_936 #define LIBESEDB_CODEPAGE_WINDOWS_KOREAN LIBESEDB_CODEPAGE_WINDOWS_949 #define LIBESEDB_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBESEDB_CODEPAGE_WINDOWS_950 #define LIBESEDB_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBESEDB_CODEPAGE_WINDOWS_1250 #define LIBESEDB_CODEPAGE_WINDOWS_CYRILLIC LIBESEDB_CODEPAGE_WINDOWS_1251 #define LIBESEDB_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBESEDB_CODEPAGE_WINDOWS_1252 #define LIBESEDB_CODEPAGE_WINDOWS_GREEK LIBESEDB_CODEPAGE_WINDOWS_1253 #define LIBESEDB_CODEPAGE_WINDOWS_TURKISH LIBESEDB_CODEPAGE_WINDOWS_1254 #define LIBESEDB_CODEPAGE_WINDOWS_HEBREW LIBESEDB_CODEPAGE_WINDOWS_1255 #define LIBESEDB_CODEPAGE_WINDOWS_ARABIC LIBESEDB_CODEPAGE_WINDOWS_1256 #define LIBESEDB_CODEPAGE_WINDOWS_BALTIC LIBESEDB_CODEPAGE_WINDOWS_1257 #define LIBESEDB_CODEPAGE_WINDOWS_VIETNAMESE LIBESEDB_CODEPAGE_WINDOWS_1258 #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_CODEPAGE_H ) */ libesedb-20240420/include/libesedb.h0000644000175000017500000011425614610746302017741 0ustar00lordyestalordyesta/* * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_H ) #define _LIBESEDB_H #include #include #include #include #include #include #include #if defined( LIBESEDB_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBESEDB_EXTERN \ const char *libesedb_get_version( void ); /* Returns the access flags for reading */ LIBESEDB_EXTERN \ int libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_get_codepage( int *codepage, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_set_codepage( int codepage, libesedb_error_t **error ); /* Determines if a file contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature( const char *filename, libesedb_error_t **error ); #if defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature_wide( const wchar_t *filename, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBESEDB_HAVE_BFIO ) /* Determines if a file contains an ESEDB file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *bfio_handle, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_BFIO ) */ /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBESEDB_EXTERN \ void libesedb_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_notify_set_stream( FILE *stream, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_notify_stream_open( const char *filename, libesedb_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_notify_stream_close( libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees an error */ LIBESEDB_EXTERN \ void libesedb_error_free( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_fprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_sprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_backtrace_fprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_backtrace_sprint( libesedb_error_t *error, char *string, size_t size ); /* ------------------------------------------------------------------------- * File functions * ------------------------------------------------------------------------- */ /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_initialize( libesedb_file_t **file, libesedb_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_free( libesedb_file_t **file, libesedb_error_t **error ); /* Signals a file to abort its current activity * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_signal_abort( libesedb_file_t *file, libesedb_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open( libesedb_file_t *file, const char *filename, int access_flags, libesedb_error_t **error ); #if defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_wide( libesedb_file_t *file, const wchar_t *filename, int access_flags, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_BFIO ) */ /* Closes a file * Returns 0 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_close( libesedb_file_t *file, libesedb_error_t **error ); /* Retrieves the file type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_type( libesedb_file_t *file, uint32_t *type, libesedb_error_t **error ); /* Retrieves the file (current) format version * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error ); /* Retrieves the file creation version * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_creation_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error ); /* Retrieves the file page size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_page_size( libesedb_file_t *file, uint32_t *page_size, libesedb_error_t **error ); /* Retrieves the number of tables * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_number_of_tables( libesedb_file_t *file, int *number_of_tables, libesedb_error_t **error ); /* Retrieves the table for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table( libesedb_file_t *file, int table_entry, libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table for the UTF-8 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf8_name( libesedb_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table for the UTF-16 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf16_name( libesedb_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_t **table, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Table functions * ------------------------------------------------------------------------- */ /* Frees a table * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_free( libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_identifier( libesedb_table_t *table, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name_size( libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name_size( libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name_size( libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name_size( libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the number of columns in the table * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the number of columns * ignoring the template table * * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_columns( libesedb_table_t *table, int *number_of_columns, uint8_t flags, libesedb_error_t **error ); /* Retrieves the column for the specific entry * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the column * ignoring the template table * * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_column( libesedb_table_t *table, int column_entry, libesedb_column_t **column, uint8_t flags, libesedb_error_t **error ); /* Retrieves the number of indexes * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_indexes( libesedb_table_t *table, int *number_of_indexes, libesedb_error_t **error ); /* Retrieves the index for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_index( libesedb_table_t *table, int index_entry, libesedb_index_t **index, libesedb_error_t **error ); /* Retrieves the number of records in the table * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_records( libesedb_table_t *table, int *number_of_records, libesedb_error_t **error ); /* Retrieves the record for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_record( libesedb_table_t *table, int record_entry, libesedb_record_t **record, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Column functions * ------------------------------------------------------------------------- */ /* Frees a column * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_free( libesedb_column_t **column, libesedb_error_t **error ); /* Retrieves the column identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_identifier( libesedb_column_t *column, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the column type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_type( libesedb_column_t *column, uint32_t *type, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name_size( libesedb_column_t *column, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name( libesedb_column_t *column, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name_size( libesedb_column_t *column, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name( libesedb_column_t *column, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Index functions * ------------------------------------------------------------------------- */ /* Frees a index * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_free( libesedb_index_t **index, libesedb_error_t **error ); /* Retrieves the index identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_identifier( libesedb_index_t *index, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name_size( libesedb_index_t *index, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name( libesedb_index_t *index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name_size( libesedb_index_t *index, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name( libesedb_index_t *index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the number of records in the index * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_number_of_records( libesedb_index_t *index, int *number_of_records, libesedb_error_t **error ); /* Retrieves the record for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_record( libesedb_index_t *index, int record_entry, libesedb_record_t **record, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Record (row) functions * ------------------------------------------------------------------------- */ /* Frees a record * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_free( libesedb_record_t **record, libesedb_error_t **error ); /* Retrieves the number of values in the record * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_number_of_values( libesedb_record_t *record, int *number_of_values, libesedb_error_t **error ); /* Retrieves the column identifier of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_column_identifier( libesedb_record_t *record, int value_entry, uint32_t *column_identifier, libesedb_error_t **error ); /* Retrieves the column type of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_column_type( libesedb_record_t *record, int value_entry, uint32_t *column_type, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the value data size of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data_size( libesedb_record_t *record, int value_entry, size_t *value_data_size, libesedb_error_t **error ); /* Retrieves the value data of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data( libesedb_record_t *record, int value_entry, uint8_t *value_data, size_t value_data_size, libesedb_error_t **error ); /* Retrieves the value data flags of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data_flags( libesedb_record_t *record, int value_entry, uint8_t *value_data_flags, libesedb_error_t **error ); /* Retrieves the boolean value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_boolean( libesedb_record_t *record, int value_entry, uint8_t *value_boolean, libesedb_error_t **error ); /* Retrieves the 8-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_8bit( libesedb_record_t *record, int value_entry, uint8_t *value_8bit, libesedb_error_t **error ); /* Retrieves the 16-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_16bit( libesedb_record_t *record, int value_entry, uint16_t *value_16bit, libesedb_error_t **error ); /* Retrieves the 32-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_32bit( libesedb_record_t *record, int value_entry, uint32_t *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_64bit( libesedb_record_t *record, int value_entry, uint64_t *value_64bit, libesedb_error_t **error ); /* Retrieves the 64-bit filetime value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_filetime( libesedb_record_t *record, int value_entry, uint64_t *value_filetime, libesedb_error_t **error ); /* Retrieves the single precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_32bit( libesedb_record_t *record, int value_entry, float *value_floating_point_32bit, libesedb_error_t **error ); /* Retrieves the double precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_64bit( libesedb_record_t *record, int value_entry, double *value_floating_point_64bit, libesedb_error_t **error ); /* Retrieves the size of an UTF-8 encoded string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of an UTF-16 encoded string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the binary data size of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data_size( libesedb_record_t *record, int value_entry, size_t *binary_data_size, libesedb_error_t **error ); /* Retrieves the binary data value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data( libesedb_record_t *record, int value_entry, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error ); /* Determines if a specific entry is a long value * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_is_long_value( libesedb_record_t *record, int value_entry, libesedb_error_t **error ); /* Determines if a specific entry is a multi value * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_is_multi_value( libesedb_record_t *record, int value_entry, libesedb_error_t **error ); /* Retrieves the long value of a specific entry * Creates a new long value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_long_value( libesedb_record_t *record, int value_entry, libesedb_long_value_t **long_value, libesedb_error_t **error ); /* Retrieves the multi value of a specific entry * Creates a new multi value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_multi_value( libesedb_record_t *record, int value_entry, libesedb_multi_value_t **multi_value, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Record (row) functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves the value of the specific entry * Returns 1 if successful or -1 on error * * This function is deprecated use the libesedb_record_get_value_data functions instead. */ LIBESEDB_DEPRECATED \ LIBESEDB_EXTERN \ int libesedb_record_get_value( libesedb_record_t *record, int value_entry, uint8_t **value_data, size_t *value_data_size, uint8_t *value_flags, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Long value functions * ------------------------------------------------------------------------- */ /* Frees a long value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_free( libesedb_long_value_t **long_value, libesedb_error_t **error ); /* Retrieve the data size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_size( libesedb_long_value_t *long_value, size64_t *data_size, libesedb_error_t **error ); /* Retrieve the data * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data( libesedb_long_value_t *long_value, uint8_t *data, size_t data_size, libesedb_error_t **error ); /* Retrieve the number of data segments * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_number_of_data_segments( libesedb_long_value_t *long_value, int *number_of_data_segments, libesedb_error_t **error ); /* Retrieve the data segment size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment_size( libesedb_long_value_t *long_value, int data_segment_index, size_t *data_size, libesedb_error_t **error ); /* Retrieve the data segment * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment( libesedb_long_value_t *long_value, int data_segment_index, uint8_t *data_segment, size_t data_size, libesedb_error_t **error ); /* Retrieves the size of the data as an UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string_size( libesedb_long_value_t *long_value, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the data as an UTF-8 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string( libesedb_long_value_t *long_value, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the data as an UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string_size( libesedb_long_value_t *long_value, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the data as an UTF-16 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string( libesedb_long_value_t *long_value, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Multi value functions * ------------------------------------------------------------------------- */ /* Frees a multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_free( libesedb_multi_value_t **multi_value, libesedb_error_t **error ); /* Retrieves the column type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_column_type( libesedb_multi_value_t *multi_value, uint32_t *column_type, libesedb_error_t **error ); /* Retrieves the number of values in a multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_number_of_values( libesedb_multi_value_t *multi_value, int *number_of_values, libesedb_error_t **error ); /* Retrieves the value data size of the specific value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data_size( libesedb_multi_value_t *multi_value, int value_entry, size_t *value_data_size, libesedb_error_t **error ); /* Retrieves the value data of the specific value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data( libesedb_multi_value_t *multi_value, int value_entry, uint8_t *value_data, size_t value_data_size, libesedb_error_t **error ); /* Retrieves the 8-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_8bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_8bit, libesedb_error_t **error ); /* Retrieves the 16-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_16bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *value_16bit, libesedb_error_t **error ); /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_64bit, libesedb_error_t **error ); /* Retrieves the 32-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, float *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, double *value_64bit, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_filetime( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_filetime, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *binary_data_size, libesedb_error_t **error ); /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Multi value functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error * * This function is deprecated use the libesedb_multi_value_get_value_data functions instead. */ LIBESEDB_DEPRECATED \ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libesedb_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_H ) */ libesedb-20240420/include/Makefile.in0000644000175000017500000007035514610746265020075 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = libesedb.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" HEADERS = $(include_HEADERS) $(pkginclude_HEADERS) am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libesedb.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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 = \ libesedb.h pkginclude_HEADERS = \ libesedb/codepage.h \ libesedb/definitions.h \ libesedb/error.h \ libesedb/extern.h \ libesedb/features.h \ libesedb/types.h EXTRA_DIST = \ libesedb.h.in \ libesedb/definitions.h.in \ libesedb/features.h.in \ libesedb/types.h.in DISTCLEANFILES = \ libesedb.h \ libesedb/definitions.h \ libesedb/features.h \ libesedb/types.h \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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): libesedb.h: $(top_builddir)/config.status $(srcdir)/libesedb.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) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ 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|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ 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|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile 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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: uninstall-includeHEADERS uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-includeHEADERS \ uninstall-pkgincludeHEADERS .PRECIOUS: 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: libesedb-20240420/include/libesedb.h.in0000644000175000017500000011425614610727247020355 0ustar00lordyestalordyesta/* * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_H ) #define _LIBESEDB_H #include #include #include #include #include #include #include #if defined( LIBESEDB_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBESEDB_EXTERN \ const char *libesedb_get_version( void ); /* Returns the access flags for reading */ LIBESEDB_EXTERN \ int libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_get_codepage( int *codepage, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_set_codepage( int codepage, libesedb_error_t **error ); /* Determines if a file contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature( const char *filename, libesedb_error_t **error ); #if defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature_wide( const wchar_t *filename, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBESEDB_HAVE_BFIO ) /* Determines if a file contains an ESEDB file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *bfio_handle, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_BFIO ) */ /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBESEDB_EXTERN \ void libesedb_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_notify_set_stream( FILE *stream, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_notify_stream_open( const char *filename, libesedb_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_notify_stream_close( libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees an error */ LIBESEDB_EXTERN \ void libesedb_error_free( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_fprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_sprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_backtrace_fprint( libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_error_backtrace_sprint( libesedb_error_t *error, char *string, size_t size ); /* ------------------------------------------------------------------------- * File functions * ------------------------------------------------------------------------- */ /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_initialize( libesedb_file_t **file, libesedb_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_free( libesedb_file_t **file, libesedb_error_t **error ); /* Signals a file to abort its current activity * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_signal_abort( libesedb_file_t *file, libesedb_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open( libesedb_file_t *file, const char *filename, int access_flags, libesedb_error_t **error ); #if defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_wide( libesedb_file_t *file, const wchar_t *filename, int access_flags, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* defined( LIBESEDB_HAVE_BFIO ) */ /* Closes a file * Returns 0 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_close( libesedb_file_t *file, libesedb_error_t **error ); /* Retrieves the file type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_type( libesedb_file_t *file, uint32_t *type, libesedb_error_t **error ); /* Retrieves the file (current) format version * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error ); /* Retrieves the file creation version * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_creation_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error ); /* Retrieves the file page size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_page_size( libesedb_file_t *file, uint32_t *page_size, libesedb_error_t **error ); /* Retrieves the number of tables * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_number_of_tables( libesedb_file_t *file, int *number_of_tables, libesedb_error_t **error ); /* Retrieves the table for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table( libesedb_file_t *file, int table_entry, libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table for the UTF-8 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf8_name( libesedb_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table for the UTF-16 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf16_name( libesedb_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_t **table, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Table functions * ------------------------------------------------------------------------- */ /* Frees a table * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_free( libesedb_table_t **table, libesedb_error_t **error ); /* Retrieves the table identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_identifier( libesedb_table_t *table, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name_size( libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name_size( libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name_size( libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name_size( libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the number of columns in the table * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the number of columns * ignoring the template table * * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_columns( libesedb_table_t *table, int *number_of_columns, uint8_t flags, libesedb_error_t **error ); /* Retrieves the column for the specific entry * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the column * ignoring the template table * * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_column( libesedb_table_t *table, int column_entry, libesedb_column_t **column, uint8_t flags, libesedb_error_t **error ); /* Retrieves the number of indexes * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_indexes( libesedb_table_t *table, int *number_of_indexes, libesedb_error_t **error ); /* Retrieves the index for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_index( libesedb_table_t *table, int index_entry, libesedb_index_t **index, libesedb_error_t **error ); /* Retrieves the number of records in the table * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_number_of_records( libesedb_table_t *table, int *number_of_records, libesedb_error_t **error ); /* Retrieves the record for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_table_get_record( libesedb_table_t *table, int record_entry, libesedb_record_t **record, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Column functions * ------------------------------------------------------------------------- */ /* Frees a column * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_free( libesedb_column_t **column, libesedb_error_t **error ); /* Retrieves the column identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_identifier( libesedb_column_t *column, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the column type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_type( libesedb_column_t *column, uint32_t *type, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name_size( libesedb_column_t *column, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name( libesedb_column_t *column, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name_size( libesedb_column_t *column, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name( libesedb_column_t *column, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Index functions * ------------------------------------------------------------------------- */ /* Frees a index * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_free( libesedb_index_t **index, libesedb_error_t **error ); /* Retrieves the index identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_identifier( libesedb_index_t *index, uint32_t *identifier, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name_size( libesedb_index_t *index, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name( libesedb_index_t *index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name_size( libesedb_index_t *index, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name( libesedb_index_t *index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the number of records in the index * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_number_of_records( libesedb_index_t *index, int *number_of_records, libesedb_error_t **error ); /* Retrieves the record for the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_index_get_record( libesedb_index_t *index, int record_entry, libesedb_record_t **record, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Record (row) functions * ------------------------------------------------------------------------- */ /* Frees a record * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_free( libesedb_record_t **record, libesedb_error_t **error ); /* Retrieves the number of values in the record * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_number_of_values( libesedb_record_t *record, int *number_of_values, libesedb_error_t **error ); /* Retrieves the column identifier of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_column_identifier( libesedb_record_t *record, int value_entry, uint32_t *column_identifier, libesedb_error_t **error ); /* Retrieves the column type of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_column_type( libesedb_record_t *record, int value_entry, uint32_t *column_type, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the value data size of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data_size( libesedb_record_t *record, int value_entry, size_t *value_data_size, libesedb_error_t **error ); /* Retrieves the value data of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data( libesedb_record_t *record, int value_entry, uint8_t *value_data, size_t value_data_size, libesedb_error_t **error ); /* Retrieves the value data flags of the specific entry * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_data_flags( libesedb_record_t *record, int value_entry, uint8_t *value_data_flags, libesedb_error_t **error ); /* Retrieves the boolean value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_boolean( libesedb_record_t *record, int value_entry, uint8_t *value_boolean, libesedb_error_t **error ); /* Retrieves the 8-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_8bit( libesedb_record_t *record, int value_entry, uint8_t *value_8bit, libesedb_error_t **error ); /* Retrieves the 16-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_16bit( libesedb_record_t *record, int value_entry, uint16_t *value_16bit, libesedb_error_t **error ); /* Retrieves the 32-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_32bit( libesedb_record_t *record, int value_entry, uint32_t *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_64bit( libesedb_record_t *record, int value_entry, uint64_t *value_64bit, libesedb_error_t **error ); /* Retrieves the 64-bit filetime value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_filetime( libesedb_record_t *record, int value_entry, uint64_t *value_filetime, libesedb_error_t **error ); /* Retrieves the single precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_32bit( libesedb_record_t *record, int value_entry, float *value_floating_point_32bit, libesedb_error_t **error ); /* Retrieves the double precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_64bit( libesedb_record_t *record, int value_entry, double *value_floating_point_64bit, libesedb_error_t **error ); /* Retrieves the size of an UTF-8 encoded string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded string of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of an UTF-16 encoded string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded string of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* Retrieves the binary data size of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data_size( libesedb_record_t *record, int value_entry, size_t *binary_data_size, libesedb_error_t **error ); /* Retrieves the binary data value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data( libesedb_record_t *record, int value_entry, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error ); /* Determines if a specific entry is a long value * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_is_long_value( libesedb_record_t *record, int value_entry, libesedb_error_t **error ); /* Determines if a specific entry is a multi value * Returns 1 if true, 0 if not or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_is_multi_value( libesedb_record_t *record, int value_entry, libesedb_error_t **error ); /* Retrieves the long value of a specific entry * Creates a new long value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_long_value( libesedb_record_t *record, int value_entry, libesedb_long_value_t **long_value, libesedb_error_t **error ); /* Retrieves the multi value of a specific entry * Creates a new multi value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBESEDB_EXTERN \ int libesedb_record_get_multi_value( libesedb_record_t *record, int value_entry, libesedb_multi_value_t **multi_value, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Record (row) functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves the value of the specific entry * Returns 1 if successful or -1 on error * * This function is deprecated use the libesedb_record_get_value_data functions instead. */ LIBESEDB_DEPRECATED \ LIBESEDB_EXTERN \ int libesedb_record_get_value( libesedb_record_t *record, int value_entry, uint8_t **value_data, size_t *value_data_size, uint8_t *value_flags, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Long value functions * ------------------------------------------------------------------------- */ /* Frees a long value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_free( libesedb_long_value_t **long_value, libesedb_error_t **error ); /* Retrieve the data size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_size( libesedb_long_value_t *long_value, size64_t *data_size, libesedb_error_t **error ); /* Retrieve the data * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data( libesedb_long_value_t *long_value, uint8_t *data, size_t data_size, libesedb_error_t **error ); /* Retrieve the number of data segments * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_number_of_data_segments( libesedb_long_value_t *long_value, int *number_of_data_segments, libesedb_error_t **error ); /* Retrieve the data segment size * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment_size( libesedb_long_value_t *long_value, int data_segment_index, size_t *data_size, libesedb_error_t **error ); /* Retrieve the data segment * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment( libesedb_long_value_t *long_value, int data_segment_index, uint8_t *data_segment, size_t data_size, libesedb_error_t **error ); /* Retrieves the size of the data as an UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string_size( libesedb_long_value_t *long_value, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the data as an UTF-8 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string( libesedb_long_value_t *long_value, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the data as an UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string_size( libesedb_long_value_t *long_value, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the data as an UTF-16 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string( libesedb_long_value_t *long_value, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Multi value functions * ------------------------------------------------------------------------- */ /* Frees a multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_free( libesedb_multi_value_t **multi_value, libesedb_error_t **error ); /* Retrieves the column type * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_column_type( libesedb_multi_value_t *multi_value, uint32_t *column_type, libesedb_error_t **error ); /* Retrieves the number of values in a multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_number_of_values( libesedb_multi_value_t *multi_value, int *number_of_values, libesedb_error_t **error ); /* Retrieves the value data size of the specific value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data_size( libesedb_multi_value_t *multi_value, int value_entry, size_t *value_data_size, libesedb_error_t **error ); /* Retrieves the value data of the specific value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data( libesedb_multi_value_t *multi_value, int value_entry, uint8_t *value_data, size_t value_data_size, libesedb_error_t **error ); /* Retrieves the 8-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_8bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_8bit, libesedb_error_t **error ); /* Retrieves the 16-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_16bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *value_16bit, libesedb_error_t **error ); /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_64bit, libesedb_error_t **error ); /* Retrieves the 32-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, float *value_32bit, libesedb_error_t **error ); /* Retrieves the 64-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, double *value_64bit, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_filetime( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_filetime, libesedb_error_t **error ); /* Retrieves the size of the UTF-8 encoded string 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf8_string_size, libesedb_error_t **error ); /* Retrieves the UTF-8 encoded 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error ); /* Retrieves the size of the UTF-16 encoded string 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf16_string_size, libesedb_error_t **error ); /* Retrieves the UTF-16 encoded 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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_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 */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *binary_data_size, libesedb_error_t **error ); /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error ); /* ------------------------------------------------------------------------- * Multi value functions - deprecated * ------------------------------------------------------------------------- */ /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error * * This function is deprecated use the libesedb_multi_value_get_value_data functions instead. */ LIBESEDB_DEPRECATED \ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libesedb_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_H ) */ libesedb-20240420/common/0000755000175000017500000000000014610746413015656 5ustar00lordyestalordyestalibesedb-20240420/common/config_borlandc.h0000644000175000017500000000167514610727247021155 0ustar00lordyestalordyesta/* * Configuration for the Borland/CodeGear C++ Builder compiler * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _CONFIG_BORLANDC_H ) #define _CONFIG_BORLANDC_H #endif /* !defined( _CONFIG_BORLANDC_H ) */ libesedb-20240420/common/file_stream.h0000644000175000017500000000744614610727247020340 0ustar00lordyestalordyesta/* * FILE stream functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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__ ) /* Borland BCC previous to version 5.6.0 cannot handle the macro form: MACRO( ... ) */ #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 /* !defined( _FILE_STREAM_H ) */ libesedb-20240420/common/memory.h0000644000175000017500000000627314610727247017353 0ustar00lordyestalordyesta/* * Memory functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _MEMORY_H ) #define _MEMORY_H #include "common.h" #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 /* Note that 128 MiB is an arbitrary selected upper limit here */ #define MEMORY_MAXIMUM_ALLOCATION_SIZE \ ( 128 * 1024 * 1024 ) /* Memory allocation */ #if defined( HAVE_GLIB_H ) #define memory_allocate( size ) \ g_malloc( (gsize) size ) #elif defined( WINAPI ) #define memory_allocate( size ) \ HeapAlloc( GetProcessHeap(), 0, (SIZE_T) size ) #elif defined( HAVE_MALLOC ) #define memory_allocate( size ) \ malloc( 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( 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 ) #elif defined( HAVE_REALLOC ) #define memory_reallocate( buffer, size ) \ realloc( (void *) buffer, size ) #endif /* Memory free */ #if defined( HAVE_GLIB_H ) #define memory_free( buffer ) \ g_free( (gpointer) buffer ) #elif defined( WINAPI ) #define memory_free( buffer ) \ ( buffer == NULL ) ? TRUE : HeapFree( GetProcessHeap(), 0, (LPVOID) buffer ) #elif defined( HAVE_FREE ) #define memory_free( buffer ) \ free( (void *) 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 /* !defined( _MEMORY_H ) */ libesedb-20240420/common/byte_stream.h0000644000175000017500000002430514610727247020355 0ustar00lordyestalordyesta/* * Byte stream functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _BYTE_STREAM_H ) */ libesedb-20240420/common/common.h0000644000175000017500000000234214610727247017324 0ustar00lordyestalordyesta/* * Common include file * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _COMMON_H ) #define _COMMON_H #if defined( HAVE_CONFIG_H ) #include "config.h" #endif /* Include the Borland/CodeGear C++ Builder compiler specific configuration */ #if defined( __BORLANDC__ ) #include "config_borlandc.h" /* Include the Microsoft Visual Studio C++ compiler specific configuration */ #elif defined( _MSC_VER ) #include "config_msc.h" #endif #include "config_winapi.h" #endif /* !defined( _COMMON_H ) */ libesedb-20240420/common/config_winapi.h0000644000175000017500000000451614610727247020655 0ustar00lordyestalordyesta/* * Configuration file for WINAPI * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _CONFIG_WINAPI_H ) #define _CONFIG_WINAPI_H /* Define the earliest supported WINAPI version #define WINVER 0x0501 */ /* If necessary make sure WINAPI is defined */ #if defined( HAVE_WINDOWS_H ) || defined( __BORLANDC__ ) || defined( _MSC_VER ) #include #endif #if defined( WINAPI ) /* 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 integer for WINAPI */ #if !defined( SIZEOF_INT ) #define SIZEOF_INT 4 #endif /* Define the size of size_t for WINAPI * Do not define when pyconfig.h has been included via python.h */ #if !defined( HAVE_PYCONFIG_H ) #if !defined( SIZEOF_SIZE_T ) #if __WORDSIZE == 64 #define SIZEOF_SIZE_T 8 #else #define SIZEOF_SIZE_T 4 #endif #endif #endif /* !defined( HAVE_PYCONFIG_H ) */ /* Define the size of the wide character for WINAPI */ #if !defined( SIZEOF_WCHAR_T ) #define SIZEOF_WCHAR_T 2 #endif /* Enable the DllMain function */ #define HAVE_DLLMAIN 1 /* Enable verbose output #define HAVE_VERBOSE_OUTPUT 1 */ /* Enable debug output #define HAVE_DEBUG_OUTPUT 1 */ /* Enable both the narrow and wide character functions */ #if !defined( HAVE_WIDE_CHARACTER_TYPE ) #define HAVE_WIDE_CHARACTER_TYPE 1 #endif /* If not controlled by config.h enable multi-thread support */ #if !defined( HAVE_CONFIG_H ) && !defined( HAVE_MULTI_THREAD_SUPPORT ) #define HAVE_MULTI_THREAD_SUPPORT 1 #endif #endif /* defined( WINAPI ) */ #endif /* !defined( _CONFIG_WINAPI_H ) */ libesedb-20240420/common/system_string.h0000644000175000017500000001100314610727247020740 0ustar00lordyestalordyesta/* * System character string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _SYSTEM_STRING_H ) #define _SYSTEM_STRING_H #include "common.h" #include "narrow_string.h" #include "types.h" #include "wide_string.h" #if defined( _cplusplus ) extern "C" { #endif #if defined( 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 _SYSTEM_STRING_INTERMEDIATE( string ) \ L ## string #define _SYSTEM_STRING( string ) \ _SYSTEM_STRING_INTERMEDIATE( string ) #define system_string_allocate( size ) \ wide_string_allocate( size ) #define system_string_reallocate( string, size ) \ wide_string_reallocate( string, size ) #define system_string_compare( destination, source, size ) \ wide_string_compare( destination, source, size ) #define system_string_compare_no_case( destination, source, size ) \ wide_string_compare_no_case( destination, source, size ) #define system_string_copy( destination, source, size ) \ wide_string_copy( destination, source, size ) #define system_string_length( string ) \ wide_string_length( string ) #define system_string_search_character( string, character, size ) \ wide_string_search_character( string, character, size ) #define system_string_search_character_reverse( string, character, size ) \ wide_string_search_character_reverse( string, character, size ) #define system_string_search_string( string, substring, size ) \ wide_string_search_string( string, substring, size ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define system_string_sprintf \ wide_string_snwprintf #else #define system_string_sprintf( string, size, format, ... ) \ wide_string_snwprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define system_string_vsnprintf \ wide_string_vsnwprintf #else #define system_string_vsnprintf( string, size, format, ... ) \ wide_string_vsnwprintf( string, size, format, __VA_ARGS__ ) #endif #else #define _SYSTEM_STRING( string ) \ string #define system_string_allocate( size ) \ narrow_string_allocate( size ) #define system_string_reallocate( string, size ) \ narrow_string_reallocate( string, size ) #define system_string_compare( destination, source, size ) \ narrow_string_compare( destination, source, size ) #define system_string_compare_no_case( destination, source, size ) \ narrow_string_compare_no_case( destination, source, size ) #define system_string_copy( destination, source, size ) \ narrow_string_copy( destination, source, size ) #define system_string_length( string ) \ narrow_string_length( string ) #define system_string_search_character( string, character, size ) \ narrow_string_search_character( string, character, size ) #define system_string_search_character_reverse( string, character, size ) \ narrow_string_search_character_reverse( string, character, size ) #define system_string_search_string( string, substring, size ) \ narrow_string_search_string( string, substring, size ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define system_string_sprintf \ narrow_string_snprintf #else #define system_string_sprintf( string, size, format, ... ) \ narrow_string_snprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define system_string_vsnprintf \ narrow_string_vsnprintf #else #define system_string_vsnprintf( string, size, format, ... ) \ narrow_string_vsnprintf( string, size, format, __VA_ARGS__ ) #endif #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ /* For backwards compatibility */ #define system_string_vsprintf system_string_vsnprintf #if defined( _cplusplus ) } #endif #endif /* !defined( _SYSTEM_STRING_H ) */ libesedb-20240420/common/Makefile.am0000644000175000017500000000052714610730402017705 0ustar00lordyestalordyestaAM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ common.h \ config.h \ config_borlandc.h \ config_msc.h \ config_winapi.h \ file_stream.h \ memory.h \ narrow_string.h \ system_string.h \ types.h \ types.h.in \ wide_string.h DISTCLEANFILES = \ config.h \ types.h \ Makefile \ Makefile.in libesedb-20240420/common/types.h.in0000644000175000017500000001631714610727247017614 0ustar00lordyestalordyesta/* * Type and type-support definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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> #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) #define HAVE_WIDE_SYSTEM_CHARACTER 1 /* The system character type is wide * A system string contains either UTF-16 or UTF-32 */ typedef wchar_t system_character_t; typedef wint_t system_integer_t; #define PRIc_SYSTEM "lc" #define PRIs_SYSTEM "ls" #else /* The system character type is narrow * A system string contains either UTF-8 or extended ASCII with a codepage */ typedef char system_character_t; typedef int system_integer_t; #define PRIc_SYSTEM "c" #define PRIs_SYSTEM "s" #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */ /* Fallback for systems without PRI definitions * Do not define when pyconfig.h has been included via python.h */ #if !defined( HAVE_PYCONFIG_H ) #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 /* !defined( PRId32 ) */ #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif /* !defined( PRId64 ) */ #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 /* !defined( PRIi32 ) */ #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif /* !defined( PRIi64 ) */ #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 /* !defined( PRIu32 ) */ #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif /* !defined( PRIu64 ) */ #if !defined( PRIo8 ) #define PRIo8 "o" #endif #if !defined( PRIo16 ) #define PRIo16 "o" #endif #if !defined( PRIo32 ) #if defined( WINAPI ) #define PRIo32 "I32o" #else #define PRIo32 "o" #endif #endif /* !defined( PRIo32 ) */ #if !defined( PRIo64 ) #if defined( WINAPI ) #define PRIo64 "I64o" #elif __WORDSIZE == 64 #define PRIo64 "lo" #else #define PRIo64 "llo" #endif #endif /* !defined( PRIo64 ) */ #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 /* !defined( PRIx32 ) */ #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* !defined( PRIx64 ) */ #endif /* !defined( HAVE_PYCONFIG_H ) */ /* Fallback 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 /* defined( HAVE_PRINTF_JD ) */ /* Fallback 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( _MSC_VER ) #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 /* defined( HAVE_PRINTF_ZD ) */ /* Fallback 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 (0x7ffff) */ #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 minimum signed 64-bit integer is -9223372036854775808 (0x8000000000000000) */ #if !defined( INT64_MIN ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MIN (0x8000000000000000UL) #else #define INT64_MIN (0x8000000000000000ULL) #endif #endif /* !defined( INT64_MIN ) */ /* 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 /* !defined( INT64_MAX ) */ /* The maximum unsigned 64-bit integer is 18446744073709551615 (0xffffffffffffffff) */ #if !defined( UINT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define UINT64_MAX (0xffffffffffffffffUL) #else #define UINT64_MAX (0xffffffffffffffffULL) #endif #endif /* !defined( UINT64_MAX ) */ /* 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 long integer */ #if !defined( LONG_MAX ) #define LONG_MAX INT32_MAX #endif /* The maximum unsigned long integer */ #if !defined( ULONG_MAX ) #define ULONG_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 #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif /* !defined( _TYPES_H ) */ libesedb-20240420/common/types.h0000644000175000017500000001631614610746302017177 0ustar00lordyestalordyesta/* * Type and type-support definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) #define HAVE_WIDE_SYSTEM_CHARACTER 1 /* The system character type is wide * A system string contains either UTF-16 or UTF-32 */ typedef wchar_t system_character_t; typedef wint_t system_integer_t; #define PRIc_SYSTEM "lc" #define PRIs_SYSTEM "ls" #else /* The system character type is narrow * A system string contains either UTF-8 or extended ASCII with a codepage */ typedef char system_character_t; typedef int system_integer_t; #define PRIc_SYSTEM "c" #define PRIs_SYSTEM "s" #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */ /* Fallback for systems without PRI definitions * Do not define when pyconfig.h has been included via python.h */ #if !defined( HAVE_PYCONFIG_H ) #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 /* !defined( PRId32 ) */ #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif /* !defined( PRId64 ) */ #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 /* !defined( PRIi32 ) */ #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif /* !defined( PRIi64 ) */ #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 /* !defined( PRIu32 ) */ #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif /* !defined( PRIu64 ) */ #if !defined( PRIo8 ) #define PRIo8 "o" #endif #if !defined( PRIo16 ) #define PRIo16 "o" #endif #if !defined( PRIo32 ) #if defined( WINAPI ) #define PRIo32 "I32o" #else #define PRIo32 "o" #endif #endif /* !defined( PRIo32 ) */ #if !defined( PRIo64 ) #if defined( WINAPI ) #define PRIo64 "I64o" #elif __WORDSIZE == 64 #define PRIo64 "lo" #else #define PRIo64 "llo" #endif #endif /* !defined( PRIo64 ) */ #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 /* !defined( PRIx32 ) */ #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* !defined( PRIx64 ) */ #endif /* !defined( HAVE_PYCONFIG_H ) */ /* Fallback 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 /* defined( HAVE_PRINTF_JD ) */ /* Fallback 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( _MSC_VER ) #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 /* defined( HAVE_PRINTF_ZD ) */ /* Fallback 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 (0x7ffff) */ #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 minimum signed 64-bit integer is -9223372036854775808 (0x8000000000000000) */ #if !defined( INT64_MIN ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MIN (0x8000000000000000UL) #else #define INT64_MIN (0x8000000000000000ULL) #endif #endif /* !defined( INT64_MIN ) */ /* 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 /* !defined( INT64_MAX ) */ /* The maximum unsigned 64-bit integer is 18446744073709551615 (0xffffffffffffffff) */ #if !defined( UINT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define UINT64_MAX (0xffffffffffffffffUL) #else #define UINT64_MAX (0xffffffffffffffffULL) #endif #endif /* !defined( UINT64_MAX ) */ /* 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 long integer */ #if !defined( LONG_MAX ) #define LONG_MAX INT32_MAX #endif /* The maximum unsigned long integer */ #if !defined( ULONG_MAX ) #define ULONG_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 #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif /* !defined( _TYPES_H ) */ libesedb-20240420/common/config.h.in0000644000175000017500000004114514610746264017712 0ustar00lordyestalordyesta/* 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 Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* Define to 1 if you have the Mac OS 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 `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the `close' function. */ #undef HAVE_CLOSE /* Define to 1 if you have the header file. */ #undef HAVE_CYGWIN_FS_H /* 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 to enable the DllMain function. */ #undef HAVE_DLLMAIN /* 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 `fmemopen' function. */ #undef HAVE_FMEMOPEN /* 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 `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 dlsym function is available in GNU dl. */ #undef HAVE_GNU_DL_DLSYM /* 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 `ioctl' function. */ #undef HAVE_IOCTL /* 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 `cdata' library (-lcdata). */ #undef HAVE_LIBCDATA /* Define to 1 if you have the header file. */ #undef HAVE_LIBCDATA_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 `cthreads' library (-lcthreads). */ #undef HAVE_LIBCTHREADS /* Define to 1 if you have the header file. */ #undef HAVE_LIBCTHREADS_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* 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 `mapidb' library (-lmapidb). */ #undef HAVE_LIBMAPIDB /* Define to 1 if you have the header file. */ #undef HAVE_LIBMAPIDB_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 header file. */ #undef HAVE_LINUX_FS_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 the local version of libbfio is used. */ #undef HAVE_LOCAL_LIBBFIO /* Define to 1 if the local version of libcdata is used. */ #undef HAVE_LOCAL_LIBCDATA /* 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 libcthreads is used. */ #undef HAVE_LOCAL_LIBCTHREADS /* 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 libmapidb is used. */ #undef HAVE_LOCAL_LIBMAPIDB /* 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 `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 `mkstemp' function. */ #undef HAVE_MKSTEMP /* Define to 1 if multi thread support should be used. */ #undef HAVE_MULTI_THREAD_SUPPORT /* 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 if you have the posix_fadvise function. */ #undef HAVE_POSIX_FADVISE /* 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 the 'pthread' library (-lpthread). */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the header file. */ #undef HAVE_PYTHON_H /* 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 `setenv' function. */ #undef HAVE_SETENV /* 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_STDIO_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 if you have `strerror_r'. */ #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 `strnicmp' function. */ #undef HAVE_STRNICMP /* 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_DISKLABEL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DISK_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* 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_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* 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 `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unlink' function. */ #undef HAVE_UNLINK /* 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 `wcsnicmp' function. */ #undef HAVE_WCSNICMP /* 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 where 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 `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* 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 all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* 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 libesedb-20240420/common/config.h0000644000175000017500000004312614610746302017277 0ustar00lordyestalordyesta/* 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 Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ /* Define to 1 if you have the Mac OS 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 `clock_gettime' function. */ #define HAVE_CLOCK_GETTIME 1 /* Define to 1 if you have the `close' function. */ #define HAVE_CLOSE 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_CYGWIN_FS_H */ /* Define if the GNU dcgettext() function is already present or preinstalled. */ #define HAVE_DCGETTEXT 1 /* 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. */ #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 to enable the DllMain function. */ /* #undef HAVE_DLLMAIN */ /* 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 `fmemopen' function. */ #define HAVE_FMEMOPEN 1 /* 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 `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 dlsym function is available in GNU dl. */ #define HAVE_GNU_DL_DLSYM 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 `ioctl' function. */ #define HAVE_IOCTL 1 /* 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 `cdata' library (-lcdata). */ /* #undef HAVE_LIBCDATA */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCDATA_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 `cthreads' library (-lcthreads). */ /* #undef HAVE_LIBCTHREADS */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCTHREADS_H */ /* Define to 1 if you have the `dl' library (-ldl). */ #define HAVE_LIBDL 1 /* 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 `mapidb' library (-lmapidb). */ /* #undef HAVE_LIBMAPIDB */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBMAPIDB_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. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_FS_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 the local version of libbfio is used. */ #define HAVE_LOCAL_LIBBFIO 1 /* Define to 1 if the local version of libcdata is used. */ #define HAVE_LOCAL_LIBCDATA 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 libcthreads is used. */ #define HAVE_LOCAL_LIBCTHREADS 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 libmapidb is used. */ #define HAVE_LOCAL_LIBMAPIDB 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 `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 `mkstemp' function. */ #define HAVE_MKSTEMP 1 /* Define to 1 if multi thread support should be used. */ #define HAVE_MULTI_THREAD_SUPPORT 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 if you have the posix_fadvise function. */ #define HAVE_POSIX_FADVISE 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 the 'pthread' library (-lpthread). */ #define HAVE_PTHREAD 1 /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PYTHON_H */ /* 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 `setenv' function. */ #define HAVE_SETENV 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_STDIO_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 if you have `strerror_r'. */ #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 `strnicmp' function. */ /* #undef HAVE_STRNICMP */ /* 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. */ /* #undef HAVE_SYS_DISKLABEL_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_DISK_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* 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_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 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 `tzset' function. */ #define HAVE_TZSET 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 /* 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. */ #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 `wcsnicmp' function. */ /* #undef HAVE_WCSNICMP */ /* 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 where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "libesedb" /* 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 "libesedb" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "libesedb 20240420" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libesedb" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "20240420" /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 /* 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. */ #define SIZEOF_WCHAR_T 4 /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "20240420" /* 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 */ libesedb-20240420/common/wide_string.h0000644000175000017500000001171014610727247020351 0ustar00lordyestalordyesta/* * Wide character string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _WIDE_STRING_H ) #define _WIDE_STRING_H #include "common.h" #include "memory.h" #include "types.h" #if defined( HAVE_WCHAR_H ) || defined( WINAPI ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* Intermediate version of the macro required * for correct evaluation predefined string */ #define _WIDE_STRING_INTERMEDIATE( string ) \ L ## string #define _WIDE_STRING( string ) \ _WIDE_STRING_INTERMEDIATE( string ) /* String allocation */ #define wide_string_allocate( size ) \ (wchar_t *) memory_allocate( sizeof( wchar_t ) * ( size ) ) /* String reallocation */ #define wide_string_reallocate( string, size ) \ (wchar_t *) memory_reallocate( string, ( sizeof( wchar_t ) * ( size ) ) ) /* String length */ #if defined( HAVE_WCSLEN ) || defined( WINAPI ) #define wide_string_length( string ) \ wcslen( string ) #endif /* String compare */ #if defined( HAVE_WMEMCMP ) #define wide_string_compare( string1, string2, size ) \ wmemcmp( (void *) string1, (void *) string2, size ) #elif defined( HAVE_WCSNCMP ) || defined( WINAPI ) #define wide_string_compare( string1, string2, size ) \ wcsncmp( string1, string2, size ) #endif /* Caseless string compare */ #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ >= 0x0551 ) ) #define wide_string_compare_no_case( string1, string2, size ) \ _wcsnicmp( string1, string2, size ) #elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_WCSNICMP ) #define wide_string_compare_no_case( string1, string2, size ) \ wcsnicmp( string1, string2, size ) #elif defined( HAVE_WCSNCASECMP ) #define wide_string_compare_no_case( string1, string2, size ) \ wcsncasecmp( string1, string2, size ) #elif defined( HAVE_WCSCASECMP ) #define wide_string_compare_no_case( string1, string2, size ) \ wcscasecmp( string1, string2 ) #endif /* String copy */ #if defined( HAVE_WMEMCPY ) #define wide_string_copy( destination, source, size ) \ (wchar_t *) wmemcpy( (void *) destination, (void *) source, size ) #elif defined( HAVE_WCSNCPY ) || defined( WINAPI ) #define wide_string_copy( destination, source, size ) \ wcsncpy( destination, source, size ) #endif /* String character search */ #if defined( HAVE_WMEMCHR ) #define wide_string_search_character( string, character, size ) \ (wchar_t *) wmemchr( (void *) string, (wchar_t) character, size ) #elif defined( HAVE_WCSCHR ) || defined( WINAPI ) #define wide_string_search_character( string, character, size ) \ wcschr( string, (wchar_t) character ) #endif /* String reverse character search */ #if defined( HAVE_WMEMRCHR ) #define wide_string_search_character_reverse( string, character, size ) \ (wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size ) #elif defined( HAVE_WCSRCHR ) || defined( WINAPI ) /* (void)(size) is used to suppress unused variable warnings */ #define wide_string_search_character_reverse( string, character, size ) \ wcsrchr( string, (wchar_t) character ); (void)(size) #endif /* String sub-string search */ #if defined( HAVE_WCSSTR ) || defined( WINAPI ) #define wide_string_search_string( string, substring, size ) \ wcsstr( string, substring ) #endif /* String formatted print (snwprintf) */ #if defined( _MSC_VER ) #define wide_string_snwprintf( target, size, ... ) \ swprintf_s( target, size, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define wide_string_snwprintf \ snwprintf #elif defined( WINAPI ) #define wide_string_snwprintf( target, size, ... ) \ snwprintf( target, size, __VA_ARGS__ ) #elif defined( HAVE_SWPRINTF ) #define 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 wide_string_vsnwprintf \ _vsnwprintf #elif defined( WINAPI ) #define wide_string_vsnwprintf( string, size, format, ... ) \ _vsnwprintf( string, size, format, __VA_ARGS__ ) #elif defined( HAVE_VSWPRINTF ) #define wide_string_vsnwprintf( string, size, format, ... ) \ vswprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _WIDE_STRING_H ) */ libesedb-20240420/common/narrow_string.h0000644000175000017500000001245314610727247020736 0ustar00lordyestalordyesta/* * Narrow character string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _NARROW_STRING_H ) #define _NARROW_STRING_H #include "common.h" #include "memory.h" #include "types.h" #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 /* String allocation */ #define narrow_string_allocate( size ) \ (char *) memory_allocate( sizeof( char ) * ( size ) ) /* String reallocation */ #define narrow_string_reallocate( string, size ) \ (char *) memory_reallocate( string, ( sizeof( char ) * ( size ) ) ) /* String length */ #if defined( HAVE_STRLEN ) || defined( WINAPI ) #define narrow_string_length( string ) \ strlen( string ) #endif /* String compare */ #if defined( HAVE_MEMCMP ) || defined( WINAPI ) #define narrow_string_compare( string1, string2, size ) \ memcmp( (void *) string1, (void *) string2, size ) #elif defined( HAVE_STRNCMP ) #define narrow_string_compare( string1, string2, size ) \ strncmp( string1, string2, size ) #endif /* Caseless string compare */ #if defined( HAVE_GLIB_H ) #define narrow_string_compare_no_case( string1, string2, size ) \ g_ascii_strncasecmp( string1, string2, size ) #elif defined( _MSC_VER ) #define narrow_string_compare_no_case( string1, string2, size ) \ _strnicmp( string1, string2, size ) #elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_STRNICMP ) #define narrow_string_compare_no_case( string1, string2, size ) \ strnicmp( string1, string2, size ) #elif defined( HAVE_STRNCASECMP ) #define narrow_string_compare_no_case( string1, string2, size ) \ strncasecmp( string1, string2, size ) #elif defined( HAVE_STRCASECMP ) #define narrow_string_compare_no_case( string1, string2, size ) \ strcasecmp( string1, string2 ) #endif /* String copy */ #if defined( HAVE_MEMCPY ) || defined( WINAPI ) #define narrow_string_copy( destination, source, size ) \ (char *) memcpy( (void *) destination, (void *) source, size ) #elif defined( HAVE_STRNCPY ) #define narrow_string_copy( destination, source, size ) \ strncpy( destination, source, size ) #endif /* String character search */ #if defined( HAVE_MEMCHR ) || defined( WINAPI ) #define narrow_string_search_character( string, character, size ) \ (char *) memchr( (void *) string, (int) character, size ) #elif defined( HAVE_STRCHR ) #define 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 narrow_string_search_character_reverse( string, character, size ) \ (char *) memrchr( (void *) string, (int) character, size ) #elif defined( HAVE_STRRCHR ) || defined( WINAPI ) /* (void)(size) is used to suppress unused variable warnings */ #define narrow_string_search_character_reverse( string, character, size ) \ strrchr( string, (int) character ); (void)(size) #endif /* String sub-string search */ #if defined( HAVE_STRSTR ) || defined( WINAPI ) #define narrow_string_search_string( string, substring, size ) \ strstr( string, substring ) #endif /* String formatted print (snprintf) */ #if defined( HAVE_GLIB_H ) #define narrow_string_snprintf( target, size, ... ) \ g_snprintf( target, size, __VA_ARGS__ ) #elif defined( _MSC_VER ) #define narrow_string_snprintf( target, size, ... ) \ sprintf_s( target, size, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define narrow_string_snprintf \ snprintf #elif defined( HAVE_SNPRINTF ) || defined( WINAPI ) #define narrow_string_snprintf( target, size, ... ) \ snprintf( target, size, __VA_ARGS__ ) #endif /* String input conversion (sscanf) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define narrow_string_sscanf \ sscanf #elif defined( HAVE_SSCANF ) || defined( WINAPI ) #define 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 narrow_string_vsnprintf( string, size, format, ... ) \ g_vsnprintf( string, size, format, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define narrow_string_vsnprintf \ vsnprintf #elif defined( HAVE_VSNPRINTF ) || defined( WINAPI ) #define narrow_string_vsnprintf( string, size, format, ... ) \ vsnprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _NARROW_STRING_H ) */ libesedb-20240420/common/config_msc.h0000644000175000017500000000220514610727247020141 0ustar00lordyestalordyesta/* * Configuration for the Microsoft Visual Studio C++ compiler * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _CONFIG_MSC_H ) #define _CONFIG_MSC_H /* 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 /* !defined( _CONFIG_MSC_H ) */ libesedb-20240420/common/Makefile.in0000644000175000017500000006252714610746265017744 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = types.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/types.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ common.h \ config.h \ config_borlandc.h \ config_msc.h \ config_winapi.h \ file_stream.h \ memory.h \ narrow_string.h \ system_string.h \ types.h \ types.h.in \ wide_string.h DISTCLEANFILES = \ config.h \ types.h \ Makefile \ Makefile.in all: config.h $(MAKE) $(AM_MAKEFLAGS) 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 common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 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)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am 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 -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: 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: libesedb-20240420/libclocale/0000755000175000017500000000000014610746413016457 5ustar00lordyestalordyestalibesedb-20240420/libclocale/libclocale_wide_string.c0000644000175000017500000000366114610746226023322 0ustar00lordyestalordyesta/* * Wide character string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libclocale_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 libclocale_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 ) */ libesedb-20240420/libclocale/libclocale_support.h0000644000175000017500000000260414610746226022521 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCLOCALE_SUPPORT_H ) */ libesedb-20240420/libclocale/Makefile.am0000644000175000017500000000140714610746226020517 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCLOCALE AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ noinst_LTLIBRARIES = libclocale.la libclocale_la_SOURCES = \ libclocale_codepage.c libclocale_codepage.h \ libclocale_definitions.h \ libclocale_extern.h \ libclocale_libcerror.h \ libclocale_locale.c libclocale_locale.h \ libclocale_support.c libclocale_support.h \ libclocale_unused.h \ libclocale_wide_string.c libclocale_wide_string.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) libesedb-20240420/libclocale/libclocale_definitions.h0000644000175000017500000000652414610746226023325 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libclocale version string */ #define LIBCLOCALE_VERSION_STRING "20240414" /* The codepage feature flag definitions */ enum LIBCLOCALE_CODEPAGES_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_CODEPAGES_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 }; #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCLOCALE_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libclocale/libclocale_unused.h0000644000175000017500000000262014610746226022306 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCLOCALE_UNUSED_H ) #define _LIBCLOCALE_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 /* !defined( _LIBCLOCALE_UNUSED_H ) */ libesedb-20240420/libclocale/libclocale_libcerror.h0000644000175000017500000000252514610746226022772 0ustar00lordyestalordyesta/* * The internal libcerror header * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libclocale/libclocale_locale.h0000644000175000017500000000326514610746226022250 0ustar00lordyestalordyesta/* * Locale functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( WINAPI ) && ( WINVER < 0x0500 ) */ int libclocale_locale_get_codepage_from_charset( int *codepage, char *charset, size_t charset_length, libcerror_error_t **error ); 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 /* !defined( _LIBCLOCALE_LOCALE_H ) */ libesedb-20240420/libclocale/libclocale_support.c0000644000175000017500000000610614610746226022515 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_LIBINTL_H ) && defined( ENABLE_NLS ) #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( 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 ) && defined( LOCALEDIR ) 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 /* defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) && defined( LOCALEDIR ) */ #if !defined( 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 /* !defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } libesedb-20240420/libclocale/libclocale_codepage.c0000644000175000017500000005105114610746226022547 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libclocale_codepage.h" #include "libclocale_definitions.h" #include "libclocale_libcerror.h" #include "libclocale_wide_string.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_949 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_950 ) && ( 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( 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( 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( 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( 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( narrow_string_compare_no_case( string, "cp", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC; } else if( 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_950; } 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( 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( 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( 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( 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( wide_string_compare_no_case( string, L"cp", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC; } else if( 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_950; } 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 ) */ libesedb-20240420/libclocale/libclocale_locale.c0000644000175000017500000002465714610746226022253 0ustar00lordyestalordyesta/* * Locale functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #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_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( _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 /* defined( WINAPI ) && ( WINVER < 0x0500 ) */ /* Retrieves the codepage from the locale character set * The codepage is set to 0 if the character set is UTF-8 * and will default to LIBCLOCALE_CODEPAGE_ASCII the codepage cannot be determined * Returns 1 if successful or -1 on error */ int libclocale_locale_get_codepage_from_charset( int *codepage, char *charset, size_t charset_length, libcerror_error_t **error ) { static char *function = "libclocale_locale_get_codepage_from_charset"; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } if( charset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid charset.", function ); return( -1 ); } if( charset_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid charset length value exceeds maximum.", function ); return( -1 ); } /* Determine codepage */ *codepage = -1; if( *codepage == -1 ) { if( charset_length == 5 ) { if( narrow_string_compare_no_case( "UTF-8", charset, 5 ) == 0 ) { *codepage = 0; } } } if( *codepage == -1 ) { if( charset_length >= 3 ) { if( narrow_string_compare( "874", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_874; } else if( narrow_string_compare( "932", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_932; } else if( narrow_string_compare( "936", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_936; } else if( narrow_string_compare( "949", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } else if( narrow_string_compare( "950", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_950; } } } if( *codepage == -1 ) { if( charset_length >= 4 ) { if( narrow_string_compare( "1250", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1250; } else if( narrow_string_compare( "1251", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1251; } else if( narrow_string_compare( "1252", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252; } else if( narrow_string_compare( "1253", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1253; } else if( narrow_string_compare( "1254", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1254; } else if( narrow_string_compare( "1255", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1255; } else if( narrow_string_compare( "1256", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1256; } else if( narrow_string_compare( "1257", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1257; } else if( narrow_string_compare( "1258", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1258; } else if( narrow_string_compare_no_case( "utf8", charset, 4 ) == 0 ) { *codepage = 0; } } } if( *codepage == -1 ) { *codepage = LIBCLOCALE_CODEPAGE_ASCII; } return( 1 ); } /* Retrieves the codepage for the locale character set * The codepage is set to 0 if the character set is UTF-8 * and will default to LIBCLOCALE_CODEPAGE_ASCII the codepage cannot be determined * Returns 1 if successful 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 = 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 ) ) { *codepage = LIBCLOCALE_CODEPAGE_ASCII; return( 1 ); } locale_length = narrow_string_length( locale ); charset = narrow_string_search_character( locale, '.', locale_length + 1 ); if( charset == NULL ) { *codepage = LIBCLOCALE_CODEPAGE_ASCII; return( 1 ); } charset++; charset_length = locale_length - (size_t) ( charset - locale ); } if( libclocale_locale_get_codepage_from_charset( codepage, charset, charset_length, 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 ); } /* 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; int read_count = 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 ) read_count = GetLocaleInfoEx( LOCALE_NAME_USER_DEFAULT, LOCALE_SDECIMAL, (LPWSTR) &locale_data, sizeof( DWORD ) / sizeof( wchar_t ) ); #elif ( WINVER >= 0x0500 ) read_count = GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ); #else read_count = libclocale_GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ); #endif if( read_count == 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 ); } *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 ); } libesedb-20240420/libclocale/Makefile.in0000644000175000017500000007464514610746265020551 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_locale.c \ libclocale_locale.h libclocale_support.c libclocale_support.h \ libclocale_unused.h libclocale_wide_string.c \ libclocale_wide_string.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 \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_wide_string.lo libclocale_la_OBJECTS = $(am_libclocale_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCLOCALE_TRUE@am_libclocale_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libclocale_codepage.Plo \ ./$(DEPDIR)/libclocale_locale.Plo \ ./$(DEPDIR)/libclocale_support.Plo \ ./$(DEPDIR)/libclocale_wide_string.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libclocale_la_SOURCES) DIST_SOURCES = $(am__libclocale_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ @LIBCERROR_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_locale.c libclocale_locale.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.c libclocale_support.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_unused.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_wide_string.c libclocale_wide_string.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libclocale.la: $(libclocale_la_OBJECTS) $(libclocale_la_DEPENDENCIES) $(EXTRA_libclocale_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_locale.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_wide_string.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libclocale_codepage.Plo -rm -f ./$(DEPDIR)/libclocale_locale.Plo -rm -f ./$(DEPDIR)/libclocale_support.Plo -rm -f ./$(DEPDIR)/libclocale_wide_string.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libclocale_codepage.Plo -rm -f ./$(DEPDIR)/libclocale_locale.Plo -rm -f ./$(DEPDIR)/libclocale_support.Plo -rm -f ./$(DEPDIR)/libclocale_wide_string.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libclocale/libclocale_extern.h0000644000175000017500000000260714610746226022315 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCLOCALE_EXTERN_VARIABLE extern #else #define LIBCLOCALE_EXTERN_VARIABLE LIBCLOCALE_EXTERN #endif #else #define LIBCLOCALE_EXTERN /* extern */ #define LIBCLOCALE_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCLOCALE_INTERNAL_EXTERN_H ) */ libesedb-20240420/libclocale/libclocale_wide_string.h0000644000175000017500000000324014610746226023320 0ustar00lordyestalordyesta/* * Wide character string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCLOCALE_WIDE_STRING_H ) #define _LIBCLOCALE_WIDE_STRING_H #include #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( wide_string_compare_no_case ) #define wide_string_compare_no_case( string1, string2, size ) \ libclocale_wide_string_compare_no_case( string1, string2, size ) #endif /* !defined( wide_string_compare_no_case ) */ #if defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) int libclocale_wide_string_compare_no_case( const wchar_t *string1, const wchar_t *string2, size_t comparision_length ); #endif /* defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCLOCALE_WIDE_STRING_H ) */ libesedb-20240420/libclocale/libclocale_codepage.h0000644000175000017500000000365114610746226022557 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #if defined( __CYGWIN__ ) && ( __GNUC__ < 10 ) int libclocale_codepage; #else LIBCLOCALE_EXTERN_VARIABLE \ int libclocale_codepage; #endif 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 /* !defined( _LIBCLOCALE_CODEPAGE_H ) */ libesedb-20240420/libfcache/0000755000175000017500000000000014610746414016267 5ustar00lordyestalordyestalibesedb-20240420/libfcache/libfcache_libcdata.h0000644000175000017500000000301714610746234022164 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFCACHE_LIBCDATA_H ) #define _LIBFCACHE_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBFCACHE_LIBCDATA_H ) */ libesedb-20240420/libfcache/libfcache_types.h0000644000175000017500000000312314610746234021563 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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; typedef struct libfcache_cache_value {} libfcache_cache_value_t; #else typedef intptr_t libfcache_cache_t; typedef intptr_t libfcache_cache_value_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFCACHE_INTERNAL_TYPES_H ) */ libesedb-20240420/libfcache/libfcache_cache_value.c0000644000175000017500000003025514610746234022657 0ustar00lordyestalordyesta/* * Cache value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfcache_cache_value.h" #include "libfcache_definitions.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" /* Creates a cache value * Make sure the value cache_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfcache_cache_value_initialize( libfcache_cache_value_t **cache_value, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ); } internal_cache_value = memory_allocate_structure( libfcache_internal_cache_value_t ); if( internal_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( internal_cache_value, 0, sizeof( libfcache_internal_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; } internal_cache_value->file_index = -1; internal_cache_value->offset = (off64_t) -1; *cache_value = (libfcache_cache_value_t *) internal_cache_value; return( 1 ); on_error: if( internal_cache_value != NULL ) { memory_free( internal_cache_value ); } return( -1 ); } /* Frees a 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 ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ) { internal_cache_value = (libfcache_internal_cache_value_t *) *cache_value; *cache_value = NULL; if( internal_cache_value->value != NULL ) { if( ( internal_cache_value->flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { if( internal_cache_value->value_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid cache value - missing value free function.", function ); result = -1; } else if( internal_cache_value->value_free_function( &( internal_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( internal_cache_value ); } return( result ); } /* Clears the cache value * This function does not free the value * Returns 1 if successful or -1 on error */ int libfcache_cache_value_clear( libfcache_cache_value_t *cache_value, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; static char *function = "libfcache_cache_value_free"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; if( memory_set( internal_cache_value, 0, sizeof( libfcache_internal_cache_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear cache value.", function ); return( -1 ); } internal_cache_value->file_index = -1; internal_cache_value->offset = (off64_t) -1; return( 1 ); } /* 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, int *file_index, off64_t *offset, int64_t *timestamp, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; if( file_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file index.", 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 ); } *file_index = internal_cache_value->file_index; *offset = internal_cache_value->offset; *timestamp = internal_cache_value->timestamp; return( 1 ); } /* Retrieves the cache value cache index * Returns 1 if successful or -1 on error */ int libfcache_cache_value_get_cache_index( libfcache_cache_value_t *cache_value, int *cache_index, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; static char *function = "libfcache_cache_value_get_cache_index"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; if( cache_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache index.", function ); return( -1 ); } *cache_index = internal_cache_value->cache_index; 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, int file_index, off64_t offset, int64_t timestamp, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; internal_cache_value->file_index = file_index; internal_cache_value->offset = offset; internal_cache_value->timestamp = timestamp; return( 1 ); } /* Sets the cache value cache index * Returns 1 if successful or -1 on error */ int libfcache_cache_value_set_cache_index( libfcache_cache_value_t *cache_value, int cache_index, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; static char *function = "libfcache_cache_value_set_cache_index"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; internal_cache_value->cache_index = cache_index; 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 ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = internal_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 (*value_free_function)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfcache_internal_cache_value_t *internal_cache_value = NULL; 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 ); } internal_cache_value = (libfcache_internal_cache_value_t *) cache_value; if( ( flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { 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( ( internal_cache_value->flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { if( internal_cache_value->value != NULL ) { if( internal_cache_value->value_free_function == 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( internal_cache_value->value_free_function( &( internal_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 ); } } internal_cache_value->flags &= ~( LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ); } internal_cache_value->value = value; internal_cache_value->value_free_function = value_free_function; internal_cache_value->flags |= flags; return( 1 ); } libesedb-20240420/libfcache/libfcache_unused.h0000644000175000017500000000261014610746234021722 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFCACHE_UNUSED_H ) #define _LIBFCACHE_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 /* !defined( _LIBFCACHE_UNUSED_H ) */ libesedb-20240420/libfcache/Makefile.am0000644000175000017500000000155414610746234020330 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFCACHE AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfcache.la libfcache_la_SOURCES = \ libfcache_cache.c libfcache_cache.h \ libfcache_cache_value.c libfcache_cache_value.h \ libfcache_date_time.c libfcache_date_time.h \ libfcache_definitions.h \ libfcache_error.c libfcache_error.h \ libfcache_extern.h \ libfcache_libcdata.h \ libfcache_libcerror.h \ libfcache_support.c libfcache_support.h \ libfcache_types.h \ libfcache_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) libesedb-20240420/libfcache/libfcache_support.h0000644000175000017500000000232614610746234022137 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFCACHE_SUPPORT_H ) */ libesedb-20240420/libfcache/libfcache_error.h0000644000175000017500000000343214610746234021553 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFCACHE_INTERNAL_ERROR_H ) */ libesedb-20240420/libfcache/libfcache_support.c0000644000175000017500000000223214610746234022126 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) */ libesedb-20240420/libfcache/libfcache_cache.h0000644000175000017500000000733614610746234021474 0ustar00lordyestalordyesta/* * The cache functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFCACHE_CACHE_H ) #define _LIBFCACHE_CACHE_H #include #include #include "libfcache_cache_value.h" #include "libfcache_extern.h" #include "libfcache_libcdata.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 */ libcdata_array_t *entries_array; /* The cache entries list */ libcdata_list_t *entries_list; /* 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_empty( 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_resize( libfcache_cache_t *cache, int maximum_cache_entries, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_get_number_of_entries( libfcache_cache_t *cache, int *number_of_entries, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_get_number_of_cache_values( libfcache_cache_t *cache, int *number_of_values, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_clear_value_by_index( libfcache_cache_t *cache, int cache_entry_index, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_get_value_by_identifier( libfcache_cache_t *cache, int file_index, off64_t offset, int64_t timestamp, libfcache_cache_value_t **cache_value, libcerror_error_t **error ); LIBFCACHE_EXTERN \ 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_EXTERN \ int libfcache_cache_set_value_by_identifier( libfcache_cache_t *cache, int file_index, off64_t offset, int64_t timestamp, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_set_value_by_index( libfcache_cache_t *cache, int cache_entry_index, int file_index, off64_t offset, int64_t timestamp, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_CACHE_H ) */ libesedb-20240420/libfcache/libfcache_error.c0000644000175000017500000000555414610746234021555 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfcache_error_sprint( libfcache_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfcache_error_backtrace_sprint( libfcache_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ libesedb-20240420/libfcache/libfcache_libcerror.h0000644000175000017500000000264114610746234022406 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFCACHE_LIBCERROR_H ) */ libesedb-20240420/libfcache/libfcache_date_time.c0000644000175000017500000000432314610746234022350 0ustar00lordyestalordyesta/* * Date and time functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #if defined( HAVE_SYS_TIME_H ) #include #endif #include #include "libfcache_date_time.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" /* Retrieves the cache value timestamp * Returns 1 if successful or -1 on error */ int libfcache_date_time_get_timestamp( int64_t *timestamp, libcerror_error_t **error ) { #if defined( HAVE_CLOCK_GETTIME ) struct timespec time_structure; #endif static char *function = "libfcache_date_time_get_timestamp"; if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid timestamp.", function ); return( -1 ); } #if defined( HAVE_CLOCK_GETTIME ) if( clock_gettime( CLOCK_REALTIME, &time_structure ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current time structure.", function ); return( -1 ); } *timestamp = ( (int64_t) time_structure.tv_sec * 1000000000 ) + time_structure.tv_nsec; #else *timestamp = (int64_t) time( NULL ); if( *timestamp == (time_t) -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current time.", function ); return( -1 ); } #endif /* defined( HAVE_CLOCK_GETTIME ) */ return( 1 ); } libesedb-20240420/libfcache/libfcache_extern.h0000644000175000017500000000257214610746234021733 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFCACHE_EXTERN_VARIABLE extern #else #define LIBFCACHE_EXTERN_VARIABLE LIBFCACHE_EXTERN #endif #else #define LIBFCACHE_EXTERN /* extern */ #define LIBFCACHE_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFCACHE_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfcache/libfcache_cache_value.h0000644000175000017500000000613114610746234022660 0ustar00lordyestalordyesta/* * Cache value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFCACHE_CACHE_VALUE_H ) #define _LIBFCACHE_CACHE_VALUE_H #include #include #include "libfcache_extern.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfcache_internal_cache_value libfcache_internal_cache_value_t; struct libfcache_internal_cache_value { /* The cache index */ int cache_index; /* The file index */ int file_index; /* The offset */ off64_t offset; /* The timestamp */ int64_t timestamp; /* The value */ intptr_t *value; /* The value free function */ int (*value_free_function)( 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 ); LIBFCACHE_EXTERN \ int libfcache_cache_value_free( libfcache_cache_value_t **cache_value, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_clear( libfcache_cache_value_t *cache_value, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_get_identifier( libfcache_cache_value_t *cache_value, int *file_index, off64_t *offset, int64_t *timestamp, libcerror_error_t **error ); int libfcache_cache_value_get_cache_index( libfcache_cache_value_t *cache_value, int *cache_index, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_set_identifier( libfcache_cache_value_t *cache_value, int file_index, off64_t offset, int64_t timestamp, libcerror_error_t **error ); int libfcache_cache_value_set_cache_index( libfcache_cache_value_t *cache_value, int cache_index, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_get_value( libfcache_cache_value_t *cache_value, intptr_t **value, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_value_set_value( libfcache_cache_value_t *cache_value, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_CACHE_VALUE_H ) */ libesedb-20240420/libfcache/Makefile.in0000644000175000017500000007564214610746265020356 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_cache.c libfcache_cache.h \ libfcache_cache_value.c libfcache_cache_value.h \ libfcache_date_time.c libfcache_date_time.h \ libfcache_definitions.h libfcache_error.c libfcache_error.h \ libfcache_extern.h libfcache_libcdata.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_cache.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_cache_value.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_date_time.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_error.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_support.lo libfcache_la_OBJECTS = $(am_libfcache_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFCACHE_TRUE@am_libfcache_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfcache_cache.Plo \ ./$(DEPDIR)/libfcache_cache_value.Plo \ ./$(DEPDIR)/libfcache_date_time.Plo \ ./$(DEPDIR)/libfcache_error.Plo \ ./$(DEPDIR)/libfcache_support.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfcache_la_SOURCES) DIST_SOURCES = $(am__libfcache_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFCACHE_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBFCACHE_TRUE@noinst_LTLIBRARIES = libfcache.la @HAVE_LOCAL_LIBFCACHE_TRUE@libfcache_la_SOURCES = \ @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.c 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_libcdata.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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfcache.la: $(libfcache_la_OBJECTS) $(libfcache_la_DEPENDENCIES) $(EXTRA_libfcache_la_DEPENDENCIES) $(AM_V_CCLD)$(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_cache.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_cache_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_date_time.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_support.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfcache_cache.Plo -rm -f ./$(DEPDIR)/libfcache_cache_value.Plo -rm -f ./$(DEPDIR)/libfcache_date_time.Plo -rm -f ./$(DEPDIR)/libfcache_error.Plo -rm -f ./$(DEPDIR)/libfcache_support.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfcache_cache.Plo -rm -f ./$(DEPDIR)/libfcache_cache_value.Plo -rm -f ./$(DEPDIR)/libfcache_date_time.Plo -rm -f ./$(DEPDIR)/libfcache_error.Plo -rm -f ./$(DEPDIR)/libfcache_support.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfcache/libfcache_date_time.h0000644000175000017500000000234214610746234022354 0ustar00lordyestalordyesta/* * Date and time functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFCACHE_DATE_TIME_H ) #define _LIBFCACHE_DATE_TIME_H #include #include "libfcache_extern.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBFCACHE_EXTERN \ int libfcache_date_time_get_timestamp( int64_t *timestamp, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFCACHE_DATE_TIME_H ) */ libesedb-20240420/libfcache/libfcache_definitions.h0000644000175000017500000000322014610746234022730 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libfcache version string */ #define LIBFCACHE_VERSION_STRING "20240414" /* 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 /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBFCACHE_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfcache/libfcache_cache.c0000644000175000017500000006311214610746234021461 0ustar00lordyestalordyesta/* * The cache functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfcache_cache.h" #include "libfcache_cache_value.h" #include "libfcache_definitions.h" #include "libfcache_libcdata.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" /* Creates a cache * Make sure the value cache is referencing, is set to NULL * 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 ); memory_free( internal_cache ); return( -1 ); } if( libcdata_array_initialize( &( internal_cache->entries_array ), 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; } if( libcdata_list_initialize( &( internal_cache->entries_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create entries list.", function ); goto on_error; } *cache = (libfcache_cache_t *) internal_cache; return( 1 ); on_error: if( internal_cache != NULL ) { if( internal_cache->entries_array != NULL ) { libcdata_array_free( &( internal_cache->entries_array ), NULL, NULL ); } memory_free( internal_cache ); } return( -1 ); } /* Frees a 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( libcdata_list_free( &( internal_cache->entries_list ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the entries list.", function ); result = -1; } if( libcdata_array_free( &( internal_cache->entries_array ), (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 ); } /* Empties the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_empty( libfcache_cache_t *cache, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_empty"; 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( libcdata_list_empty( internal_cache->entries_list, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty entries list.", function ); return( -1 ); } if( libcdata_array_clear( internal_cache->entries_array, (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 ); } /* 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( libcdata_array_get_number_of_entries( internal_source_cache->entries_array, &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 ); } /* Resizes the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_resize( libfcache_cache_t *cache, int maximum_cache_entries, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_resize"; 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( libcdata_array_resize( internal_cache->entries_array, maximum_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_RESIZE_FAILED, "%s: unable to resize entries array.", 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( libcdata_array_get_number_of_entries( internal_cache->entries_array, 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( libcdata_list_get_number_of_elements( internal_cache->entries_list, 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 elements from entries list.", function ); return( -1 ); } return( 1 ); } /* Clears the cache value for the specific index * Returns 1 if successful or -1 on error */ int libfcache_cache_clear_value_by_index( libfcache_cache_t *cache, int cache_entry_index, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_clear_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( libcdata_array_get_entry_by_index( internal_cache->entries_array, 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( libfcache_cache_value_clear( cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to clear cache value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the cache value that matches the file index, offset and timestamp * Returns 1 if successful, 0 if no such value or -1 on error */ int libfcache_cache_get_value_by_identifier( libfcache_cache_t *cache, int file_index, off64_t offset, int64_t timestamp, libfcache_cache_value_t **cache_value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; libfcache_cache_value_t *safe_cache_value = NULL; libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_get_value_by_identifier"; off64_t cache_value_offset = 0; int64_t cache_value_timestamp = 0; int cache_value_file_index = 0; int number_of_cache_values = 0; int result = 0; 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( 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 = NULL; if( libcdata_list_get_number_of_elements( internal_cache->entries_list, &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 elements from entries list.", function ); return( -1 ); } if( libcdata_list_get_first_element( internal_cache->entries_list, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first list element.", function ); return( -1 ); } while( list_element != NULL ) { if( libcdata_list_element_get_value( list_element, (intptr_t **) &safe_cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( safe_cache_value, &cache_value_file_index, &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( ( cache_value_file_index == file_index ) && ( cache_value_offset == offset ) && ( cache_value_timestamp == timestamp ) ) { result = 1; break; } if( libcdata_list_element_get_next_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next list element.", function ); return( -1 ); } } if( ( result != 0 ) && ( number_of_cache_values > 0 ) ) { if( libcdata_list_remove_element( internal_cache->entries_list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove list element.", function ); return( -1 ); } if( libcdata_list_prepend_element( internal_cache->entries_list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend list element.", function ); return( -1 ); } *cache_value = safe_cache_value; } return( result ); } /* 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( libcdata_array_get_entry_by_index( internal_cache->entries_array, 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 file index, offset and timestamp * Returns 1 if successful or -1 on error */ int libfcache_cache_set_value_by_identifier( libfcache_cache_t *cache, int file_index, off64_t offset, int64_t timestamp, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; libfcache_cache_value_t *cache_value = NULL; libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_set_value_by_identifier"; int cache_entry_index = 0; int number_of_cache_entries = 0; int number_of_cache_values = 0; 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( libcdata_array_get_number_of_entries( internal_cache->entries_array, &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 entries array.", function ); return( -1 ); } if( libcdata_list_get_number_of_elements( internal_cache->entries_list, &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 elements from entries list.", function ); return( -1 ); } if( number_of_cache_values < number_of_cache_entries ) { cache_entry_index = number_of_cache_values; 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_cache_value_set_cache_index( cache_value, cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set cache index in cache value.", function ); libfcache_cache_value_free( &cache_value, NULL ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_cache->entries_array, 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 ); } if( libcdata_list_prepend_value( internal_cache->entries_list, (intptr_t *) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend cache value: %d to entries list.", function ); return( -1 ); } } else { if( libcdata_list_get_last_element( internal_cache->entries_list, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last list element.", function ); return( -1 ); } if( libcdata_list_element_get_value( list_element, (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 from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_cache_index( cache_value, &cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache index from cache value.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_cache->entries_array, 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( libfcache_cache_value_set_identifier( cache_value, file_index, 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 ); } if( libfcache_cache_value_set_value( cache_value, value, value_free_function, 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 ); } 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, int file_index, off64_t offset, int64_t timestamp, intptr_t *value, int (*value_free_function)( 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( libcdata_array_get_entry_by_index( internal_cache->entries_array, 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_cache_value_set_cache_index( cache_value, cache_entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set cache index in cache value.", function ); libfcache_cache_value_free( &cache_value, NULL ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_cache->entries_array, 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 ); } if( libcdata_list_prepend_value( internal_cache->entries_list, (intptr_t *) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend cache value: %d to entries list.", function ); return( -1 ); } } if( libfcache_cache_value_set_value( cache_value, value, value_free_function, 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, file_index, 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 ); } libesedb-20240420/Makefile.am0000644000175000017500000000431614610730457016427 0ustar00lordyestalordyestaACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ include \ common \ libcerror \ libcthreads \ libcdata \ libclocale \ libcnotify \ libcsplit \ libuna \ libcfile \ libcpath \ libbfio \ libfcache \ libfdata \ libfdatetime \ libfguid \ libfvalue \ libfwnt \ libesedb \ libfmapi \ libmapidb \ esedbtools \ pyesedb \ po \ manuals \ tests \ ossfuzz \ msvscpp DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/rules \ dpkg/libesedb.install \ dpkg/libesedb-dev.install \ dpkg/libesedb-python3.install \ dpkg/libesedb-tools.install \ dpkg/source/format GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libesedb.pc.in SETUP_PY_FILES = \ pyproject.toml \ setup.cfg \ setup.cfg.in \ setup.py SPEC_FILES = \ libesedb.spec \ libesedb.spec.in EXTRA_DIST = \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SETUP_PY_FILES) \ $(SPEC_FILES) DISTCLEANFILES = \ config.status \ config.cache \ config.log \ libesedb.pc \ libesedb.spec \ Makefile \ Makefile.in \ po/Makevars pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libesedb.pc libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck lib: library library: (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdata && $(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)/libesedb && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) libesedb-20240420/libbfio/0000755000175000017500000000000014610746413015774 5ustar00lordyestalordyestalibesedb-20240420/libbfio/libbfio_file_range.h0000644000175000017500000000510614610746221021725 0ustar00lordyestalordyesta/* * File range functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_FILE_RANGE_H ) #define _LIBBFIO_FILE_RANGE_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_range_initialize( libbfio_handle_t **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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_RANGE_H ) */ libesedb-20240420/libbfio/libbfio_file_range_io_handle.c0000644000175000017500000006562714610746221023740 0ustar00lordyestalordyesta/* * File range IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_file_io_handle.h" #include "libbfio_file_range_io_handle.h" #include "libbfio_libcerror.h" /* Creates a file range IO handle * Make sure the value file_range_io_handle is referencing, is set to NULL * 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 ); } /* Frees a file range IO handle * 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 IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_get_name_size( libbfio_file_range_io_handle_t *file_range_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_name_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( 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 IO handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_get_name( libbfio_file_range_io_handle_t *file_range_io_handle, char *name, size_t name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_name"; 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_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 IO handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_set_name( libbfio_file_range_io_handle_t *file_range_io_handle, const char *name, size_t name_length, libcerror_error_t **error ) { static char *function = "libbfio_file_range_set_name"; 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_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 IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_get_name_size_wide( libbfio_file_range_io_handle_t *file_range_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_name_size_wide"; 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_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 IO handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_get_name_wide( libbfio_file_range_io_handle_t *file_range_io_handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_name_wide"; 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_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 IO handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_set_name_wide( libbfio_file_range_io_handle_t *file_range_io_handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { static char *function = "libbfio_file_range_set_name_wide"; 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_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 IO handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_get( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_get"; 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( 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 IO 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_io_handle_set( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_set"; 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( 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 IO handle * Returns 1 if successful or -1 on error */ int libbfio_file_range_io_handle_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_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_io_handle_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_io_handle_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_io_handle_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 IO handle * Returns 0 if successful or -1 on error */ int libbfio_file_range_io_handle_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_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_io_handle_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 IO handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_file_range_io_handle_read_buffer( 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_io_handle_read_buffer"; 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_io_handle_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_io_handle_read_buffer( 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 IO handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_file_range_io_handle_write_buffer( 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_io_handle_write_buffer"; 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_io_handle_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_io_handle_write_buffer( 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 IO handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_file_range_io_handle_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_io_handle_seek_offset"; off64_t file_offset = 0; off64_t seek_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_io_handle_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 ); } } seek_offset = libbfio_file_io_handle_seek_offset( file_range_io_handle->file_io_handle, 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: %" PRIi64 " in file IO handle.", function, offset ); return( -1 ); } if( seek_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: %" PRIi64 " value out of bounds.", function, seek_offset ); return( -1 ); } seek_offset -= file_range_io_handle->range_offset; return( seek_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_io_handle_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_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_io_handle_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 IO handle is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_file_range_io_handle_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_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_io_handle_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_io_handle_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_io_handle_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_io_handle_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 ); } libesedb-20240420/libbfio/libbfio_support.c0000644000175000017500000000442414610746221021343 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libbfio_definitions.h" #include "libbfio_libcerror.h" #include "libbfio_libclocale.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 ) */ libesedb-20240420/libbfio/libbfio_libcpath.h0000644000175000017500000000252214610746221021417 0ustar00lordyestalordyesta/* * The internal libcpath header * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCPATH ) */ #endif /* !defined( _LIBBFIO_LIBCPATH_H ) */ libesedb-20240420/libbfio/libbfio_error.h0000644000175000017500000000335414610746221020766 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBBFIO_INTERNAL_ERROR_H ) */ libesedb-20240420/libbfio/libbfio_libclocale.h0000644000175000017500000000266014610746221021725 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBBFIO_LIBCLOCALE_H ) */ libesedb-20240420/libbfio/libbfio_error.c0000644000175000017500000000552014610746221020756 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libbfio_error_sprint( libbfio_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libbfio_error_backtrace_sprint( libbfio_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ libesedb-20240420/libbfio/libbfio_libuna.h0000644000175000017500000000330514610746221021103 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBBFIO_LIBUNA_H ) */ libesedb-20240420/libbfio/libbfio_file_io_handle.h0000644000175000017500000000776514610746221022570 0ustar00lordyestalordyesta/* * File IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_FILE_IO_HANDLE_H ) #define _LIBBFIO_FILE_IO_HANDLE_H #include #include #include "libbfio_libcerror.h" #include "libbfio_libcfile.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 */ 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 ); 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 ); 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 ) 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_io_handle_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_io_handle_close( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_io_handle_read_buffer( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_file_io_handle_write_buffer( libbfio_file_io_handle_t *file_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_file_io_handle_seek_offset( libbfio_file_io_handle_t *file_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_file_io_handle_exists( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_io_handle_is_open( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_io_handle_get_size( libbfio_file_io_handle_t *file_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_IO_HANDLE_H ) */ libesedb-20240420/libbfio/libbfio_file_pool.h0000644000175000017500000000403514610746221021602 0ustar00lordyestalordyesta/* * File pool functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_open( libbfio_pool_t *pool, int entry, const char *name, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_pool_open_wide( libbfio_pool_t *pool, int entry, const wchar_t *name, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ 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 /* !defined( _LIBBFIO_FILE_POOL_H ) */ libesedb-20240420/libbfio/libbfio_file_range.c0000644000175000017500000002763214610746221021730 0ustar00lordyestalordyesta/* * File range functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_file_range.h" #include "libbfio_file_range_io_handle.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" /* Creates a file range handle * Make sure the value handle is referencing, is set to NULL * 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_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_io_handle_read_buffer, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_io_handle_write_buffer, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_range_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_file_range_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_range_io_handle != NULL ) { libbfio_file_range_io_handle_free( &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; 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( libbfio_file_range_io_handle_get_name_size( (libbfio_file_range_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 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; 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( libbfio_file_range_io_handle_get_name( (libbfio_file_range_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 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; 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( libbfio_file_range_io_handle_set_name( (libbfio_file_range_io_handle_t *) internal_handle->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; 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( libbfio_file_range_io_handle_get_name_size_wide( (libbfio_file_range_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 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; 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( libbfio_file_range_io_handle_get_name_wide( (libbfio_file_range_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 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; 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( libbfio_file_range_io_handle_set_name_wide( (libbfio_file_range_io_handle_t *) internal_handle->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; 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( libbfio_file_range_io_handle_get( (libbfio_file_range_io_handle_t *) internal_handle->io_handle, range_offset, range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from file IO handle.", function ); return( -1 ); } 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; 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( libbfio_file_range_io_handle_set( (libbfio_file_range_io_handle_t *) internal_handle->io_handle, range_offset, range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set range in file IO handle.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libbfio/libbfio_types.h0000644000175000017500000000304414610746221020775 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _LIBBFIO_INTERNAL_TYPES_H ) */ libesedb-20240420/libbfio/libbfio_unused.h0000644000175000017500000000257014610746221021137 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_UNUSED_H ) #define _LIBBFIO_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 /* !defined( _LIBBFIO_UNUSED_H ) */ libesedb-20240420/libbfio/libbfio_libcdata.h0000644000175000017500000000301114610746221021366 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_LIBCDATA_H ) #define _LIBBFIO_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBBFIO_LIBCDATA_H ) */ libesedb-20240420/libbfio/libbfio_file.h0000644000175000017500000000427214610746221020554 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_FILE_H ) #define _LIBBFIO_FILE_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_initialize( libbfio_handle_t **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 ); #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 ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_H ) */ libesedb-20240420/libbfio/Makefile.am0000644000175000017500000000266714610746221020040 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBBFIO AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @PTHREAD_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_io_handle.c libbfio_file_io_handle.h \ libbfio_file_pool.c libbfio_file_pool.h \ libbfio_file_range.c libbfio_file_range.h \ libbfio_file_range_io_handle.c libbfio_file_range_io_handle.h \ libbfio_handle.c libbfio_handle.h \ libbfio_libcdata.h \ libbfio_libcerror.h \ libbfio_libcfile.h \ libbfio_libclocale.h \ libbfio_libcpath.h \ libbfio_libcthreads.h \ libbfio_libuna.h \ libbfio_memory_range.c libbfio_memory_range.h \ libbfio_memory_range_io_handle.c libbfio_memory_range_io_handle.h \ libbfio_pool.c libbfio_pool.h \ libbfio_support.c libbfio_support.h \ libbfio_system_string.c libbfio_system_string.h \ libbfio_types.h \ libbfio_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libbfio ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libbfio_la_SOURCES) libesedb-20240420/libbfio/libbfio_libcfile.h0000644000175000017500000000261414610746221021404 0ustar00lordyestalordyesta/* * The internal libcfile header * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCFILE ) */ #endif /* !defined( _LIBBFIO_LIBCFILE_H ) */ libesedb-20240420/libbfio/libbfio_definitions.h0000644000175000017500000000522414610746221022146 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libbfio version string */ #define LIBBFIO_VERSION_STRING "20240414" /* 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 /* !defined( _LIBBFIO_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libbfio/libbfio_codepage.h0000644000175000017500000000506614610746221021406 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_CODEPAGE_H ) #define _LIBBFIO_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif /* 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 ) #include #else /* The codepage definitions */ enum LIBBFIO_CODEPAGES { 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 /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_INTERNAL_CODEPAGE_H ) */ libesedb-20240420/libbfio/libbfio_file_io_handle.c0000644000175000017500000006433514610746221022557 0ustar00lordyestalordyesta/* * File IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "libbfio_definitions.h" #include "libbfio_file_io_handle.h" #include "libbfio_libcerror.h" #include "libbfio_libcfile.h" #include "libbfio_system_string.h" /* Creates a file IO handle * Make sure the value file_io_handle is referencing, is set to NULL * 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 ); } /* Frees a file IO handle * 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source file IO handle - missing name.", function ); goto on_error; } if( source_file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) { 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 = 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( 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 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( 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_system_string_size_to_narrow_string( file_io_handle->name, file_io_handle->name_size, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } 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"; 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_system_string_copy_to_narrow_string( file_io_handle->name, file_io_handle->name_size, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); return( -1 ); } 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 ) || ( name_length > ( (size_t) SSIZE_MAX - 1 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name length value out of bounds.", 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( libbfio_system_string_size_from_narrow_string( name, name_length + 1, &( file_io_handle->name_size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); goto on_error; } if( ( file_io_handle->name_size == 0 ) || ( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file IO handle - name size value out of bounds.", function ); goto on_error; } file_io_handle->name = 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( libbfio_system_string_copy_from_narrow_string( file_io_handle->name, file_io_handle->name_size, name, name_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } 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 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( 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_system_string_size_to_wide_string( file_io_handle->name, file_io_handle->name_size, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } 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"; 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_system_string_copy_to_wide_string( file_io_handle->name, file_io_handle->name_size, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); return( -1 ); } 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 ) || ( name_length > ( (size_t) SSIZE_MAX - 1 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name length value out of bounds.", 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( libbfio_system_string_size_from_wide_string( name, name_length + 1, &( file_io_handle->name_size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); goto on_error; } if( ( file_io_handle->name_size == 0 ) || ( file_io_handle->name_size > ( (size_t) SSIZE_MAX / sizeof( system_character_t ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file IO handle - name size value out of bounds.", function ); goto on_error; } file_io_handle->name = 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( libbfio_system_string_copy_from_wide_string( file_io_handle->name, file_io_handle->name_size, name, name_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } 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_io_handle_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_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( 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_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } file_io_handle->access_flags = access_flags; return( 1 ); } /* Closes the file handle * Returns 0 if successful or -1 on error */ int libbfio_file_io_handle_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_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_io_handle_read_buffer( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_read_buffer"; 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_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_io_handle_write_buffer( 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_buffer"; 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_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_io_handle_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"; off64_t seek_offset = 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 ); } seek_offset = libcfile_file_seek_offset( file_io_handle->file, 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: %" PRIi64 " in file: %" PRIs_SYSTEM ".", function, offset, file_io_handle->name ); return( -1 ); } return( seek_offset ); } /* Function to determine if a file exists * Returns 1 if file exists, 0 if not or -1 on error */ int libbfio_file_io_handle_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( 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_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_io_handle_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_io_handle_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_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( 1 ); } libesedb-20240420/libbfio/libbfio_support.h0000644000175000017500000000265014610746221021347 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBBFIO_SUPPORT_H ) */ libesedb-20240420/libbfio/libbfio_memory_range.h0000644000175000017500000000307614610746221022322 0ustar00lordyestalordyesta/* * Memory range functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 LIBBFIO_EXTERN \ int libbfio_memory_range_initialize( libbfio_handle_t **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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_MEMORY_RANGE_H ) */ libesedb-20240420/libbfio/libbfio_file_pool.c0000644000175000017500000002505614610746221021603 0ustar00lordyestalordyesta/* * File pool functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #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_pool.h" #include "libbfio_types.h" /* Opens a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_file_pool_open( libbfio_pool_t *pool, int entry, const char *name, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libbfio_file_pool_open"; size_t name_length = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", 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( 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; } name_length = narrow_string_length( name ); if( libbfio_file_set_name( file_io_handle, name, 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.", function ); goto on_error; } if( libbfio_handle_open( 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 ); goto on_error; } if( libbfio_pool_set_handle( pool, entry, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set file IO handle: %d in pool.", function, entry ); goto on_error; } 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 handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_file_pool_open_wide( libbfio_pool_t *pool, int entry, const wchar_t *name, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libbfio_file_pool_open_wide"; size_t name_length = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", 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( 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; } name_length = wide_string_length( name ); if( libbfio_file_set_name_wide( file_io_handle, name, 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.", function ); goto on_error; } if( libbfio_handle_open( 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 ); goto on_error; } if( libbfio_pool_set_handle( pool, entry, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set file IO handle: %d in pool.", function, entry ); goto on_error; } return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #endif /* 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( 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 = 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 = 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 ) */ libesedb-20240420/libbfio/libbfio_file_range_io_handle.h0000644000175000017500000001130614610746221023726 0ustar00lordyestalordyesta/* * File range IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_FILE_RANGE_IO_HANDLE_H ) #define _LIBBFIO_FILE_RANGE_IO_HANDLE_H #include #include #include "libbfio_file_io_handle.h" #include "libbfio_libcerror.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 ); 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 ); int libbfio_file_range_io_handle_get_name_size( libbfio_file_range_io_handle_t *file_range_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_get_name( libbfio_file_range_io_handle_t *file_range_io_handle, char *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_set_name( libbfio_file_range_io_handle_t *file_range_io_handle, const char *name, size_t name_length, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int libbfio_file_range_io_handle_get_name_size_wide( libbfio_file_range_io_handle_t *file_range_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_get_name_wide( libbfio_file_range_io_handle_t *file_range_io_handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_set_name_wide( libbfio_file_range_io_handle_t *file_range_io_handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ int libbfio_file_range_io_handle_get( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_set( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ); int libbfio_file_range_io_handle_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_range_io_handle_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_range_io_handle_read_buffer( 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_io_handle_write_buffer( 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_io_handle_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_io_handle_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_get_size( libbfio_file_range_io_handle_t *file_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_FILE_RANGE_IO_HANDLE_H ) */ libesedb-20240420/libbfio/libbfio_libcthreads.h0000644000175000017500000000357614610746221022127 0ustar00lordyestalordyesta/* * The libcthreads header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_LIBCTHREADS_H ) #define _LIBBFIO_LIBCTHREADS_H #include #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) #define HAVE_LIBBFIO_MULTI_THREAD_SUPPORT #endif #if defined( HAVE_LIBBFIO_MULTI_THREAD_SUPPORT ) /* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads */ #if defined( HAVE_LOCAL_LIBCTHREADS ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCTHREADS_DLL_IMPORT * before including libcthreads.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCTHREADS_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCTHREADS ) */ #endif /* defined( HAVE_LIBBFIO_MULTI_THREAD_SUPPORT ) */ #endif /* !defined( _LIBBFIO_LIBCTHREADS_H ) */ libesedb-20240420/libbfio/libbfio_system_string.h0000644000175000017500000000537614610746221022555 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_SYSTEM_STRING_H ) #define _LIBBFIO_SYSTEM_STRING_H #include #include #include "libbfio_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libbfio_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ); int libbfio_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); int libbfio_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ); int libbfio_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int libbfio_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ); int libbfio_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); int libbfio_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ); int libbfio_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_SYSTEM_STRING_H ) */ libesedb-20240420/libbfio/libbfio_memory_range_io_handle.c0000644000175000017500000005113214610746221024313 0ustar00lordyestalordyesta/* * Memory range IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_libcerror.h" #include "libbfio_memory_range_io_handle.h" /* Creates a memory range IO handle * Make sure the value memory_range_io_handle is referencing, is set to NULL * 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 ); } /* Frees a memory range IO handle * 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 IO 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 IO handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_io_handle_get( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_get"; 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( 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 IO handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_io_handle_set( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_set"; 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( 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 IO handle * Returns 1 if successful or -1 on error */ int libbfio_memory_range_io_handle_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_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 IO handle * Returns 0 if successful or -1 on error */ int libbfio_memory_range_io_handle_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_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 IO handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_memory_range_io_handle_read_buffer( 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_io_handle_read_buffer"; 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: invalid range offset value out of bounds.", 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 ] ), read_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 IO handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_memory_range_io_handle_write_buffer( 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_io_handle_write_buffer"; 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: invalid range offset value out of bounds.", 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 */ 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, write_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 IO handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_memory_range_io_handle_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_io_handle_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_io_handle_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_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_io_handle_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_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 ) || ( 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_io_handle_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_io_handle_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 ); } libesedb-20240420/libbfio/libbfio_handle.c0000644000175000017500000017646014610746221021074 0ustar00lordyestalordyesta/* * The handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcdata.h" #include "libbfio_libcerror.h" /* Creates a handle * Make sure the value handle is referencing, is set to NULL * 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 ); memory_free( internal_handle ); return( -1 ); } if( libcdata_range_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; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_initialize( &( internal_handle->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize read/write lock.", function ); goto on_error; } #endif 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 ) { if( internal_handle->offsets_read != NULL ) { libcdata_range_list_free( &( internal_handle->offsets_read ), NULL, NULL ); } memory_free( internal_handle ); } return( -1 ); } /* Frees a 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; if( internal_handle->is_open != 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; } } if( is_open != 0 ) { if( internal_handle->close != NULL ) { 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_free( &( internal_handle->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif 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( libcdata_range_list_free( &( internal_handle->offsets_read ), NULL, 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_source_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif 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( internal_source_handle->access_flags != 0 ) { 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->current_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; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_source_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libbfio_handle_free( destination_handle, NULL ); return( -1 ); } #endif return( 1 ); on_error: if( ( destination_io_handle != NULL ) && ( ( destination_flags & LIBBFIO_FLAG_IO_HANDLE_MANAGED ) != 0 ) ) { 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_read( internal_source_handle->read_write_lock, NULL ); #endif 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 ) && ( ( 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif 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 ); goto on_error; } } internal_handle->access_flags = access_flags; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, NULL ); #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif /* 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 ); goto on_error; } 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 ); goto on_error; } } 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->current_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 ); goto on_error; } } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, NULL ); #endif 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 = 1; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif 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 ); goto on_error; } 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 ); goto on_error; } } 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 ); goto on_error; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 0 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, NULL ); #endif return( -1 ); } /* Reads data at the current offset into the buffer * This function is not multi-thread safe acquire write lock before call * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_internal_handle_read_buffer( libbfio_internal_handle_t *internal_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_internal_handle_read_buffer"; ssize_t read_count = 0; int is_open = 0; int result = 0; if( internal_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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( 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( 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->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: %" PRIi64 " in handle.", function, internal_handle->current_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 ) { result = libcdata_range_list_insert_range( internal_handle->offsets_read, (uint64_t) internal_handle->current_offset, (uint64_t) read_count, NULL, NULL, NULL, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert offset range to offsets read table.", function ); return( -1 ); } } internal_handle->current_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 ); } /* Reads data at the current offset into the buffer * 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; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif read_count = libbfio_internal_handle_read_buffer( internal_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 buffer.", function ); read_count = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( read_count ); } /* Reads data at a specific offset into the buffer * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_handle_read_buffer_at_offset( libbfio_handle_t *handle, uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_read_buffer_at_offset"; ssize_t read_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_handle_seek_offset( internal_handle, offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset: %" PRIi64 " (0x%08" PRIx64 ") in handle.", function, offset, offset ); read_count = -1; } else { read_count = libbfio_internal_handle_read_buffer( internal_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 buffer.", function ); read_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( read_count ); } /* Writes data at the current offset from the buffer * This function is not multi-thread safe acquire write lock before call * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_internal_handle_write_buffer( libbfio_internal_handle_t *internal_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_internal_handle_write_buffer"; ssize_t write_count = 0; if( internal_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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( 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 = 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->current_offset += (off64_t) write_count; if( (size64_t) internal_handle->current_offset > internal_handle->size ) { internal_handle->size = (size64_t) internal_handle->current_offset; } return( write_count ); } /* Writes data at the current offset from the buffer * 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif write_count = libbfio_internal_handle_write_buffer( internal_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 ); write_count = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( write_count ); } /* Writes data at a specific offset from the buffer * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_handle_write_buffer_at_offset( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_write_buffer_at_offset"; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_handle_seek_offset( internal_handle, offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset: %" PRIi64 " (0x%08" PRIx64 ") in handle.", function, offset, offset ); write_count = -1; } else { write_count = libbfio_internal_handle_write_buffer( internal_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 ); write_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( write_count ); } /* Seeks a certain offset within the handle * This function is not multi-thread safe acquire write lock before call * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_internal_handle_seek_offset( libbfio_internal_handle_t *internal_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_internal_handle_seek_offset"; if( internal_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ); } 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 seek offset in handle.", function ); return( -1 ); } internal_handle->current_offset = offset; return( offset ); } /* 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"; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif offset = libbfio_internal_handle_seek_offset( internal_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 handle.", function ); offset = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif 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 ); goto on_error; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, NULL ); #endif return( -1 ); } /* 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif 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 ); goto on_error; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, NULL ); #endif return( -1 ); } /* 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *io_handle = internal_handle->io_handle; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *access_flags = internal_handle->access_flags; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif internal_handle->access_flags = access_flags; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *offset = internal_handle->current_offset; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif 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 ); goto on_error; } 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 ); goto on_error; } internal_handle->size_set = 1; } *size = internal_handle->size; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, NULL ); #endif 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif internal_handle->open_on_demand = open_on_demand; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif internal_handle->track_offsets_read = track_offsets_read; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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"; 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 ); } internal_handle = (libbfio_internal_handle_t *) handle; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_range_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 ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); } /* 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; intptr_t *value = NULL; static char *function = "libbfio_handle_get_offset_read"; 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 ); } internal_handle = (libbfio_internal_handle_t *) handle; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_range_list_get_range_by_index( internal_handle->offsets_read, index, (uint64_t *) offset, (uint64_t *) size, &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve read offset range: %d.", function, index ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_handle->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); } libesedb-20240420/libbfio/libbfio_file.c0000644000175000017500000002522314610746221020546 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_file_io_handle.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_libcpath.h" #include "libbfio_types.h" /* Creates a file handle * Make sure the value handle is referencing, is set to NULL * 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_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_io_handle_read_buffer, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_io_handle_write_buffer, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_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 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 ); } /* 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 ); } #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 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libbfio/libbfio_handle.h0000644000175000017500000002126314610746221021067 0ustar00lordyestalordyesta/* * The handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_HANDLE_H ) #define _LIBBFIO_INTERNAL_HANDLE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcdata.h" #include "libbfio_libcerror.h" #include "libbfio_libcthreads.h" #include "libbfio_types.h" #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 current_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 */ libcdata_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 */ libcdata_range_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 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; 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 ); ssize_t libbfio_internal_handle_read_buffer( libbfio_internal_handle_t *internal_handle, uint8_t *buffer, size_t size, 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_read_buffer_at_offset( libbfio_handle_t *handle, uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ); ssize_t libbfio_internal_handle_write_buffer( libbfio_internal_handle_t *internal_handle, const 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 \ ssize_t libbfio_handle_write_buffer_at_offset( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ); off64_t libbfio_internal_handle_seek_offset( libbfio_internal_handle_t *internal_handle, off64_t offset, int whence, 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_offset( libbfio_handle_t *handle, off64_t *offset, 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_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 /* !defined( _LIBBFIO_INTERNAL_HANDLE_H ) */ libesedb-20240420/libbfio/libbfio_memory_range.c0000644000175000017500000001327514610746221022317 0ustar00lordyestalordyesta/* * Memory range functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_memory_range.h" #include "libbfio_memory_range_io_handle.h" #include "libbfio_types.h" /* Creates a memory range handle * Make sure the value handle is referencing, is set to NULL * 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_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_io_handle_read_buffer, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_io_handle_write_buffer, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_memory_range_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_memory_range_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( memory_range_io_handle != NULL ) { libbfio_memory_range_io_handle_free( &memory_range_io_handle, NULL ); } 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; 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( libbfio_memory_range_io_handle_get( (libbfio_memory_range_io_handle_t *) internal_handle->io_handle, range_start, range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range from file IO handle.", function ); return( -1 ); } 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; 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( libbfio_memory_range_io_handle_set( (libbfio_memory_range_io_handle_t *) internal_handle->io_handle, range_start, range_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set range in file IO handle.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libbfio/libbfio_pool.c0000644000175000017500000023772714610746221020616 0ustar00lordyestalordyesta/* * The internal pool functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcdata.h" #include "libbfio_libcerror.h" #include "libbfio_pool.h" #include "libbfio_types.h" /* Creates a pool * Make sure the value pool is referencing, is set to NULL * 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"; 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( libcdata_array_initialize( &( internal_pool->handles_array ), number_of_handles, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handles array.", function ); goto on_error; } if( libcdata_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_initialize( &( internal_pool->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; internal_pool->current_entry = -1; *pool = (libbfio_pool_t *) internal_pool; return( 1 ); on_error: if( internal_pool != NULL ) { if( internal_pool->last_used_list != NULL ) { libcdata_list_free( &( internal_pool->last_used_list ), NULL, NULL ); } if( internal_pool->handles_array != NULL ) { libcdata_array_free( &( internal_pool->handles_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_handle_free, NULL ); } memory_free( internal_pool ); } return( -1 ); } /* Frees a pool * 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 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; *pool = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_free( &( internal_pool->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif if( libcdata_array_free( &( internal_pool->handles_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_handle_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free handles array.", function ); result = -1; } if( libcdata_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 ); } 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_destination_pool = NULL; libbfio_internal_pool_t *internal_source_pool = NULL; static char *function = "libbfio_pool_clone"; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_source_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif internal_destination_pool = memory_allocate_structure( libbfio_internal_pool_t ); if( internal_destination_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination pool.", function ); goto on_error; } if( memory_set( internal_destination_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 destination pool.", function ); memory_free( internal_destination_pool ); internal_destination_pool = NULL; goto on_error; } internal_destination_pool->current_entry = -1; internal_destination_pool->current_handle = NULL; if( libcdata_array_clone( &( internal_destination_pool->handles_array ), internal_source_pool->handles_array, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libbfio_handle_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handles array.", function ); goto on_error; } if( libcdata_list_initialize( &( internal_destination_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_initialize( &( internal_destination_pool->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif internal_destination_pool->maximum_number_of_open_handles = internal_source_pool->maximum_number_of_open_handles; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_source_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libbfio_pool_free( (libbfio_pool_t **) &internal_destination_pool, NULL ); return( -1 ); } #endif *destination_pool = (libbfio_pool_t *) internal_destination_pool; return( 1 ); on_error: if( internal_destination_pool != NULL ) { #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( internal_destination_pool->read_write_lock != NULL ) { libcthreads_read_write_lock_free( &( internal_destination_pool->read_write_lock ), NULL ); } #endif if( internal_destination_pool->last_used_list != NULL ) { libcdata_list_free( &( internal_destination_pool->last_used_list ), NULL, NULL ); } if( internal_destination_pool->handles_array != NULL ) { libcdata_array_free( &( internal_destination_pool->handles_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_handle_free, NULL ); } memory_free( internal_destination_pool ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_read( internal_source_pool->read_write_lock, NULL ); #endif 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; static char *function = "libbfio_pool_resize"; 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 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_resize( internal_pool->handles_array, number_of_handles, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_handle_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to resize handles array.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* Opens the handle * Returns 1 if successful or -1 on error */ int libbfio_internal_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_internal_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_internal_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 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_handle_seek_offset( handle, internal_handle->current_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_internal_pool_append_handle_to_last_used_list( libbfio_internal_pool_t *internal_pool, const libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libcdata_list_element_t *last_used_list_element = NULL; libcdata_list_element_t *safe_last_used_list_element = NULL; static char *function = "libbfio_internal_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 ) ) { if( libcdata_list_get_last_element( internal_pool->last_used_list, &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last list element from last used list.", function ); goto on_error; } } if( last_used_list_element == NULL ) { if( libcdata_list_element_initialize( &safe_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 ); goto on_error; } internal_pool->number_of_open_handles++; last_used_list_element = safe_last_used_list_element; } else { /* The last used list element is reused to contain the new last used entry */ if( libcdata_list_element_get_value( last_used_list_element, (intptr_t **) &internal_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from last used list element.", function ); goto on_error; } if( libcdata_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 list element from last used list.", function ); goto on_error; } safe_last_used_list_element = last_used_list_element; internal_handle->pool_last_used_list_element = NULL; if( internal_handle != NULL ) { if( libbfio_handle_close( (libbfio_handle_t *) internal_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); goto on_error; } /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); } } internal_handle = (libbfio_internal_handle_t *) handle; if( libcdata_list_element_set_value( last_used_list_element, (intptr_t *) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in last used list element.", function ); goto on_error; } if( libcdata_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 ); goto on_error; } internal_handle->pool_last_used_list_element = last_used_list_element; return( 1 ); on_error: if( safe_last_used_list_element != NULL ) { libcdata_list_element_free( &safe_last_used_list_element, NULL, NULL ); } return( -1 ); } /* Moves the handle to the front of the last used list * Returns 1 if successful or -1 on error */ int libbfio_internal_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libcdata_list_element_t *first_list_element = NULL; libcdata_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_internal_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 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libcdata_list_get_first_element( internal_pool->last_used_list, &first_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first list element from last used list.", function ); goto on_error; } if( internal_handle->pool_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( internal_handle->pool_last_used_list_element != first_list_element ) { if( libcdata_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; } internal_handle->pool_last_used_list_element = NULL; if( libcdata_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 ); goto on_error; } internal_handle->pool_last_used_list_element = last_used_list_element; } return( 1 ); on_error: if( last_used_list_element != NULL ) { libcdata_list_element_free( &last_used_list_element, NULL, NULL ); } return( -1 ); } /* Removes a handle from the last used list * Returns 1 if successful or -1 on error */ int libbfio_internal_pool_remove_handle_from_last_used_list( libbfio_internal_pool_t *internal_pool, const libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_handle_t *last_used_handle = NULL; libcdata_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_internal_pool_remove_handle_from_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( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( libcdata_list_get_first_element( internal_pool->last_used_list, &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first list element from last used list.", function ); return( -1 ); } while( last_used_list_element != NULL ) { if( libcdata_list_element_get_value( last_used_list_element, (intptr_t **) &last_used_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used handle.", function ); return( -1 ); } if( last_used_handle == handle ) { break; } if( libcdata_list_element_get_next_element( last_used_list_element, &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next last used list element.", function ); return( -1 ); } } if( last_used_list_element != NULL ) { if( libcdata_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 list element from last used list.", function ); return( -1 ); } if( libcdata_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 ); 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"; 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 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_array_get_number_of_entries( internal_pool->handles_array, number_of_handles, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of handles.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); } /* Retrieves a specific 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"; 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 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); } /* 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; int number_of_handles = 0; int result = 1; int safe_entry = -1; 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 ); } /* 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 ); } else 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 ); } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_get_number_of_entries( internal_pool->handles_array, &number_of_handles, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of handles.", function ); result = -1; } else if( ( internal_pool->number_of_used_handles + 1 ) >= number_of_handles ) { if( libcdata_array_append_entry( internal_pool->handles_array, &safe_entry, (intptr_t *) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle.", function ); result = -1; } } else { safe_entry = internal_pool->number_of_used_handles; if( libcdata_array_set_entry_by_index( internal_pool->handles_array, safe_entry, (intptr_t *) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set handle: %d.", function, safe_entry ); result = -1; } } if( result == 1 ) { internal_pool->number_of_used_handles += 1; if( is_open != 0 ) { if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_internal_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 ); result = -1; } } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif if( result != 1 ) { goto on_error; } *entry = safe_entry; return( 1 ); on_error: if( safe_entry >= 0 ) { libcdata_array_set_entry_by_index( internal_pool->handles_array, safe_entry, NULL, NULL ); internal_pool->number_of_used_handles -= 1; } return( -1 ); } /* Sets a specific 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_handle_t *backup_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_set_handle"; int is_open = 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 ); } 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 ); } /* 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 ); } else 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 ); } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &backup_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); result = -1; } /* TODO allow to re set handles, make sure all pool references are removed */ else if( backup_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle entry: %d value already set.", function, entry ); result = -1; } else if( libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, (intptr_t *) handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set handle: %d.", function, entry ); result = -1; } if( result == 1 ) { if( is_open != 0 ) { if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_internal_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 ); result = -1; } } } if( entry == internal_pool->current_entry ) { internal_pool->current_entry = -1; internal_pool->current_handle = NULL; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif if( result != 1 ) { goto on_error; } return( result ); on_error: libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, (intptr_t *) backup_handle, NULL ); return( -1 ); } /* Removes a specific handle from the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_remove_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_handle_t *backup_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_remove_handle"; 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 ); } 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( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } *handle = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &backup_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); result = -1; } if( result == 1 ) { if( libbfio_internal_pool_remove_handle_from_last_used_list( internal_pool, backup_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove handle: %d from last used list.", function, entry ); result = -1; } } if( result == 1 ) { if( entry == internal_pool->current_entry ) { internal_pool->current_entry = -1; internal_pool->current_handle = NULL; } if( libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set handle: %d.", function, entry ); libbfio_internal_pool_append_handle_to_last_used_list( internal_pool, backup_handle, NULL ); result = -1; } } if( result == 1 ) { internal_pool->number_of_used_handles -= 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif if( result == 1 ) { *handle = backup_handle; } return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) on_error: if( result == 1 ) { libcdata_array_set_entry_by_index( internal_pool->handles_array, entry, (intptr_t *) backup_handle, NULL ); libbfio_internal_pool_append_handle_to_last_used_list( internal_pool, backup_handle, NULL ); internal_pool->number_of_used_handles += 1; } return( -1 ); #endif } /* 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *maximum_number_of_open_handles = internal_pool->maximum_number_of_open_handles; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_read( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif 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_handle_t *internal_handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; libcdata_list_element_t *last_used_list_element = NULL; libcdata_list_element_t *safe_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; 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif 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 ) ) { if( libcdata_list_get_last_element( internal_pool->last_used_list, &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last list element from last used list.", function ); goto on_error; } if( libcdata_list_element_get_value( last_used_list_element, (intptr_t **) &internal_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from last used list element.", function ); goto on_error; } if( internal_handle == 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( libcdata_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; } safe_last_used_list_element = last_used_list_element; internal_handle->pool_last_used_list_element = NULL; if( libbfio_handle_close( (libbfio_handle_t *) internal_handle, 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--; /* Make sure the truncate flag is removed from the handle */ internal_handle->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); if( libcdata_list_element_free( &safe_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); on_error: if( safe_last_used_list_element != NULL ) { libcdata_list_element_free( &safe_last_used_list_element, NULL, NULL ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, NULL ); #endif return( -1 ); } /* Opens a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_internal_pool_open( libbfio_internal_pool_t *internal_pool, int entry, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; static char *function = "libbfio_internal_pool_open"; 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( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); return( -1 ); } /* Make sure the handle is not already 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 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_internal_pool_open_handle( internal_pool, handle, 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 ); } internal_pool->current_entry = entry; internal_pool->current_handle = handle; 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 result = 1; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_open( internal_pool, 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 ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* 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_handle_t *handle = NULL; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); goto on_error; } if( libbfio_handle_reopen( handle, 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 ); goto on_error; } internal_pool->current_entry = entry; internal_pool->current_handle = handle; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, NULL ); #endif return( -1 ); } /* Closes a handle in the pool * Returns 0 if successful or -1 on error */ int libbfio_internal_pool_close( libbfio_internal_pool_t *internal_pool, int entry, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_handle_t *internal_handle = NULL; libcdata_list_element_t *last_used_list_element = NULL; libcdata_list_element_t *safe_last_used_list_element = NULL; static char *function = "libbfio_internal_pool_close"; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); goto on_error; } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handle for entry: %d.", function, entry ); goto on_error; } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { /* TODO move into get function */ internal_handle = (libbfio_internal_handle_t *) handle; last_used_list_element = internal_handle->pool_last_used_list_element; if( libcdata_list_element_get_value( last_used_list_element, (intptr_t **) &internal_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from last used list element.", function ); goto on_error; } if( internal_handle == 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( libcdata_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; } safe_last_used_list_element = last_used_list_element; internal_handle->pool_last_used_list_element = NULL; if( libcdata_list_element_free( &safe_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( handle, 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 ); goto on_error; } if( entry == internal_pool->current_entry ) { internal_pool->current_entry = -1; internal_pool->current_handle = NULL; } return( 0 ); on_error: if( safe_last_used_list_element != NULL ) { libcdata_list_element_free( &safe_last_used_list_element, NULL, NULL ); } 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; static char *function = "libbfio_pool_close"; 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; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_close( internal_pool, entry, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle: %d.", function, entry ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_close_all"; int entry = 0; int is_open = 0; int number_of_handles = 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_array_get_number_of_entries( internal_pool->handles_array, &number_of_handles, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of handles.", function ); goto on_error; } for( entry = 0; entry < number_of_handles; entry++ ) { if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); goto on_error; } if( handle == NULL ) { continue; } /* Make sure 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: %d is open.", function, entry ); goto on_error; } else if( is_open == 0 ) { continue; } if( libbfio_internal_pool_close( internal_pool, entry, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle: %d.", function, entry ); goto on_error; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 0 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves a specific handle from the pool and opens it if needed * Returns 1 if successful or -1 on error */ int libbfio_internal_pool_get_open_handle( libbfio_internal_pool_t *internal_pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_handle_t *safe_handle = NULL; static char *function = "libbfio_internal_pool_get_open_handle"; int access_flags = 0; 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( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( entry != internal_pool->current_entry ) { if( libcdata_array_get_entry_by_index( internal_pool->handles_array, entry, (intptr_t **) &safe_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( safe_handle, 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( safe_handle, &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_internal_pool_open_handle( internal_pool, safe_handle, 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_internal_pool_move_handle_to_front_of_last_used_list( internal_pool, safe_handle, 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 ); } } internal_pool->current_entry = entry; internal_pool->current_handle = safe_handle; } *handle = internal_pool->current_handle; return( 1 ); } /* Reads data at the current offset into the buffer * 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read_buffer"; ssize_t read_count = 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); read_count = -1; } else { read_count = libbfio_handle_read_buffer( 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 entry: %d.", function, entry ); read_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( read_count ); } /* Reads data at a specific offset into the buffer * Returns the number of bytes read or -1 on error */ ssize_t libbfio_pool_read_buffer_at_offset( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read_buffer_at_offset"; ssize_t read_count = 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); read_count = -1; } else { read_count = libbfio_handle_read_buffer_at_offset( handle, buffer, size, offset, 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 at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, entry, offset, offset ); read_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( read_count ); } /* Writes data at the current offset from the buffer * 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write_buffer"; ssize_t write_count = 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); write_count = -1; } else { write_count = libbfio_handle_write_buffer( 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 entry: %d.", function, entry ); write_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( write_count ); } /* Writes data at a specific offset from the buffer * Returns the number of bytes written or -1 on error */ ssize_t libbfio_pool_write_buffer_at_offset( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, off64_t offset, libcerror_error_t **error ) { libbfio_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write_buffer_at_offset"; ssize_t write_count = 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); write_count = -1; } else { write_count = libbfio_handle_write_buffer_at_offset( handle, buffer, size, offset, 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 at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, entry, offset, offset ); write_count = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_seek_offset"; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); offset = -1; } else { offset = libbfio_handle_seek_offset( 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 entry: %d.", function, entry ); offset = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( offset ); } /* 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_offset"; 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 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); result = -1; } else { if( libbfio_handle_get_offset( handle, offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset.", function ); result = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* 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_handle_t *handle = NULL; libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_size"; 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 ); } internal_pool = (libbfio_internal_pool_t *) pool; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_grab_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libbfio_internal_pool_get_open_handle( internal_pool, entry, &handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve handle: %d.", function, entry ); result = -1; } else { if( libbfio_handle_get_size( handle, 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 ); result = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) if( libcthreads_read_write_lock_release_for_write( internal_pool->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } libesedb-20240420/libbfio/libbfio_libcerror.h0000644000175000017500000000263314610746221021617 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBBFIO_LIBCERROR_H ) */ libesedb-20240420/libbfio/Makefile.in0000644000175000017500000010426114610746265020052 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_io_handle.c \ libbfio_file_io_handle.h libbfio_file_pool.c \ libbfio_file_pool.h libbfio_file_range.c libbfio_file_range.h \ libbfio_file_range_io_handle.c libbfio_file_range_io_handle.h \ libbfio_handle.c libbfio_handle.h libbfio_libcdata.h \ libbfio_libcerror.h libbfio_libcfile.h libbfio_libclocale.h \ libbfio_libcpath.h libbfio_libcthreads.h libbfio_libuna.h \ libbfio_memory_range.c libbfio_memory_range.h \ libbfio_memory_range_io_handle.c \ libbfio_memory_range_io_handle.h libbfio_pool.c libbfio_pool.h \ libbfio_support.c libbfio_support.h libbfio_system_string.c \ libbfio_system_string.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 \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_io_handle.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_pool.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range_io_handle.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range_io_handle.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.lo libbfio_support.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_system_string.lo libbfio_la_OBJECTS = $(am_libbfio_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBBFIO_TRUE@am_libbfio_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libbfio_error.Plo \ ./$(DEPDIR)/libbfio_file.Plo \ ./$(DEPDIR)/libbfio_file_io_handle.Plo \ ./$(DEPDIR)/libbfio_file_pool.Plo \ ./$(DEPDIR)/libbfio_file_range.Plo \ ./$(DEPDIR)/libbfio_file_range_io_handle.Plo \ ./$(DEPDIR)/libbfio_handle.Plo \ ./$(DEPDIR)/libbfio_memory_range.Plo \ ./$(DEPDIR)/libbfio_memory_range_io_handle.Plo \ ./$(DEPDIR)/libbfio_pool.Plo ./$(DEPDIR)/libbfio_support.Plo \ ./$(DEPDIR)/libbfio_system_string.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbfio_la_SOURCES) DIST_SOURCES = $(am__libbfio_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBBFIO_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @PTHREAD_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_io_handle.c libbfio_file_io_handle.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_file_range_io_handle.c libbfio_file_range_io_handle.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.c libbfio_handle.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcdata.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_libcthreads.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libuna.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.c libbfio_memory_range.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range_io_handle.c libbfio_memory_range_io_handle.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_system_string.c libbfio_system_string.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_types.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_unused.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libbfio.la: $(libbfio_la_OBJECTS) $(libbfio_la_DEPENDENCIES) $(EXTRA_libbfio_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_io_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_pool.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_range.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_range_io_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_memory_range.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_memory_range_io_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_pool.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_system_string.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libbfio_error.Plo -rm -f ./$(DEPDIR)/libbfio_file.Plo -rm -f ./$(DEPDIR)/libbfio_file_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_file_pool.Plo -rm -f ./$(DEPDIR)/libbfio_file_range.Plo -rm -f ./$(DEPDIR)/libbfio_file_range_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_handle.Plo -rm -f ./$(DEPDIR)/libbfio_memory_range.Plo -rm -f ./$(DEPDIR)/libbfio_memory_range_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_pool.Plo -rm -f ./$(DEPDIR)/libbfio_support.Plo -rm -f ./$(DEPDIR)/libbfio_system_string.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libbfio_error.Plo -rm -f ./$(DEPDIR)/libbfio_file.Plo -rm -f ./$(DEPDIR)/libbfio_file_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_file_pool.Plo -rm -f ./$(DEPDIR)/libbfio_file_range.Plo -rm -f ./$(DEPDIR)/libbfio_file_range_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_handle.Plo -rm -f ./$(DEPDIR)/libbfio_memory_range.Plo -rm -f ./$(DEPDIR)/libbfio_memory_range_io_handle.Plo -rm -f ./$(DEPDIR)/libbfio_pool.Plo -rm -f ./$(DEPDIR)/libbfio_support.Plo -rm -f ./$(DEPDIR)/libbfio_system_string.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libbfio/libbfio_system_string.c0000644000175000017500000006170414610746221022545 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "libbfio_libcerror.h" #include "libbfio_libclocale.h" #include "libbfio_libuna.h" #include "libbfio_system_string.h" #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4 #error Unsupported size of wchar_t #endif /* Determines the size of a narrow string from a system string * Returns 1 if successful or -1 on error */ int libbfio_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_size_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow string size.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string size.", function ); return( -1 ); } *narrow_string_size = system_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a narrow string * Returns 1 if successful or -1 on error */ int libbfio_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_copy_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid narrow string size value too small.", function ); return( -1 ); } if( system_string_copy( narrow_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } narrow_string[ system_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a narrow string * Returns 1 if successful or -1 on error */ int libbfio_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_size_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system string size.", function ); return( -1 ); } #else if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = narrow_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a narrow string * Returns 1 if successful or -1 on error */ int libbfio_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_copy_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set system string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < narrow_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, narrow_string, narrow_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } system_string[ narrow_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines the size of a wide string from a system string * Returns 1 if successful or -1 on error */ int libbfio_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_size_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string size.", function ); return( -1 ); } *wide_string_size = system_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a wide string * Returns 1 if successful or -1 on error */ int libbfio_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_copy_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid wide string size value too small.", function ); return( -1 ); } if( system_string_copy( wide_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } wide_string[ system_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a wide string * Returns 1 if successful or -1 on error */ int libbfio_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_size_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = wide_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a wide string * Returns 1 if successful or -1 on error */ int libbfio_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libbfio_system_string_copy_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < wide_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, wide_string, wide_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } system_string[ wide_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libbfio/libbfio_memory_range_io_handle.h0000644000175000017500000000737314610746221024330 0ustar00lordyestalordyesta/* * Memory range IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_MEMORY_RANGE_IO_HANDLE_H ) #define _LIBBFIO_MEMORY_RANGE_IO_HANDLE_H #include #include #include "libbfio_libcerror.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 ); 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 ); int libbfio_memory_range_io_handle_get( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ); int libbfio_memory_range_io_handle_set( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ); int libbfio_memory_range_io_handle_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_memory_range_io_handle_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_memory_range_io_handle_read_buffer( 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_io_handle_write_buffer( 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_io_handle_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_io_handle_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_get_size( libbfio_memory_range_io_handle_t *memory_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_MEMORY_RANGE_IO_HANDLE_H ) */ libesedb-20240420/libbfio/libbfio_extern.h0000644000175000017500000000254014610746221021136 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBBFIO_EXTERN_VARIABLE extern #else #define LIBBFIO_EXTERN_VARIABLE LIBBFIO_EXTERN #endif #else #define LIBBFIO_EXTERN /* extern */ #define LIBBFIO_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _LIBBFIO_INTERNAL_EXTERN_H ) */ libesedb-20240420/libbfio/libbfio_pool.h0000644000175000017500000001527114610746221020607 0ustar00lordyestalordyesta/* * The internal pool functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBBFIO_POOL_H ) #define _LIBBFIO_POOL_H #include #include #include "libbfio_extern.h" #include "libbfio_libcdata.h" #include "libbfio_libcerror.h" #include "libbfio_libcthreads.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 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; /* The handles array */ libcdata_array_t *handles_array; /* The current entry */ int current_entry; /* The current file IO handle */ libbfio_handle_t *current_handle; /* 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 */ libcdata_list_t *last_used_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; 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_internal_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); int libbfio_internal_pool_append_handle_to_last_used_list( libbfio_internal_pool_t *internal_pool, const libbfio_handle_t *handle, libcerror_error_t **error ); int libbfio_internal_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ); int libbfio_internal_pool_remove_handle_from_last_used_list( libbfio_internal_pool_t *internal_pool, const 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_remove_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, 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 ); int libbfio_internal_pool_open( libbfio_internal_pool_t *internal_pool, int entry, 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 ); int libbfio_internal_pool_close( libbfio_internal_pool_t *internal_pool, int entry, 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 ); int libbfio_internal_pool_get_open_handle( libbfio_internal_pool_t *internal_pool, int entry, libbfio_handle_t **handle, 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_read_buffer_at_offset( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, off64_t offset, 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 \ ssize_t libbfio_pool_write_buffer_at_offset( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, off64_t offset, 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_offset( libbfio_pool_t *pool, int entry, off64_t *offset, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_size( libbfio_pool_t *pool, int entry, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBBFIO_POOL_H ) */ libesedb-20240420/ABOUT-NLS0000644000175000017500000000010314533041675015611 0ustar00lordyestalordyesta libesedb-20240420/config.guess0000755000175000017500000014142314610746265016720 0ustar00lordyestalordyesta#!/usr/bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-06-23' # 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 3 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, 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -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 1992-2023 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 # Just in case it came from the environment. GUESS= # 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. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { 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" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver 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 } # 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 ; 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 case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # 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 tuples: *-*-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". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-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) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) 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 # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; 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/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 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. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 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 test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; 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. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; 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'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; 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) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # 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:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) 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; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 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 GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) 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 test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 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 test -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 test "$HP_ARCH" = ""; then 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 test "$HP_ARCH" = hppa2.0w then 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 GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) 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; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; 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*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; 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:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; 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/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 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/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` 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=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; 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. GUESS=i386-sequent-sysv4 ;; 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. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; 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 GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; 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 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; 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 configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; 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*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$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 case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *: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 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #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 (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 #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #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; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&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 fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libesedb-20240420/dpkg/0000755000175000017500000000000014610746412015312 5ustar00lordyestalordyestalibesedb-20240420/dpkg/libesedb-python3.install0000644000175000017500000000002214610727243022050 0ustar00lordyestalordyesta/usr/lib/python3* libesedb-20240420/dpkg/copyright0000644000175000017500000000200214610727254017242 0ustar00lordyestalordyestaFormat: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libesedb Source: https://github.com/libyal/libesedb Files: * Copyright: 2009-2024, Joachim Metz License: LGPL-3.0+ License: LGPL-3.0+ 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 General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU Lesser General Public License can be found in "/usr/share/common-licenses/LGPL-3". libesedb-20240420/dpkg/libesedb.install0000644000175000017500000000002614610727243020452 0ustar00lordyestalordyestausr/lib/*-*/lib*.so.* libesedb-20240420/dpkg/source/0000755000175000017500000000000014610746412016612 5ustar00lordyestalordyestalibesedb-20240420/dpkg/source/format0000644000175000017500000000001414610727243020021 0ustar00lordyestalordyesta3.0 (quilt) libesedb-20240420/dpkg/control0000644000175000017500000000423614610727243016723 0ustar00lordyestalordyestaSource: libesedb Priority: extra Maintainer: Joachim Metz Build-Depends: debhelper (>= 9), dh-autoreconf, dh-python, pkg-config, python3-dev, python3-setuptools Standards-Version: 4.1.4 Section: libs Homepage: https://github.com/libyal/libesedb Vcs-Git: https://github.com/libyal/libesedb.git Package: libesedb Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libesedb1 Replaces: libesedb1 Suggests: libesedb-dbg Description: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format libesedb is a library to access the Extensible Storage Engine (ESE) Database File (EDB) format. Package: libesedb-dbg Architecture: any Section: debug Depends: libesedb (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libesedb Debugging symbols for libesedb. Package: libesedb-dev Section: libdevel Architecture: any Depends: libesedb (= ${binary:Version}), ${misc:Depends} Description: Header files and libraries for developing applications for libesedb Header files and libraries for developing applications for libesedb. Package: libesedb-tools Section: utils Architecture: any Depends: libesedb (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Conflicts: libesedb-utils Replaces: libesedb-utils Description: Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB) Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB). Package: libesedb-tools-dbg Section: debug Architecture: any Depends: libesedb-tools (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libesedb-tools Debugging symbols for libesedb-tools. Package: libesedb-python3 Section: python Architecture: any Depends: libesedb (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Conflicts: python3-libesedb Replaces: python3-libesedb Suggests: libesedb-python3-dbg Description: Python 3 bindings for libesedb Python 3 bindings for libesedb. Package: libesedb-python3-dbg Section: debug Architecture: any Depends: libesedb-python3 (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for libesedb-python3 Debugging symbols for libesedb-python3. libesedb-20240420/dpkg/rules0000644000175000017500000000140114610727243016364 0ustar00lordyestalordyesta#!/usr/bin/make -f # -*- makefile -*- # Uncomment for debhelper verbose output. # export DH_VERBOSE=1 export SKIP_PYTHON_TESTS=1 %: dh $@ --buildsystem=autoconf --with=autoreconf,python3 .PHONY: override_dh_auto_configure override_dh_auto_configure: dh_auto_configure -- --enable-python CFLAGS="-g" .PHONY: override_dh_install override_dh_install: dh_install --fail-missing -X.la -X/pyesedb.a .PHONY: override_dh_missing override_dh_missing: dh_missing -X.la -X/pyesedb.a --fail-missing .PHONY: override_dh_strip override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -plibesedb --dbg-package=libesedb-dbg dh_strip -plibesedb-tools --dbg-package=libesedb-tools-dbg dh_strip -plibesedb-python3 --dbg-package=libesedb-python3-dbg endif libesedb-20240420/dpkg/changelog.in0000644000175000017500000000017114610727243017571 0ustar00lordyestalordyestalibesedb (@VERSION@-1) unstable; urgency=low * Auto-generated -- Joachim Metz @DPKG_DATE@ libesedb-20240420/dpkg/changelog0000644000175000017500000000021414610746302017157 0ustar00lordyestalordyestalibesedb (20240420-1) unstable; urgency=low * Auto-generated -- Joachim Metz Sat, 20 Apr 2024 16:10:08 +0200 libesedb-20240420/dpkg/compat0000644000175000017500000000000314610727243016512 0ustar00lordyestalordyesta10 libesedb-20240420/dpkg/libesedb-dev.install0000644000175000017500000000014014610727243021223 0ustar00lordyestalordyestausr/include/* usr/lib/*-*/lib*.a usr/lib/*-*/lib*.so usr/lib/*-*/pkgconfig/* usr/share/man/man3 libesedb-20240420/dpkg/libesedb-tools.install0000644000175000017500000000003314610727243021606 0ustar00lordyestalordyestausr/bin usr/share/man/man1 libesedb-20240420/setup.cfg0000644000175000017500000000074614610746302016213 0ustar00lordyestalordyesta[metadata] name = libesedb-python version = 20240420 description = Python bindings module for libesedb long_description = Python bindings module for libesedb long_description_content_type = text/plain author = Joachim Metz author_email = joachim.metz@gmail.com license = GNU Lesser General Public License v3 or later (LGPLv3+) license_files = COPYING COPYING.LESSER classifiers = Development Status :: 2 - Pre-Alpha Programming Language :: Python [options] python_requires = >=3.7 libesedb-20240420/COPYING.LESSER0000644000175000017500000001674414610727243016431 0ustar00lordyestalordyesta 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. libesedb-20240420/esedbtools/0000755000175000017500000000000014610746415016533 5ustar00lordyestalordyestalibesedb-20240420/esedbtools/esedbinfo.c0000644000175000017500000001336314610727625020645 0ustar00lordyestalordyesta/* * Shows information obtained from an Extensible Storage Engine (ESE) Database (EDB) file * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedbtools_getopt.h" #include "esedbtools_libcerror.h" #include "esedbtools_libclocale.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libesedb.h" #include "esedbtools_output.h" #include "esedbtools_signal.h" #include "esedbtools_unused.h" #include "info_handle.h" info_handle_t *esedbinfo_info_handle = NULL; int esedbinfo_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use esedbinfo to determine information about an Extensible Storage Engine (ESE)\n" "Database File (EDB).\n\n" ); fprintf( stream, "Usage: esedbinfo [ -hvV ] source\n\n" ); fprintf( stream, "\tsource: the source file\n\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 esedbinfo */ void esedbinfo_signal_handler( esedbtools_signal_t signal ESEDBTOOLS_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "esedbinfo_signal_handler"; ESEDBTOOLS_UNREFERENCED_PARAMETER( signal ) esedbinfo_abort = 1; if( esedbinfo_info_handle != NULL ) { if( info_handle_signal_abort( esedbinfo_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 defined( WINAPI ) && !defined( __CYGWIN__ ) if( _close( 0 ) != 0 ) #else if( close( 0 ) != 0 ) #endif { libcnotify_printf( "%s: unable to close stdin.\n", function ); } } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { libesedb_error_t *error = NULL; system_character_t *source = NULL; char *program = "esedbinfo"; system_integer_t option = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "esedbtools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( esedbtools_output_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize output settings.\n" ); goto on_error; } esedboutput_version_fprint( stdout, program ); while( ( option = esedbtools_getopt( argc, argv, _SYSTEM_STRING( "hvV" ) ) ) != (system_integer_t) -1 ) { switch( option ) { case (system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_SYSTEM "\n", argv[ optind - 1 ] ); usage_fprint( stdout ); return( EXIT_FAILURE ); case (system_integer_t) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (system_integer_t) 'v': verbose = 1; break; case (system_integer_t) 'V': esedboutput_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 ); libesedb_notify_set_stream( stderr, NULL ); libesedb_notify_set_verbose( verbose ); if( info_handle_initialize( &esedbinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize info handle.\n" ); goto on_error; } if( info_handle_open( esedbinfo_info_handle, source, &error ) != 1 ) { fprintf( stderr, "Unable to open: %" PRIs_SYSTEM ".\n", source ); goto on_error; } if( info_handle_file_fprint( esedbinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to print file information.\n" ); goto on_error; } if( info_handle_close( esedbinfo_info_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close info handle.\n" ); goto on_error; } if( info_handle_free( &esedbinfo_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( esedbinfo_info_handle != NULL ) { info_handle_free( &esedbinfo_info_handle, NULL ); } return( EXIT_FAILURE ); } libesedb-20240420/esedbtools/esedbtools_unused.h0000644000175000017500000000301114610727252022423 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_UNUSED_H ) #define _ESEDBTOOLS_UNUSED_H #include #if !defined( ESEDBTOOLS_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define ESEDBTOOLS_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define ESEDBTOOLS_ATTRIBUTE_UNUSED #endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */ #endif /* !defined( ESEDBTOOLS_ATTRIBUTE_UNUSED ) */ #if defined( _MSC_VER ) #define ESEDBTOOLS_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define ESEDBTOOLS_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif /* defined( _MSC_VER ) */ #endif /* !defined( _ESEDBTOOLS_UNUSED_H ) */ libesedb-20240420/esedbtools/esedbtools_libcfile.h0000644000175000017500000000267314610727252022706 0ustar00lordyestalordyesta/* * The libcfile header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCFILE_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBCFILE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCFILE ) */ #endif /* !defined( _ESEDBTOOLS_LIBCFILE_H ) */ libesedb-20240420/esedbtools/webcache.c0000644000175000017500000002775514610727252020456 0ustar00lordyestalordyesta/* * MSIE web cache database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libuna.h" #include "export.h" #include "export_handle.h" #include "webcache.h" enum WEBCACHE_KNOWN_COLUMN_TYPES { WEBCACHE_KNOWN_COLUMN_TYPE_UNDEFINED, WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME }; /* Exports the values in a Container_ table record * Returns 1 if successful or -1 on error */ int webcache_export_record_container( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "webcache_export_record_container"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { if( column_name_size == 9 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "SyncTime" ), 8 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 11 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "ExpiryTime" ), 10 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 13 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "AccessedTime" ), 12 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "CreationTime" ), 12 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "ModifiedTime" ), 12 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } } } if( known_column_type == WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME ) { result = export_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WEBCACHE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a Containers table record * Returns 1 if successful or -1 on error */ int webcache_export_record_containers( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "webcache_export_record_containers"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { if( column_name_size == 15 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "LastAccessTime" ), 14 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "RequestHeaders" ), 14 ) == 0 ) { /* TODO */ } } else if( column_name_size == 16 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "ResponseHeaders" ), 15 ) == 0 ) { /* TODO contains property sheets for History table */ /* TODO contains an ASCII string for the Content table */ } } else if( column_name_size == 17 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "LastScavengeTime" ), 16 ) == 0 ) { known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME; } } } if( known_column_type == WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME ) { result = export_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WEBCACHE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } libesedb-20240420/esedbtools/esedbtools_libclocale.h0000644000175000017500000000274014610727252023221 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCLOCALE_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _ESEDBTOOLS_LIBCLOCALE_H ) */ libesedb-20240420/esedbtools/windows_search.c0000644000175000017500000023125414610727252021723 0ustar00lordyestalordyesta/* * Windows Search database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libfwnt.h" #include "esedbtools_libuna.h" #include "export.h" #include "export_handle.h" #include "windows_search.h" #include "windows_search_compression.h" /* Define this if the debug output is not verbose enough #define HAVE_EXTRA_DEBUG_OUTPUT */ enum WINDOWS_SEARCH_KNOWN_COLUMN_TYPES { WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_UNDEFINED, WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_32BIT, WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT, WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME, WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED, WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN, }; enum WINDOWS_SEARCH_FORMATS { WINDOWS_SEARCH_FORMAT_DECIMAL, WINDOWS_SEARCH_FORMAT_HEXADECIMAL, }; /* Decode data using Windows Search encoding * Returns 1 on success or -1 on error */ int windows_search_decode( uint8_t *data, size_t data_size, uint8_t *encoded_data, size_t encoded_data_size, libcerror_error_t **error ) { static char *function = "windows_search_decode"; size_t data_iterator = 0; size_t encoded_data_iterator = 0; uint32_t bitmask32 = 0; uint8_t bitmask = 0; if( encoded_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid encoded data.", function ); return( -1 ); } if( encoded_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid encoded data size value exceeds maximum.", function ); return( -1 ); } if( data_size < encoded_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: data size value too small.", function ); return( -1 ); } bitmask32 = 0x05000113 ^ (uint32_t) encoded_data_size; for( encoded_data_iterator = 0; encoded_data_iterator < encoded_data_size; encoded_data_iterator++ ) { switch( encoded_data_iterator & 0x03 ) { case 3: bitmask = (uint8_t) ( ( bitmask32 >> 24 ) & 0xff ); break; case 2: bitmask = (uint8_t) ( ( bitmask32 >> 16 ) & 0xff ); break; case 1: bitmask = (uint8_t) ( ( bitmask32 >> 8 ) & 0xff ); break; default: bitmask = (uint8_t) ( bitmask32 & 0xff ); break; } bitmask ^= encoded_data_iterator; data[ data_iterator++ ] = encoded_data[ encoded_data_iterator ] ^ bitmask; } return( 1 ); } /* Exports a compressed string * Returns 1 if successful or -1 on error */ int windows_search_export_compressed_string_value( uint8_t *value_data, size_t value_data_size, int ascii_codepage, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t *value_string = NULL; uint8_t *decoded_value_data = NULL; uint8_t *decompressed_value_data = NULL; uint8_t *narrow_value_string = NULL; uint8_t *value_utf16_stream = NULL; static char *function = "windows_search_export_compressed_string_value"; size_t decoded_value_data_size = 0; size_t decompressed_value_data_size = 0; size_t uncompressed_value_data_size = 0; size_t value_string_size = 0; size_t value_utf16_stream_size = 0; uint8_t compression_type = 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_data_size == 0 ) || ( value_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value data size value out of bounds.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } decoded_value_data_size = value_data_size; decoded_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * decoded_value_data_size ); if( decoded_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create decoded value data.", function ); return( -1 ); } if( windows_search_decode( decoded_value_data, decoded_value_data_size, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to decode value data.", function ); memory_free( decoded_value_data ); return( -1 ); } /* TODO test purposes #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_EXTRA_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: value data:\n", function ); libcnotify_print_data( value_data, value_data_size, 0 ); } #endif */ #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_EXTRA_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decoded data:\n", function ); libcnotify_print_data( decoded_value_data, decoded_value_data_size, 0 ); } #endif compression_type = decoded_value_data[ 0 ]; /* Byte-index compressed data */ if( ( compression_type & 0x02 ) != 0 ) { if( decoded_value_data_size < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid value data size value too small.", function ); return( -1 ); } /* Bytes 1 - 2 contain the uncompressed data size */ byte_stream_copy_to_uint16_little_endian( &( decoded_value_data[ 1 ] ), decompressed_value_data_size ); /* Add room for a leading byte for chained decompression */ decompressed_value_data_size += 1; decompressed_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * decompressed_value_data_size ); if( decompressed_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create decompressed value data.", function ); memory_free( decoded_value_data ); return( -1 ); } /* Add the first byte of the decoded data - 2 to have the * decompressed data look like decoded data for chained decompression */ decompressed_value_data[ 0 ] = decoded_value_data[ 0 ] - 2; uncompressed_value_data_size = decompressed_value_data_size - 1; result = libfwnt_lzxpress_huffman_decompress( &( decoded_value_data[ 3 ] ), decoded_value_data_size - 3, &( decompressed_value_data[ 1 ] ), &uncompressed_value_data_size, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to decompress byte-index compressed data.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); memory_free( decompressed_value_data ); } else { #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_EXTRA_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decompressed data:\n", function ); libcnotify_print_data( decompressed_value_data, decompressed_value_data_size, 0 ); } #endif memory_free( decoded_value_data ); decoded_value_data = decompressed_value_data; decoded_value_data_size = decompressed_value_data_size; compression_type &= ~( 0x02 ); } } /* Run-length compressed UTF-16 little-endian string */ if( compression_type == 0 ) { if( windows_search_utf16_run_length_compression_get_size( &( decoded_value_data[ 1 ] ), decoded_value_data_size - 1, &value_utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine uncompressed size of UTF-16 run-length compressed data.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); memory_free( decoded_value_data ); } if( value_utf16_stream_size > 0 ) { value_utf16_stream = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_utf16_stream_size ); if( value_utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value UTF-16 stream.", function ); memory_free( decoded_value_data ); return( -1 ); } if( windows_search_utf16_run_length_compression_decompress( &( decoded_value_data[ 1 ] ), decoded_value_data_size - 1, value_utf16_stream, value_utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to decompress UTF-16 run-length compressed data.", function ); memory_free( value_utf16_stream ); memory_free( decoded_value_data ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_EXTRA_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decompressed data:\n", function ); libcnotify_print_data( value_utf16_stream, value_utf16_stream_size, 0 ); } #endif /* Sometimes the UTF-16 stream is cut-off in the surrogate high range * The last 2 bytes are ignored otherwise libuna will not convert * the stream to a string */ if( ( ( value_utf16_stream[ value_utf16_stream_size - 1 ] ) >= 0xd8 ) && ( ( value_utf16_stream[ value_utf16_stream_size - 1 ] ) <= 0xdb ) ) { value_utf16_stream_size -= 2; } memory_free( decoded_value_data ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( value_utf16_stream, value_utf16_stream_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( value_utf16_stream, value_utf16_stream_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of value UTF-16 stream.", function ); memory_free( value_utf16_stream ); return( -1 ); } value_string = 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 ); memory_free( value_utf16_stream ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (uint16_t *) value_string, value_string_size, value_utf16_stream, value_utf16_stream_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (uint8_t *) value_string, value_string_size, value_utf16_stream, value_utf16_stream_size, LIBUNA_ENDIAN_LITTLE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value string.", function ); memory_free( value_string ); memory_free( value_utf16_stream ); return( -1 ); } memory_free( value_utf16_stream ); export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); } } /* 8-bit compressed UTF-16 little-endian string */ else if( compression_type == 1 ) { if( libuna_utf8_string_size_from_byte_stream( &( decoded_value_data[ 1 ] ), decoded_value_data_size - 1, ascii_codepage, &value_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of value string.", function ); memory_free( decoded_value_data ); return( -1 ); } narrow_value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( narrow_value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); memory_free( decoded_value_data ); return( -1 ); } if( libuna_utf8_string_copy_from_byte_stream( narrow_value_string, value_string_size, &( decoded_value_data[ 1 ] ), decoded_value_data_size - 1, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value string.", function ); memory_free( narrow_value_string ); memory_free( decoded_value_data ); return( -1 ); } memory_free( decoded_value_data ); export_narrow_text( (char *) narrow_value_string, value_string_size, record_file_stream ); memory_free( narrow_value_string ); } /* uncompressed data */ else if( compression_type == 4 ) { export_narrow_text( (char *) &( decoded_value_data[ 1 ] ), decoded_value_data_size - 1, record_file_stream ); memory_free( decoded_value_data ); } else { if( libcnotify_verbose != 0 ) { libcnotify_printf( "unsupported compression type: 0x%02" PRIx8 "\n", compression_type ); #if defined( HAVE_DEBUG_OUTPUT ) libcnotify_print_data( value_data, value_data_size, 0 ); #endif } memory_free( decoded_value_data ); } return( 1 ); } /* Exports a 32-bit value in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_search_export_record_value_32bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "windows_search_export_record_value_32bit"; size_t value_data_size = 0; uint32_t column_type = 0; uint32_t value_32bit = 0; uint8_t value_data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( ( byte_order != _BYTE_STREAM_ENDIAN_BIG ) && ( byte_order != _BYTE_STREAM_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 "", function, byte_order ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); goto on_error; } if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( value_data, value_32bit ); } else { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); } fprintf( record_file_stream, "%" PRIu32 "", value_32bit ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a 64-bit value in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_search_export_record_value_64bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, uint8_t format, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "windows_search_export_record_value_64bit"; size_t value_data_size = 0; uint64_t value_64bit = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( ( byte_order != _BYTE_STREAM_ENDIAN_BIG ) && ( byte_order != _BYTE_STREAM_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 "", function, byte_order ); return( -1 ); } if( ( format != WINDOWS_SEARCH_FORMAT_DECIMAL ) && ( format != WINDOWS_SEARCH_FORMAT_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported format: 0x%02" PRIx8 "", function, format ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) && ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); goto on_error; } if( memory_compare( value_data, "********", 8 ) == 0 ) { fprintf( record_file_stream, "********" ); } else { if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( value_data, value_64bit ); } else { byte_stream_copy_to_uint64_little_endian( value_data, value_64bit ); } if( format == WINDOWS_SEARCH_FORMAT_DECIMAL ) { fprintf( record_file_stream, "%" PRIu64 "", value_64bit ); } else if( format == WINDOWS_SEARCH_FORMAT_HEXADECIMAL ) { export_binary_data( value_data, value_data_size, record_file_stream ); } } } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a filetime value in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_search_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t filetime_string[ 32 ]; libfdatetime_filetime_t *filetime = NULL; uint8_t *value_data = NULL; static char *function = "windows_search_export_record_value_filetime"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); 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_byte_stream( filetime, value_data, value_data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to filetime.", function ); goto on_error; } #if defined( 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 ); 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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", filetime_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } return( -1 ); } /* Exports a compressed string in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_search_export_record_value_compressed_string( libesedb_record_t *record, int record_value_entry, int ascii_codepage, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { libesedb_long_value_t *long_value = NULL; libesedb_multi_value_t *multi_value = NULL; uint8_t *long_value_data = NULL; uint8_t *multi_value_data = NULL; uint8_t *value_data = NULL; static char *function = "windows_search_export_record_value_compressed_string"; size_t long_value_data_size = 0; size_t multi_value_data_size = 0; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int multi_value_iterator = 0; int number_of_multi_values = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( windows_search_export_compressed_string_value( value_data, value_data_size, ascii_codepage, record_file_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export compressed string value of record entry: %d.", function, record_value_entry ); goto on_error; } } } else if( ( value_data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) != 0 ) { result = libesedb_record_get_long_value( record, record_value_entry, &long_value, error ); if( result != 1 ) { log_handle_printf( log_handle, "Unable to retrieve long value of record entry: %d.\n", record_value_entry ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to retrieve long value of record entry: %d.\n", function, record_value_entry ); } libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value of record entry: %d.", function, record_value_entry ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else { if( export_get_long_value_data( long_value, &long_value_data, &long_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value data.", function ); goto on_error; } if( long_value_data_size > 0 ) { if( windows_search_export_compressed_string_value( long_value_data, long_value_data_size, ascii_codepage, record_file_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export compressed string of long value data of record entry: %d.", function, record_value_entry ); goto on_error; } memory_free( long_value_data ); long_value_data = NULL; } if( libesedb_long_value_free( &long_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long value.", function ); goto on_error; } } } /* TODO handle 0x10 flag */ else if( ( ( value_data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) && ( ( value_data_flags & 0x10 ) == 0 ) ) { if( libesedb_record_get_multi_value( record, record_value_entry, &multi_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value of record entry: %d.", function, record_value_entry ); goto on_error; } if( libesedb_multi_value_get_number_of_values( multi_value, &number_of_multi_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of multi values.", function ); goto on_error; } for( multi_value_iterator = 0; multi_value_iterator < number_of_multi_values; multi_value_iterator++ ) { if( libesedb_multi_value_get_value_data_size( multi_value, multi_value_iterator, &multi_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d data size of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } if( multi_value_data_size > 0 ) { multi_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * multi_value_data_size ); if( multi_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value data.", function ); goto on_error; } if( libesedb_multi_value_get_value_data( multi_value, multi_value_iterator, multi_value_data, multi_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } /* TODO what about non string multi values ? */ if( windows_search_export_compressed_string_value( multi_value_data, multi_value_data_size, ascii_codepage, record_file_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export compressed string of multi value: %d of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } memory_free( multi_value_data ); multi_value_data = NULL; if( multi_value_iterator < ( number_of_multi_values - 1 ) ) { fprintf( record_file_stream, "; " ); } } } if( libesedb_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: %d.", function, multi_value_iterator ); goto on_error; } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } if( value_data != NULL ) { memory_free( value_data ); } return( 1 ); on_error: if( multi_value_data != NULL ) { memory_free( multi_value_data ); } if( multi_value != NULL ) { libesedb_multi_value_free( &multi_value, NULL ); } if( long_value_data != NULL ) { memory_free( long_value_data ); } if( long_value != NULL ) { libesedb_long_value_free( &long_value, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports an UTF-16 string in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_search_export_record_value_utf16_string( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t *value_string = NULL; uint8_t *value_data = NULL; static char *function = "windows_search_export_record_value_utf16_string"; size_t value_data_size = 0; size_t value_string_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, byte_order, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, byte_order, &value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of value string: %d.", function, record_value_entry ); goto on_error; } value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (uint16_t *) value_string, value_string_size, value_data, value_data_size, byte_order, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (uint8_t *) value_string, value_string_size, value_data, value_data_size, byte_order, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value string: %d.", function, record_value_entry ); memory_free( value_string ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports the values in a SystemIndex_0A table record * Returns 1 if successful or -1 on error */ int windows_search_export_record_systemindex_0a( libesedb_record_t *record, int ascii_codepage, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "windows_search_export_record_systemindex_0a"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_BIG; uint8_t format = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) { if( system_string_compare( column_name, _SYSTEM_STRING( "__SDID" ), 6 ) == 0 ) { /* The byte order is set because the SystemIndex_0A table in the * Windows Search XP and 7 database contains binary values in big-endian * In the Windows Search XP database the __SDID column is of type binary data. * In the Windows Search Vista data base the __SDID column is of type integer 32-bit signed. * In Windows Search 7 the __SDID column is no longer present */ byte_order = _BYTE_STREAM_ENDIAN_LITTLE; } } if( ( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) || ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( column_name_size == 24 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_ThumbnailCacheId" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT; format = WINDOWS_SEARCH_FORMAT_HEXADECIMAL; } } } /* Only check for known columns of the binary data type * some columns get their type reassigned over time */ if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( column_name_size == 7 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "__SDID" ), 6 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_32BIT; } } else if( column_name_size == 12 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Kind" ), 11 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Size" ), 11 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT; format = WINDOWS_SEARCH_FORMAT_DECIMAL; } } else if( column_name_size == 13 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Title" ), 12 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 14 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Author" ), 13 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 15 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Comment" ), 14 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_DueDate" ), 14 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_EndDate" ), 14 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemUrl" ), 14 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Subject" ), 14 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 16 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_FileName" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Identity" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemDate" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemName" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemType" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_KindText" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_MIMEType" ), 15 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 17 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Copyright" ), 16 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_FileOwner" ), 16 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 18 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_MCDI" ), 17 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_RatingText" ), 17 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 19 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_DateCreated" ), 18 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemAuthors" ), 18 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_Genre" ), 18 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ParsingName" ), 18 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 20 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_ComputerName" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_DateAccessed" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_DateAcquired" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_DateImported" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_DateModified" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemTypeText" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_Artist" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Search_Store" ), 19 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 21 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_FileExtension" ), 20 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_Store" ), 20 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 22 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_FlagStatusText" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ImportanceText" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemNamePrefix" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_SubTitle" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_ToName" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_Composer" ), 21 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 23 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemNameDisplay" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemPathDisplay" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_ContentID" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_Publisher" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_PartOfSet" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Photo_DateTaken" ), 22 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 24 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Image_Dimensions" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemParticipants" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_DateSent" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_FromName" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_AlbumTitle" ), 23 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 25 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Calendar_Location" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_DateEncoded" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_CcAddress" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_ToAddress" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Music_AlbumArtist" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Search_GatherTime" ), 24 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 26 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Document_DateSaved" ), 25 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_CollectionID" ), 25 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_DateReleased" ), 25 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_SenderName" ), 25 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Search_AutoSummary" ), 25 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 27 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_FromAddress" ), 26 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 28 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Document_DateCreated" ), 27 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_ClassPrimaryID" ), 27 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_DateReceived" ), 27 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_MessageClass" ), 27 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 29 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemFolderNameDisplay" ), 28 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemFolderPathDisplay" ), 28 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemPathDisplayNarrow" ), 28 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_SenderAddress" ), 28 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 30 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Link_TargetParsingPath" ), 29 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_ClassSecondaryID" ), 29 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Message_ConversationID" ), 29 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_RecordedTV_EpisodeName" ), 29 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 31 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_Calendar_ShowTimeAsText" ), 30 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } else if( system_string_compare( column_name, _SYSTEM_STRING( "System_Media_CollectionGroupID" ), 30 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 32 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_RecordedTV_RecordingTime" ), 31 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 35 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_ItemFolderPathDisplayNarrow" ), 34 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } else if( column_name_size == 37 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "System_RecordedTV_ProgramDescription" ), 36 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED; } } } if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_32BIT ) { result = windows_search_export_record_value_32bit( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = windows_search_export_record_value_64bit( record, value_iterator, byte_order, format, record_file_stream, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME ) { result = windows_search_export_record_value_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED ) { result = windows_search_export_record_value_compressed_string( record, value_iterator, ascii_codepage, record_file_stream, log_handle, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a SystemIndex_Gthr table record * Returns 1 if successful or -1 on error */ int windows_search_export_record_systemindex_gthr( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "windows_search_export_record_systemindex_gthr"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_UNDEFINED; /* Only check for known columns of the binary data type * some columns get their type reassigned over time */ if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( column_name_size == 10 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "FileName1" ), 9 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN; } else if( system_string_compare( column_name, _SYSTEM_STRING( "FileName2" ), 9 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN; } } else if( column_name_size == 13 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "LastModified" ), 12 ) == 0 ) { known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME; byte_order = _BYTE_STREAM_ENDIAN_BIG; } } } if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME ) { result = windows_search_export_record_value_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN ) { result = windows_search_export_record_value_utf16_string( record, value_iterator, LIBUNA_ENDIAN_LITTLE, record_file_stream, error ); } else if( known_column_type == WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } libesedb-20240420/esedbtools/esedbtools_libfwnt.h0000644000175000017500000000332414610727252022574 0ustar00lordyestalordyesta/* * The libfwnt header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBFWNT_H ) #define _ESEDBTOOLS_LIBFWNT_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) #include #include #include #include #include #include #include #include #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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBFWNT_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _ESEDBTOOLS_LIBFWNT_H ) */ libesedb-20240420/esedbtools/info_handle.h0000644000175000017500000000524414610727625021161 0ustar00lordyestalordyesta/* * Info handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _INFO_HANDLE_H ) #define _INFO_HANDLE_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct info_handle info_handle_t; struct info_handle { /* The libesedb input file */ libesedb_file_t *input_file; /* The ascii codepage */ int ascii_codepage; /* The notification output stream */ FILE *notify_stream; /* Value to indicate if abort was signalled */ int abort; }; const char *info_handle_get_column_type_description( uint32_t column_type ); 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 system_character_t *string, libcerror_error_t **error ); int info_handle_open( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ); int info_handle_close( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_column_fprint( info_handle_t *info_handle, int column_iterator, libesedb_column_t *column, libcerror_error_t **error ); int info_handle_index_fprint( info_handle_t *info_handle, int index_iterator, libesedb_index_t *index, libcerror_error_t **error ); int info_handle_table_fprint( info_handle_t *info_handle, int table_iterator, libesedb_table_t *table, libcerror_error_t **error ); int info_handle_file_fprint( info_handle_t *info_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _INFO_HANDLE_H ) */ libesedb-20240420/esedbtools/esedbtools_libcnotify.h0000644000175000017500000000273514610727252023276 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCNOTIFY_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _ESEDBTOOLS_LIBCNOTIFY_H ) */ libesedb-20240420/esedbtools/esedbtools_libfguid.h0000644000175000017500000000264314610727252022717 0ustar00lordyestalordyesta/* * The libfguid header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBFGUID_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBFGUID_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _ESEDBTOOLS_LIBFGUID_H ) */ libesedb-20240420/esedbtools/esedbtools_output.h0000644000175000017500000000265614610727252022476 0ustar00lordyestalordyesta/* * Common output functions for the esedbtools * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_OUTPUT_H ) #define _ESEDBTOOLS_OUTPUT_H #include #include #include #include "esedbtools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int esedbtools_output_initialize( int stdio_mode, libcerror_error_t **error ); void esedboutput_copyright_fprint( FILE *stream ); void esedboutput_version_fprint( FILE *stream, const char *program ); void esedboutput_version_detailed_fprint( FILE *stream, const char *program ); #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDBTOOLS_OUTPUT_H ) */ libesedb-20240420/esedbtools/srumdb.c0000644000175000017500000001465614610727252020205 0ustar00lordyestalordyesta/* * System Resource Usage Monitor (SRUM) database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libuna.h" #include "export.h" #include "export_handle.h" #include "srumdb.h" enum SRUMDB_KNOWN_COLUMN_TYPES { SRUMDB_KNOWN_COLUMN_TYPE_UNDEFINED, SRUMDB_KNOWN_COLUMN_TYPE_FILETIME, SRUMDB_KNOWN_COLUMN_TYPE_FLOATINGTIME, }; /* Exports the values in a {%GUID%} table record * Returns 1 if successful or -1 on error */ int srumdb_export_record_guid( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "srumdb_export_record_guid"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = SRUMDB_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_DATE_TIME ) { if( column_name_size == 10 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "TimeStamp" ), 9 ) == 0 ) { known_column_type = SRUMDB_KNOWN_COLUMN_TYPE_FLOATINGTIME; } } } else if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { if( column_name_size == 17 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "ConnectStartTime" ), 16 ) == 0 ) { known_column_type = SRUMDB_KNOWN_COLUMN_TYPE_FILETIME; } } } if( known_column_type == SRUMDB_KNOWN_COLUMN_TYPE_FILETIME ) { result = export_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == SRUMDB_KNOWN_COLUMN_TYPE_FLOATINGTIME ) { result = export_floatingtime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == SRUMDB_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } libesedb-20240420/esedbtools/esedbtools_libfmapi.h0000644000175000017500000000331614610727252022713 0ustar00lordyestalordyesta/* * The libfmapi header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBFMAPI_H ) #define _ESEDBTOOLS_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 #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 /* defined( HAVE_LOCAL_LIBFMAPI ) */ #endif /* !defined( _ESEDBTOOLS_LIBFMAPI_H ) */ libesedb-20240420/esedbtools/webcache.h0000644000175000017500000000272614610727252020452 0ustar00lordyestalordyesta/* * MSIE web cache database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _WEBCACHE_H ) #define _WEBCACHE_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif int webcache_export_record_container( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int webcache_export_record_containers( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _WEBCACHE_H ) */ libesedb-20240420/esedbtools/esedbtools_output.c0000644000175000017500000001043414610727252022462 0ustar00lordyestalordyesta/* * Common output functions for the esedbtools * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "esedbtools_i18n.h" #include "esedbtools_libbfio.h" #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libfguid.h" #include "esedbtools_libfmapi.h" #include "esedbtools_libfvalue.h" #include "esedbtools_libfwnt.h" #include "esedbtools_libuna.h" #include "esedbtools_output.h" /* Initializes output settings * Returns 1 if successful or -1 on error */ int esedbtools_output_initialize( int stdio_mode, libcerror_error_t **error ) { static char *function = "esedbtools_output_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 ); } /* Prints the copyright information */ void esedboutput_copyright_fprint( FILE *stream ) { if( stream == NULL ) { return; } /* TRANSLATORS: This is a proper name. */ fprintf( stream, _( "Copyright (C) 2009-2024, %s.\n" ), _( "Joachim Metz" ) ); fprintf( stream, _( "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" ) ); /* TRANSLATORS: The placeholder indicates the bug-reporting address * for this package. Please add _another line_ saying * "Report translation bugs to <...>\n" with the address for translation * bugs (typically your translation team's web or email address). */ fprintf( stream, _( "Report bugs to <%s>.\n" ), PACKAGE_BUGREPORT ); } /* Prints the (basic) version information */ void esedboutput_version_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s\n\n", program, LIBESEDB_VERSION_STRING ); } /* Prints the detailed version information */ void esedboutput_version_detailed_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s (libesedb %s", program, LIBESEDB_VERSION_STRING, LIBESEDB_VERSION_STRING ); fprintf( stream, ", libuna %s", LIBUNA_VERSION_STRING ); fprintf( stream, ", libbfio %s", LIBBFIO_VERSION_STRING ); fprintf( stream, ", libfdatetime %s", LIBFDATETIME_VERSION_STRING ); fprintf( stream, ", libfguid %s", LIBFGUID_VERSION_STRING ); fprintf( stream, ", libfvalue %s", LIBFVALUE_VERSION_STRING ); fprintf( stream, ", libfwnt %s", LIBFWNT_VERSION_STRING ); fprintf( stream, ", libfmapi %s", LIBFMAPI_VERSION_STRING ); fprintf( stream, ")\n\n" ); } libesedb-20240420/esedbtools/esedbtools_i18n.h0000644000175000017500000000227514610727252021712 0ustar00lordyestalordyesta/* * Internationalization (i18n) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_I18N_H ) #define _ESEDBTOOLS_I18N_H #include #if defined( HAVE_LIBINTL_H ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* TODO for now do nothing i18n-like #define _( string ) \ gettext( string ) */ #define _( string ) \ string #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDBTOOLS_I18N_H ) */ libesedb-20240420/esedbtools/windows_security.h0000644000175000017500000000363714610727252022334 0ustar00lordyestalordyesta/* * Windows Security database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _WINDOWS_SECURITY_H ) #define _WINDOWS_SECURITY_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif int windows_security_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int windows_security_export_record_value_utf16_string( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int windows_security_export_record_smtblversion( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int windows_security_export_record_smtblsection( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _WINDOWS_SECURITY_H ) */ libesedb-20240420/esedbtools/database_types.c0000644000175000017500000001363414610727252021674 0ustar00lordyestalordyesta/* * Database types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "database_types.h" #include "esedbtools_libcdata.h" #include "esedbtools_libcerror.h" const system_character_t *database_type_descriptions[ ] = { _SYSTEM_STRING( "Unknown" ), _SYSTEM_STRING( "Exchange" ), _SYSTEM_STRING( "System Resource Usage Monitor (SRUM)" ), _SYSTEM_STRING( "MSIE WebCache" ), _SYSTEM_STRING( "Windows Search" ), _SYSTEM_STRING( "Windows Security" ), }; database_type_descriptor_t database_type_descriptors[ ] = { { DATABASE_TYPE_EXCHANGE, { _SYSTEM_STRING( "Folders" ), _SYSTEM_STRING( "Global" ), _SYSTEM_STRING( "Mailbox" ), _SYSTEM_STRING( "Msg" ), _SYSTEM_STRING( "PerUserRead" ), NULL } }, { DATABASE_TYPE_SRUM, { _SYSTEM_STRING( "SruDbIdMapTable" ), _SYSTEM_STRING( "{D10CA2FE-6FCF-4F6D-848E-B2E99266FA86}" ), _SYSTEM_STRING( "{D10CA2FE-6FCF-4F6D-848E-B2E99266FA89}" ), _SYSTEM_STRING( "{FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}" ), _SYSTEM_STRING( "{973F5D5C-1D90-4944-BE8E-24B94231A174}" ), _SYSTEM_STRING( "{FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}LT" ), _SYSTEM_STRING( "{DD6636C4-8929-4683-974E-22C046A43763}" ), NULL } }, { DATABASE_TYPE_WEBCACHE, { _SYSTEM_STRING( "Containers" ), _SYSTEM_STRING( "LeakFiles" ), _SYSTEM_STRING( "Partitions" ), NULL } }, { DATABASE_TYPE_WINDOWS_SEARCH, { _SYSTEM_STRING( "SystemIndex_0A" ), _SYSTEM_STRING( "SystemIndex_Gthr" ), NULL } }, { DATABASE_TYPE_WINDOWS_SECURITY, { _SYSTEM_STRING( "SmTblSection" ), _SYSTEM_STRING( "SmTblVersion" ), NULL } }, { DATABASE_TYPE_UNKNOWN, { NULL } } }; /* Determines the database type * Returns 1 if successful or -1 on error */ int database_type_determine( int *database_type, libcdata_array_t *table_names, libcerror_error_t **error ) { int database_types[ NUMBER_OF_DATABASE_TYPES ]; database_type_descriptor_t *database_type_descriptor = NULL; const system_character_t *known_table_name = NULL; system_character_t *table_name = NULL; static char *function = "export_handle_determine_database_type"; size_t known_table_name_length = 0; size_t table_name_length = 0; int database_type_index = 0; int known_table_name_index = 0; int number_of_tables = 0; int table_index = 0; if( database_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database type.", function ); return( -1 ); } for( database_type_index = 0; database_type_index < NUMBER_OF_DATABASE_TYPES; database_type_index++ ) { database_types[ database_type_index ] = 0; } if( libcdata_array_get_number_of_entries( table_names, &number_of_tables, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of tables.", function ); return( -1 ); } for( table_index = 0; table_index < number_of_tables; table_index++ ) { if( libcdata_array_get_entry_by_index( table_names, table_index, (intptr_t **) &table_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the name of table: %d from array.", function, table_index ); return( -1 ); } if( table_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing name of table: %d.", function, table_index ); return( -1 ); } table_name_length = system_string_length( table_name ); database_type_index = 0; database_type_descriptor = &( database_type_descriptors[ database_type_index++ ] ); while( database_type_descriptor->database_type != DATABASE_TYPE_UNKNOWN ) { known_table_name_index = 0; known_table_name = database_type_descriptor->known_table_names[ known_table_name_index++ ]; while( known_table_name != NULL ) { known_table_name_length = system_string_length( known_table_name ); if( ( known_table_name_length == table_name_length ) && ( system_string_compare( known_table_name, table_name, known_table_name_length ) == 0 ) ) { database_types[ database_type_descriptor->database_type ] += 1; } known_table_name = database_type_descriptor->known_table_names[ known_table_name_index++ ]; } database_type_descriptor = &( database_type_descriptors[ database_type_index++ ] ); } } *database_type = DATABASE_TYPE_UNKNOWN; for( database_type_index = 0; database_type_index < NUMBER_OF_DATABASE_TYPES; database_type_index++ ) { if( database_types[ *database_type ] < database_types[ database_type_index ] ) { *database_type = database_type_index; } } return( 1 ); } libesedb-20240420/esedbtools/export.c0000644000175000017500000004202414610727252020220 0ustar00lordyestalordyesta/* * Export functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "export.h" /* Exports binary data */ void export_binary_data( const uint8_t *data, size_t data_size, FILE *stream ) { if( data != NULL ) { while( data_size > 0 ) { fprintf( stream, "%02" PRIx8 "", *data ); data += 1; data_size -= 1; } } } /* Exports narrow character text * Converts \\, \t, \n, \r, \0 into their string representation */ void export_narrow_text( const char *string, size_t string_size, FILE *stream ) { if( string != NULL ) { while( string_size > 0 ) { switch( *string ) { case 0: if( string_size > 1 ) { fprintf( stream, "\\0" ); } break; case '\\': fprintf( stream, "\\\\" ); break; case '\n': fprintf( stream, "\\n" ); break; case '\r': fprintf( stream, "\\r" ); break; case '\t': fprintf( stream, "\\t" ); break; default: fprintf( stream, "%c", *string ); break; } string += 1; string_size -= 1; } } } /* Exports system character text * Converts \\, \t, \n, \r, \0 into their string representation */ void export_text( const system_character_t *string, size_t string_size, FILE *stream ) { if( string != NULL ) { while( string_size > 0 ) { switch( *string ) { case 0: if( string_size > 1 ) { fprintf( stream, "\\0" ); } break; case (system_character_t) '\\': fprintf( stream, "\\\\" ); break; case (system_character_t) '\n': fprintf( stream, "\\n" ); break; case (system_character_t) '\r': fprintf( stream, "\\r" ); break; case (system_character_t) '\t': fprintf( stream, "\\t" ); break; default: fprintf( stream, "%" PRIc_SYSTEM "", *string ); break; } string += 1; string_size -= 1; } } } /* Exports a FILETIME value * Returns 1 if successful or -1 on error */ int export_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t date_time_string[ 32 ]; libfdatetime_filetime_t *filetime = NULL; uint8_t *value_data = NULL; static char *function = "export_filetime"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); 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_byte_stream( filetime, value_data, value_data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to FILETIME.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_filetime_copy_to_utf16_string( filetime, (uint16_t *) date_time_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 *) date_time_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 ); 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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", date_time_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a floating time value * Returns 1 if successful or -1 on error */ int export_floatingtime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t date_time_string[ 32 ]; libfdatetime_floatingtime_t *floatingtime = NULL; uint8_t *value_data = NULL; static char *function = "export_floatingtime"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_DATE_TIME ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); goto on_error; } if( libfdatetime_floatingtime_initialize( &floatingtime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create floating time.", function ); goto on_error; } if( libfdatetime_floatingtime_copy_from_byte_stream( floatingtime, value_data, value_data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to floating time.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_floatingtime_copy_to_utf16_string( floatingtime, (uint16_t *) date_time_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #else result = libfdatetime_floatingtime_copy_to_utf8_string( floatingtime, (uint8_t *) date_time_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 floating time to string.", function ); goto on_error; } if( libfdatetime_floatingtime_free( &floatingtime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free floating time.", function ); goto on_error; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", date_time_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( floatingtime != NULL ) { libfdatetime_floatingtime_free( &floatingtime, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Retrieves the long value data from a long value * Returns 1 if successful or -1 on error */ int export_get_long_value_data( libesedb_long_value_t *long_value, uint8_t **long_value_data, size_t *long_value_data_size, libcerror_error_t **error ) { static char *function = "export_get_long_value_data"; size64_t safe_long_value_data_size = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } if( long_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value data.", function ); return( -1 ); } if( *long_value_data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid long value data value already set.", function ); return( -1 ); } if( long_value_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value data size.", function ); return( -1 ); } if( libesedb_long_value_get_data_size( long_value, &safe_long_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value data size.", function ); goto on_error; } if( safe_long_value_data_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid long value data size value exceeds maximum.", function ); goto on_error; } if( safe_long_value_data_size == 0 ) { *long_value_data = NULL; *long_value_data_size = 0; } *long_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) safe_long_value_data_size ); if( *long_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create long value data.", function ); goto on_error; } if( libesedb_long_value_get_data( long_value, *long_value_data, (size_t) safe_long_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value data.", function ); goto on_error; } *long_value_data_size = (size_t) safe_long_value_data_size; return( 1 ); on_error: if( long_value_data != NULL ) { memory_free( long_value_data ); } return( -1 ); } libesedb-20240420/esedbtools/Makefile.am0000644000175000017500000000540214610730472020564 0ustar00lordyestalordyestaAM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @LIBESEDB_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ bin_PROGRAMS = \ esedbexport \ esedbinfo esedbexport_SOURCES = \ database_types.c database_types.h \ esedbexport.c \ esedbtools_getopt.c esedbtools_getopt.h \ esedbtools_i18n.h \ esedbtools_libbfio.h \ esedbtools_libcdata.h \ esedbtools_libcerror.h \ esedbtools_libclocale.h \ esedbtools_libcfile.h \ esedbtools_libcnotify.h \ esedbtools_libcpath.h \ esedbtools_libesedb.h \ esedbtools_libfdatetime.h \ esedbtools_libfguid.h \ esedbtools_libfmapi.h \ esedbtools_libfvalue.h \ esedbtools_libfwnt.h \ esedbtools_libuna.h \ esedbtools_output.c esedbtools_output.h \ esedbtools_signal.c esedbtools_signal.h \ esedbtools_system_string.c esedbtools_system_string.h \ esedbtools_unused.h \ exchange.c exchange.h \ export.c export.h \ export_handle.c export_handle.h \ log_handle.c log_handle.h \ srumdb.c srumdb.h \ webcache.c webcache.h \ windows_search.c windows_search.h \ windows_search_compression.c windows_search_compression.h \ windows_security.c windows_security.h esedbexport_LDADD = \ @LIBFMAPI_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ \ @LIBINTL@ esedbinfo_SOURCES = \ esedbinfo.c \ esedbtools_getopt.c esedbtools_getopt.h \ esedbtools_i18n.h \ esedbtools_libbfio.h \ esedbtools_libcerror.h \ esedbtools_libclocale.h \ esedbtools_libcnotify.h \ esedbtools_libesedb.h \ esedbtools_libfdatetime.h \ esedbtools_libfguid.h \ esedbtools_libfmapi.h \ esedbtools_libfvalue.h \ esedbtools_libfwnt.h \ esedbtools_libuna.h \ esedbtools_output.c esedbtools_output.h \ esedbtools_signal.c esedbtools_signal.h \ esedbtools_unused.h \ info_handle.c info_handle.h esedbinfo_LDADD = \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ \ @LIBINTL@ DISTCLEANFILES = \ Makefile \ Makefile.in splint-local: @echo "Running splint on esedbexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(esedbexport_SOURCES) @echo "Running splint on esedbinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(esedbinfo_SOURCES) libesedb-20240420/esedbtools/windows_search_compression.c0000644000175000017500000001713114610727252024340 0ustar00lordyestalordyesta/* * Windows Search database compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libcnotify.h" #include "windows_search_compression.h" /* Define this if the debug output is not verbose enough #define HAVE_EXTRA_DEBUG_OUTPUT */ /* Determines the uncompressed size of a run-length compressed UTF-16 string * Returns 1 on success or -1 on error */ int windows_search_utf16_run_length_compression_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { static char *function = "windows_search_utf16_run_length_compression_get_size"; size_t compressed_data_offset = 0; size_t safe_uncompressed_data_size = 0; uint8_t compression_size = 0; 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 < 1 ) || ( compressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data size value out of bounds.", 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 ); } *uncompressed_data_size = 0; while( compressed_data_offset < compressed_data_size ) { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } compression_size = compressed_data[ compressed_data_offset++ ]; /* Check if the last byte in the compressed string was the compression size * or the run-length byte value */ if( compressed_data_offset >= ( compressed_data_size - 1 ) ) { break; } /* Check if the compressed string was cut-short at the end */ if( ( compressed_data_offset + 1 + compression_size ) > compressed_data_size ) { #if defined( HAVE_DEBUG_OUTPUT ) fprintf( stderr, "MARKER: %zd, %d, %zd, %zd\n", compressed_data_offset, compression_size, compressed_data_size, compressed_data_size - compressed_data_offset - 1 ); #endif compression_size = (uint8_t) ( compressed_data_size - compressed_data_offset - 1 ); } safe_uncompressed_data_size += compression_size * 2; compressed_data_offset += compression_size + 1; } if( compressed_data_offset > compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } *uncompressed_data_size = safe_uncompressed_data_size; return( 1 ); } /* Decompresses a run-length compressed UTF-16 string * Returns 1 on success or -1 on error */ int windows_search_utf16_run_length_compression_decompress( const 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 = "windows_search_utf16_run_length_compression_decompress"; size_t compressed_data_offset = 0; size_t uncompressed_data_offset = 0; uint8_t compression_byte = 0; uint8_t compression_size = 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 > (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 ); } 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 < 1 ) || ( compressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data size value out of bounds.", function ); return( -1 ); } while( compressed_data_offset < compressed_data_size ) { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } compression_size = compressed_data[ compressed_data_offset++ ]; /* Check if the last byte in the compressed string was the compression size * or the run-length byte value */ if( compressed_data_offset >= ( compressed_data_size - 1 ) ) { break; } /* Check if the compressed string was cut-short at the end */ if( ( compressed_data_offset + 1 + compression_size ) > compressed_data_size ) { compression_size = (uint8_t) ( compressed_data_size - compressed_data_offset - 1 ); } if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } compression_byte = compressed_data[ compressed_data_offset++ ]; while( compression_size > 0 ) { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( uncompressed_data_offset >= ( uncompressed_data_size - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data size value too small.", function ); return( -1 ); } uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ compressed_data_offset++ ]; uncompressed_data[ uncompressed_data_offset++ ] = compression_byte; compression_size--; } } #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_EXTRA_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: uncompressed data:\n", function ); libcnotify_print_data( uncompressed_data, uncompressed_data_offset, 0 ); } #endif return( 1 ); } libesedb-20240420/esedbtools/esedbtools_signal.c0000644000175000017500000001316714610727252022405 0ustar00lordyestalordyesta/* * Signal handling functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_SIGNAL_H ) #include #endif #if defined( _MSC_VER ) #include #endif #include "esedbtools_libcerror.h" #include "esedbtools_signal.h" #if defined( WINAPI ) void (*esedbtools_signal_signal_handler)( esedbtools_signal_t ) = NULL; /* Signal handler for Ctrl+C or Ctrl+Break signals */ BOOL WINAPI esedbtools_signal_handler( esedbtools_signal_t signal ) { static char *function = "esedbtools_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( esedbtools_signal_signal_handler != NULL ) { esedbtools_signal_signal_handler( signal ); } return( TRUE ); default: break; } return( FALSE ); } #if defined( _MSC_VER ) /* Initialize memory usage and leakage debugging */ void esedbtools_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 /* defined( _MSC_VER ) */ /* Attaches a signal handler for Ctrl+C or Ctrl+Break signals * Returns 1 if successful or -1 on error */ int esedbtools_signal_attach( void (*signal_handler)( esedbtools_signal_t ), libcerror_error_t **error ) { static char *function = "esedbtools_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 ); } esedbtools_signal_signal_handler = signal_handler; if( SetConsoleCtrlHandler( (PHANDLER_ROUTINE) esedbtools_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 ) esedbtools_signal_initialize_memory_debug(); #endif SetErrorMode( SEM_FAILCRITICALERRORS ); #if defined( LOCALE_SUPPORT ) /* Allow subsequent threads to have their own locale. * If the application is single threaded this call has * no practical effect. */ _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 /* defined( LOCALE_SUPPORT ) */ return( 1 ); } /* Detaches a signal handler for Ctrl+C or Ctrl+Break signals * Returns 1 if successful or -1 on error */ int esedbtools_signal_detach( libcerror_error_t **error ) { static char *function = "esedbtools_signal_detach"; if( SetConsoleCtrlHandler( (PHANDLER_ROUTINE) esedbtools_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 ); } esedbtools_signal_signal_handler = NULL; return( 1 ); } #else /* Attaches a signal handler for SIGINT * Returns 1 if successful or -1 on error */ int esedbtools_signal_attach( void (*signal_handler)( esedbtools_signal_t ), libcerror_error_t **error ) { static char *function = "esedbtools_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 esedbtools_signal_detach( libcerror_error_t **error ) { static char *function = "esedbtools_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 /* defined( WINAPI ) */ libesedb-20240420/esedbtools/esedbtools_getopt.h0000644000175000017500000000342514610727252022433 0ustar00lordyestalordyesta/* * GetOpt functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_GETOPT_H ) #define _ESEDBTOOLS_GETOPT_H #include #include /* 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 esedbtools_getopt( argument_count, argument_values, options_string ) \ getopt( argument_count, argument_values, options_string ) #else #if !defined( __CYGWIN__ ) extern int optind; extern system_character_t *optarg; extern system_integer_t optopt; #else int optind; system_character_t *optarg; system_integer_t optopt; #endif /* !defined( __CYGWIN__ ) */ system_integer_t esedbtools_getopt( int argument_count, system_character_t * const argument_values[], const system_character_t *options_string ); #endif /* defined( HAVE_GETOPT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDBTOOLS_GETOPT_H ) */ libesedb-20240420/esedbtools/info_handle.c0000644000175000017500000007414114610727625021156 0ustar00lordyestalordyesta/* * Info handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libclocale.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "info_handle.h" #define INFO_HANDLE_NOTIFY_STREAM stdout /* Retrieve a description of the column type */ const char *info_handle_get_column_type_description( uint32_t column_type ) { switch( column_type ) { case LIBESEDB_COLUMN_TYPE_NULL: return( "NULL" ); case LIBESEDB_COLUMN_TYPE_BOOLEAN: return( "Boolean" ); case LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED: return( "Integer 8-bit unsigned" ); case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED: return( "Integer 16-bit signed" ); case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED: return( "Integer 32-bit signed" ); case LIBESEDB_COLUMN_TYPE_CURRENCY: return( "Currency (64-bit)" ); case LIBESEDB_COLUMN_TYPE_FLOAT_32BIT: return( "Floating point single precision (32-bit)" ); case LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT: return( "Floating point double precision (64-bit)" ); case LIBESEDB_COLUMN_TYPE_DATE_TIME: return( "Date and time" ); case LIBESEDB_COLUMN_TYPE_BINARY_DATA: return( "Binary data" ); case LIBESEDB_COLUMN_TYPE_TEXT: return( "Text" ); case LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA: return( "Large binary data" ); case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: return( "Large text" ); case LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE: return( "Super large value" ); case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED: return( "Integer 32-bit unsigned" ); case LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED: return( "Integer 64-bit signed" ); case LIBESEDB_COLUMN_TYPE_GUID: return( "GUID" ); case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED: return( "Integer 16-bit unsigned" ); default: return( "Unknown" ); } } /* Creates an info handle * Make sure the value info_handle is referencing, is set to NULL * 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( libesedb_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 an info handle * 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( libesedb_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 ); } info_handle->abort = 1; if( info_handle->input_file != NULL ) { if( libesedb_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 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 = system_string_length( string ); #if defined( 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 info handle * Returns 1 if successful or -1 on error */ int info_handle_open( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "info_handle_open"; 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( HAVE_WIDE_SYSTEM_CHARACTER ) if( libesedb_file_open_wide( info_handle->input_file, filename, LIBESEDB_OPEN_READ, error ) != 1 ) #else if( libesedb_file_open( info_handle->input_file, filename, LIBESEDB_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"; 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( libesedb_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 ); return( -1 ); } return( 0 ); } /* Prints the column information to a stream * Returns 1 if successful or -1 on error */ int info_handle_column_fprint( info_handle_t *info_handle, int column_iterator, libesedb_column_t *column, libcerror_error_t **error ) { system_character_t *value_string = NULL; static char *function = "info_handle_column_fprint"; size_t value_string_size = 0; uint32_t column_identifier = 0; uint32_t column_type = 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 ); } if( libesedb_column_get_identifier( column, &column_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the column identifier.", function ); goto on_error; } if( libesedb_column_get_type( column, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the column type.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name_size( column, &value_string_size, error ); #else result = libesedb_column_get_utf8_name_size( column, &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 the size of the column name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column name.", function ); goto on_error; } value_string = 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 column name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name( column, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_column_get_utf8_name( column, (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 the column name.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\t%d\t%" PRIu32 "\t%" PRIs_SYSTEM "\t%s\n", column_iterator + 1, column_identifier, value_string, info_handle_get_column_type_description( column_type ) ); memory_free( value_string ); value_string = NULL; return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Prints the index information to a stream * Returns 1 if successful or -1 on error */ int info_handle_index_fprint( info_handle_t *info_handle, int index_iterator, libesedb_index_t *index, libcerror_error_t **error ) { system_character_t *value_string = NULL; static char *function = "info_handle_index_fprint"; size_t value_string_size = 0; uint32_t index_identifier = 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 ); } if( libesedb_index_get_identifier( index, &index_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the index identifier.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name_size( index, &value_string_size, error ); #else result = libesedb_index_get_utf8_name_size( index, &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 the size of the index name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index name.", function ); goto on_error; } value_string = 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 index name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name( index, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_index_get_utf8_name( index, (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 the index name.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tIndex: %d\t\t%" PRIs_SYSTEM " (%" PRIu32 ")\n", index_iterator + 1, value_string, index_identifier ); memory_free( value_string ); value_string = NULL; return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Prints the table information to a stream * Returns 1 if successful or -1 on error */ int info_handle_table_fprint( info_handle_t *info_handle, int table_iterator, libesedb_table_t *table, libcerror_error_t **error ) { libesedb_column_t *column = NULL; libesedb_index_t *index = NULL; system_character_t *value_string = NULL; static char *function = "info_handle_table_fprint"; size_t value_string_size = 0; uint32_t index_identifier = 0; uint32_t table_identifier = 0; int column_iterator = 0; int index_iterator = 0; int number_of_columns = 0; int number_of_indexes = 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 ); } if( libesedb_table_get_identifier( table, &table_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the table identifier.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_name_size( table, &value_string_size, error ); #else result = libesedb_table_get_utf8_name_size( table, &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 the size of the table name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table name.", function ); goto on_error; } value_string = 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 table name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_name( table, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_table_get_utf8_name( table, (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 the table name.", function ); goto on_error; } fprintf( info_handle->notify_stream, "Table: %d\t\t\t%" PRIs_SYSTEM " (%d)\n", table_iterator + 1, value_string, table_identifier ); memory_free( value_string ); value_string = NULL; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_template_name_size( table, &value_string_size, error ); #else result = libesedb_table_get_utf8_template_name_size( table, &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 the size of the table template name.", function ); goto on_error; } if( value_string_size > 0 ) { value_string = 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 template name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_template_name( table, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_table_get_utf8_template_name( table, (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 the template name.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tTemplate:\t\t%s\n", value_string ); memory_free( value_string ); value_string = NULL; } /* Print the columns of the table */ if( libesedb_table_get_number_of_columns( table, &number_of_columns, LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tNumber of columns:\t%d\n", number_of_columns ); fprintf( info_handle->notify_stream, "\tColumn\tIdentifier\tName\tType\n" ); for( column_iterator = 0; column_iterator < number_of_columns; column_iterator++ ) { if( libesedb_table_get_column( table, column_iterator, &column, LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column: %d.", function, column_iterator + 1 ); goto on_error; } if( info_handle_column_fprint( info_handle, column_iterator, column, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print column: %d.", function, column_iterator + 1 ); goto on_error; } if( libesedb_column_free( &column, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column.", function ); goto on_error; } } /* Print the indexes of the table */ if( libesedb_table_get_number_of_indexes( table, &number_of_indexes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of indexes.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\n" ); fprintf( info_handle->notify_stream, "\tNumber of indexes:\t%d\n", number_of_indexes ); for( index_iterator = 0; index_iterator < number_of_indexes; index_iterator++ ) { if( libesedb_table_get_index( table, index_iterator, &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index: %d.", function, index_iterator + 1 ); goto on_error; } if( info_handle_index_fprint( info_handle, index_iterator, index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print index: %d.", function, index_iterator + 1 ); goto on_error; } if( libesedb_index_free( &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index.", function ); goto on_error; } } fprintf( info_handle->notify_stream, "\n" ); /* TODO refactor */ for( index_iterator = 0; index_iterator < number_of_indexes; index_iterator++ ) { if( libesedb_table_get_index( table, index_iterator, &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index: %d.", function, index_iterator + 1 ); goto on_error; } if( libesedb_index_get_identifier( index, &index_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the index identifier.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name_size( index, &value_string_size, error ); #else result = libesedb_index_get_utf8_name_size( index, &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 the size of the index name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index name.", function ); goto on_error; } value_string = 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 index name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name( index, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_index_get_utf8_name( index, (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 the index name.", function ); goto on_error; } fprintf( info_handle->notify_stream, "Index: %d\t\t\t%" PRIs_SYSTEM " (%d)\n", index_iterator + 1, value_string, index_identifier ); memory_free( value_string ); value_string = NULL; /* TODO print index columns */ if( libesedb_index_free( &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\n" ); } return( 1 ); on_error: if( index != NULL ) { libesedb_index_free( &index, NULL ); } if( column != NULL ) { libesedb_column_free( &column, NULL ); } if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* 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 ) { libesedb_table_t *table = NULL; static char *function = "esedbinfo_file_info_fprint"; uint32_t file_type = 0; uint32_t format_revision = 0; uint32_t format_version = 0; uint32_t page_size = 0; int number_of_tables = 0; int table_iterator = 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 ); } fprintf( info_handle->notify_stream, "Extensible Storage Engine Database information:\n" ); if( libesedb_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 ); goto on_error; } fprintf( info_handle->notify_stream, "\tFile type:\t\t" ); if( file_type == LIBESEDB_FILE_TYPE_DATABASE ) { fprintf( info_handle->notify_stream, "Database" ); } else if( file_type == LIBESEDB_FILE_TYPE_STREAMING_FILE ) { fprintf( info_handle->notify_stream, "Streaming file" ); } else { fprintf( info_handle->notify_stream, "Unknown" ); } fprintf( info_handle->notify_stream, "\n" ); if( libesedb_file_get_creation_format_version( info_handle->input_file, &format_version, &format_revision, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve creation format version.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tCreated in format:\t0x%" PRIx32 ",%" PRIu32 "\n", format_version, format_revision ); if( libesedb_file_get_format_version( info_handle->input_file, &format_version, &format_revision, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve format version.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tCurrent format:\t\t0x%" PRIx32 ",%" PRIu32 "\n", format_version, format_revision ); if( libesedb_file_get_page_size( info_handle->input_file, &page_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page size.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tPage size:\t\t%" PRIu32 " bytes\n", page_size ); fprintf( info_handle->notify_stream, "\n" ); if( file_type == LIBESEDB_FILE_TYPE_DATABASE ) { fprintf( info_handle->notify_stream, "Catalog content:\n" ); if( libesedb_file_get_number_of_tables( info_handle->input_file, &number_of_tables, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of tables.", function ); goto on_error; } fprintf( info_handle->notify_stream, "\tNumber of tables:\t%d\n", number_of_tables ); fprintf( info_handle->notify_stream, "\n" ); for( table_iterator = 0; table_iterator < number_of_tables; table_iterator++ ) { if( libesedb_file_get_table( info_handle->input_file, table_iterator, &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table: %d.", function, table_iterator + 1 ); goto on_error; } if( info_handle_table_fprint( info_handle, table_iterator, table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print table: %d.", function, table_iterator + 1 ); goto on_error; } if( libesedb_table_free( &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table.", function ); goto on_error; } } fprintf( info_handle->notify_stream, "\n" ); } return( 1 ); on_error: if( table != NULL ) { libesedb_table_free( &table, NULL ); } return( -1 ); } libesedb-20240420/esedbtools/export_handle.c0000644000175000017500000030172214610727252021536 0ustar00lordyestalordyesta/* * Export handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "database_types.h" #include "esedbtools_libcdata.h" #include "esedbtools_libcerror.h" #include "esedbtools_libclocale.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libcfile.h" #include "esedbtools_libcpath.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_system_string.h" #include "exchange.h" #include "export.h" #include "export_handle.h" #include "srumdb.h" #include "webcache.h" #include "windows_search.h" #include "windows_security.h" #define EXPORT_HANDLE_NOTIFY_STREAM stdout /* Creates an export handle * Make sure the value export_handle is referencing, is set to NULL * 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; } if( libesedb_file_initialize( &( ( *export_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; } ( *export_handle )->export_mode = EXPORT_MODE_TABLES; ( *export_handle )->ascii_codepage = LIBESEDB_CODEPAGE_WINDOWS_1252; ( *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 an export handle * 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"; int result = 1; 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( libesedb_file_free( &( ( *export_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; } 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 ); } memory_free( *export_handle ); *export_handle = NULL; } return( result ); } /* Signals the export handle to abort * 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 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 = system_string_length( string ); if( string_length == 3 ) { if( system_string_compare( string, _SYSTEM_STRING( "all" ), 3 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_ALL; result = 1; } } else if( string_length == 6 ) { if( system_string_compare( string, _SYSTEM_STRING( "tables" ), 6 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_TABLES; result = 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 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 = system_string_length( string ); #if defined( 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 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 ) 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 = system_string_length( target_path ); #if defined( WINAPI ) #if defined( 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 = 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( 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 system_character_t *base_path, size_t base_path_length, const system_character_t *suffix, size_t suffix_length, 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 = 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( 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( 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_set_export_path( export_handle, export_handle->target_path, export_handle->target_path_size - 1, _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( 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_SYSTEM " exists.", function, export_handle->items_export_path ); return( -1 ); } else if( result == 1 ) { return( 0 ); } return( 1 ); } /* Opens the export handle * Returns 1 if successful or -1 on error */ int export_handle_open( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ) { static char *function = "export_handle_open"; 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( HAVE_WIDE_SYSTEM_CHARACTER ) if( libesedb_file_open_wide( export_handle->input_file, filename, LIBESEDB_OPEN_READ, error ) != 1 ) #else if( libesedb_file_open( export_handle->input_file, filename, LIBESEDB_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 export handle * Returns the 0 if succesful or -1 on error */ int export_handle_close( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_close"; 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( libesedb_file_close( export_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 ); return( -1 ); } return( 0 ); } /* Database functions */ /* Frees a table name * Returns 1 if successful or -1 on error */ int export_handle_free_table_name( char **table_name, libcerror_error_t **error ) { static char *function = "export_handle_free_table_name"; 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 != NULL ) { memory_free( *table_name ); *table_name = NULL; } return( 1 ); } /* Item generic export functions */ /* Creates an item filename * Returns 1 if successful or -1 on error */ int export_handle_create_item_filename( export_handle_t *export_handle, int item_index, const system_character_t *item_name, size_t item_name_length, system_character_t **item_filename, size_t *item_filename_size, libcerror_error_t **error ) { static char *function = "export_handle_create_item_filename"; int number_of_digits = 0; int remainder = 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_OUT_OF_BOUNDS, "%s: invalid item index value out of bounds.", function ); return( -1 ); } if( item_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item name.", function ); return( -1 ); } if( item_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item filename.", function ); return( -1 ); } if( item_filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item filename size.", function ); return( -1 ); } remainder = item_index; do { number_of_digits++; remainder /= 10; } while( remainder > 0 ); *item_filename_size = item_name_length + number_of_digits + 2; *item_filename = system_string_allocate( *item_filename_size ); if( *item_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create item filename string.", function ); goto on_error; } if( system_string_copy( *item_filename, item_name, item_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy item name.", function ); goto on_error; } ( *item_filename )[ item_name_length++ ] = (system_character_t) '.'; if( esedbtools_system_string_copy_from_64_bit_in_decimal( *item_filename, *item_filename_size, &item_name_length, (uint64_t) item_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy item index to string.", function ); goto on_error; } ( *item_filename )[ item_name_length ] = 0; return( 1 ); on_error: if( *item_filename != NULL ) { memory_free( *item_filename ); *item_filename = NULL; } *item_filename_size = 0; return( -1 ); } /* Creates a text item file * Returns 1 if successful, 0 if the file already exists or -1 on error */ int export_handle_create_text_item_file( export_handle_t *export_handle, const system_character_t *item_filename, size_t item_filename_length, const system_character_t *export_path, size_t export_path_length, FILE **item_file_stream, libcerror_error_t **error ) { system_character_t *item_filename_path = NULL; static char *function = "export_handle_create_text_item_file"; size_t item_filename_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_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file stream.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_join_wide( &item_filename_path, &item_filename_path_size, export_path, export_path_length, item_filename, item_filename_length, error ) != 1 ) #else if( libcpath_path_join( &item_filename_path, &item_filename_path_size, export_path, export_path_length, item_filename, item_filename_length, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item filename path.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( item_filename_path, error ); #else result = libcfile_file_exists( item_filename_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_SYSTEM " exists.", function, item_filename_path ); goto on_error; } else if( result != 0 ) { memory_free( item_filename_path ); return( 0 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) *item_file_stream = file_stream_open_wide( item_filename_path, _SYSTEM_STRING( FILE_STREAM_OPEN_WRITE ) ); #else *item_file_stream = file_stream_open( item_filename_path, FILE_STREAM_OPEN_WRITE ); #endif if( *item_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open: %" PRIs_SYSTEM ".", function, item_filename_path ); goto on_error; } memory_free( item_filename_path ); return( 1 ); on_error: if( item_filename_path != NULL ) { memory_free( item_filename_path ); } return( -1 ); } /* Exports the table * Returns 1 if successful or -1 on error */ int export_handle_export_table( export_handle_t *export_handle, int database_type, libesedb_table_t *table, int table_index, const system_character_t *table_name, size_t table_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *item_filename = NULL; system_character_t *value_string = NULL; libesedb_column_t *column = NULL; libesedb_record_t *record = NULL; FILE *table_file_stream = NULL; static char *function = "export_handle_export_table"; size_t item_filename_size = 0; size_t value_string_size = 0; int column_iterator = 0; int known_table = 0; int number_of_columns = 0; int number_of_records = 0; int record_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_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table name.", function ); return( -1 ); } if( export_handle_create_item_filename( export_handle, table_index, table_name, table_name_length, &item_filename, &item_filename_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item filename.", function ); goto on_error; } result = export_handle_create_text_item_file( export_handle, item_filename, item_filename_size - 1, export_path, export_path_length, &table_file_stream, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping table: %" PRIs_SYSTEM " it already exists.\n", item_filename ); memory_free( item_filename ); return( 1 ); } memory_free( item_filename ); item_filename = NULL; /* Write the column names to the table file */ if( libesedb_table_get_number_of_columns( table, &number_of_columns, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns.", function ); goto on_error; } for( column_iterator = 0; column_iterator < number_of_columns; column_iterator++ ) { if( libesedb_table_get_column( table, column_iterator, &column, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column: %d.", function, column_iterator ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name_size( column, &value_string_size, error ); #else result = libesedb_column_get_utf8_name_size( column, &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 the size of the column name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column name.", function ); goto on_error; } value_string = 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 column name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name( column, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_column_get_utf8_name( column, (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 the column name.", function ); goto on_error; } fprintf( table_file_stream, "%" PRIs_SYSTEM "", value_string ); memory_free( value_string ); value_string = NULL; if( libesedb_column_free( &column, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column.", function ); goto on_error; } if( column_iterator == ( number_of_columns - 1 ) ) { fprintf( table_file_stream, "\n" ); } else { fprintf( table_file_stream, "\t" ); } } /* Write the record (row) values to the table file */ if( libesedb_table_get_number_of_records( table, &number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of records.", function ); goto on_error; } for( record_iterator = 0; record_iterator < number_of_records; record_iterator++ ) { if( libesedb_table_get_record( table, record_iterator, &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record: %d.", function, record_iterator ); goto on_error; } /* TODO move to separate export table functions */ known_table = 0; switch( database_type ) { case DATABASE_TYPE_EXCHANGE: if( table_name_length == 3 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "Msg" ), 3 ) == 0 ) { known_table = 1; result = exchange_export_record_msg( record, table_file_stream, log_handle, error ); } } else if( table_name_length == 6 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "Global" ), 6 ) == 0 ) { known_table = 1; result = exchange_export_record_global( record, table_file_stream, log_handle, error ); } } else if( table_name_length == 7 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "Folders" ), 7 ) == 0 ) { known_table = 1; result = exchange_export_record_folders( record, table_file_stream, log_handle, error ); } else if( system_string_compare( table_name, _SYSTEM_STRING( "Mailbox" ), 7 ) == 0 ) { known_table = 1; result = exchange_export_record_mailbox( record, table_file_stream, log_handle, error ); } } else if( table_name_length == 11 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "PerUserRead" ), 11 ) == 0 ) { known_table = 1; result = exchange_export_record_per_user_read( record, table_file_stream, log_handle, error ); } } break; case DATABASE_TYPE_SRUM: if( table_name_length == 38 ) { if( ( table_name[ 0 ] == '{' ) && ( table_name[ 9 ] == '-' ) && ( table_name[ 14 ] == '-' ) && ( table_name[ 19 ] == '-' ) && ( table_name[ 24 ] == '-' ) && ( table_name[ 37 ] == '}' ) ) { known_table = 1; result = srumdb_export_record_guid( record, table_file_stream, log_handle, error ); } } break; case DATABASE_TYPE_WEBCACHE: if( table_name_length == 10 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "Containers" ), 10 ) == 0 ) { known_table = 1; result = webcache_export_record_containers( record, table_file_stream, log_handle, error ); } } if( table_name_length >= 10 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "Container_" ), 10 ) == 0 ) { known_table = 1; result = webcache_export_record_container( record, table_file_stream, log_handle, error ); } } break; case DATABASE_TYPE_WINDOWS_SEARCH: if( table_name_length == 14 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "SystemIndex_0A" ), 14 ) == 0 ) { known_table = 1; result = windows_search_export_record_systemindex_0a( record, export_handle->ascii_codepage, table_file_stream, log_handle, error ); } } else if( table_name_length == 16 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "SystemIndex_Gthr" ), 16 ) == 0 ) { known_table = 1; result = windows_search_export_record_systemindex_gthr( record, table_file_stream, log_handle, error ); } } break; case DATABASE_TYPE_WINDOWS_SECURITY: if( table_name_length == 12 ) { if( system_string_compare( table_name, _SYSTEM_STRING( "SmTblSection" ), 12 ) == 0 ) { known_table = 1; result = windows_security_export_record_smtblsection( record, table_file_stream, log_handle, error ); } else if( system_string_compare( table_name, _SYSTEM_STRING( "SmTblVersion" ), 12 ) == 0 ) { known_table = 1; result = windows_security_export_record_smtblversion( record, table_file_stream, log_handle, error ); } } break; case DATABASE_TYPE_UNKNOWN: default: break; } if( known_table == 0 ) { result = export_handle_export_record( record, table_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record.", function ); goto on_error; } if( libesedb_record_free( &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record.", function ); goto on_error; } if( export_handle->abort != 0 ) { break; } } if( file_stream_close( table_file_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close table file.", function ); goto on_error; } table_file_stream = NULL; if( export_handle->abort == 0 ) { if( export_handle->export_mode != EXPORT_MODE_TABLES ) { if( export_handle_export_indexes( export_handle, table, table_name, table_name_length, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export indexes.", function ); goto on_error; } } } return( 1 ); on_error: if( record != NULL ) { libesedb_record_free( &record, NULL ); } if( value_string != NULL ) { memory_free( value_string ); } if( column != NULL ) { libesedb_column_free( &column, NULL ); } if( table_file_stream != NULL ) { file_stream_close( table_file_stream ); } if( item_filename != NULL ) { memory_free( item_filename ); } return( -1 ); } /* Exports the indexes of a specific table * Returns 1 if successful or -1 on error */ int export_handle_export_indexes( export_handle_t *export_handle, libesedb_table_t *table, const system_character_t *table_name, size_t table_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libesedb_index_t *index = NULL; system_character_t *index_directory_name = NULL; system_character_t *index_name = NULL; system_character_t *sanitized_name = NULL; static char *function = "export_handle_export_indexes"; size_t index_directory_name_size = 0; size_t index_name_size = 0; size_t sanitized_name_size = 0; int index_iterator = 0; int number_of_indexes = 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 defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_join_wide( &index_directory_name, &index_directory_name_size, export_path, export_path_length, table_name, table_name_length, error ) != 1 ) #else if( libcpath_path_join( &index_directory_name, &index_directory_name_size, export_path, export_path_length, table_name, table_name_length, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index directory.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( index_directory_name, error ); #else result = libcfile_file_exists( index_directory_name, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_SYSTEM " exists.", function, index_directory_name ); goto on_error; } else if( result == 1 ) { log_handle_printf( log_handle, "Skipping indexes they already exists.\n" ); memory_free( index_directory_name ); return( 1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( index_directory_name, error ) != 1 ) #else if( libcpath_path_make_directory( index_directory_name, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_SYSTEM ".", function, index_directory_name ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_SYSTEM ".\n", index_directory_name ); memory_free( index_directory_name ); index_directory_name = NULL; if( libesedb_table_get_number_of_indexes( table, &number_of_indexes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of indexes.", function ); goto on_error; } /* Ignore index 1 because it is a build-in index that points to the table */ for( index_iterator = 1; index_iterator < number_of_indexes; index_iterator++ ) { if( libesedb_table_get_index( table, index_iterator, &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index: %d.", function, index_iterator + 1 ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name_size( index, &index_name_size, error ); #else result = libesedb_index_get_utf8_name_size( index, &index_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the size of the index name.", function ); goto on_error; } if( index_name_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index name.", function ); goto on_error; } index_name = system_string_allocate( index_name_size ); if( index_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create index name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_index_get_utf16_name( index, (uint16_t *) index_name, index_name_size, error ); #else result = libesedb_index_get_utf8_name( index, (uint8_t *) index_name, index_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the index name.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Exporting index %d (%" PRIs_SYSTEM ")", index_iterator + 1, index_name ); /* TODO want to change this to an export index name or refactor */ if( index_name == NULL ) { fprintf( export_handle->notify_stream, " out of %d", number_of_indexes ); } fprintf( export_handle->notify_stream, ".\n" ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_get_sanitized_filename_wide( index_name, index_name_size - 1, &sanitized_name, &sanitized_name_size, error ) != 1 ) #else if( libcpath_path_get_sanitized_filename( index_name, index_name_size - 1, &sanitized_name, &sanitized_name_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable sanitize index name.", function ); goto on_error; } memory_free( index_name ); index_name = NULL; if( export_handle_export_index( export_handle, index, index_iterator, sanitized_name, sanitized_name_size - 1, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export index: %d.", function, index_iterator ); goto on_error; } memory_free( sanitized_name ); sanitized_name = NULL; if( libesedb_index_free( &index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index.", function ); goto on_error; } } return( 1 ); on_error: if( sanitized_name != NULL ) { memory_free( sanitized_name ); } if( index_name != NULL ) { memory_free( index_name ); } if( index != NULL ) { libesedb_index_free( &index, NULL ); } if( index_directory_name != NULL ) { memory_free( index_directory_name ); } return( -1 ); } /* Exports the index * Returns 1 if successful or -1 on error */ int export_handle_export_index( export_handle_t *export_handle, libesedb_index_t *index, int index_iterator, const system_character_t *index_name, size_t index_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *item_filename = NULL; libesedb_record_t *record = NULL; FILE *index_file_stream = NULL; static char *function = "export_handle_export_index"; int known_index = 0; size_t item_filename_size = 0; int number_of_records = 0; int record_iterator = 0; int result = 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_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index name.", function ); return( -1 ); } if( export_handle_create_item_filename( export_handle, index_iterator, index_name, index_name_length, &item_filename, &item_filename_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item filename.", function ); goto on_error; } result = export_handle_create_text_item_file( export_handle, item_filename, item_filename_size - 1, export_path, export_path_length, &index_file_stream, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping index: %" PRIs_SYSTEM " it already exists.\n", item_filename ); memory_free( item_filename ); return( 1 ); } memory_free( item_filename ); item_filename = NULL; #ifdef TODO /* Write the column names to the index file */ if( libesedb_index_get_number_of_columns( index, &number_of_columns, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns.", function ); goto on_error; } for( column_iterator = 0; column_iterator < number_of_columns; column_iterator++ ) { if( libesedb_index_get_column( index, column_iterator, &column, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column: %d.", function, column_iterator ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name_size( column, &value_string_size, error ); #else result = libesedb_column_get_utf8_name_size( column, &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 the size of the column name.", function ); goto on_error; } if( value_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column name.", function ); goto on_error; } value_string = 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 column name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_column_get_utf16_name( column, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_column_get_utf8_name( column, (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 the column name.", function ); goto on_error; } fprintf( index_file_stream, "%" PRIs_SYSTEM "", value_string ); memory_free( value_string ); value_string = NULL; if( libesedb_column_free( &column, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column.", function ); goto on_error; } if( column_iterator == ( number_of_columns - 1 ) ) { fprintf( index_file_stream, "\n" ); } else { fprintf( index_file_stream, "\t" ); } } #endif /* Write the record (row) values to the index file */ if( libesedb_index_get_number_of_records( index, &number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of records.", function ); goto on_error; } for( record_iterator = 0; record_iterator < number_of_records; record_iterator++ ) { if( libesedb_index_get_record( index, record_iterator, &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record: %d.", function, record_iterator ); goto on_error; } known_index = 0; if( known_index == 0 ) { result = export_handle_export_record( record, index_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record.", function ); goto on_error; } if( libesedb_record_free( &record, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record.", function ); goto on_error; } } if( file_stream_close( index_file_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close index file.", function ); goto on_error; } index_file_stream = NULL; return( 1 ); on_error: if( record != NULL ) { libesedb_record_free( &record, NULL ); } #ifdef TODO if( value_string != NULL ) { memory_free( value_string ); } if( column != NULL ) { libesedb_column_free( &column, NULL ); } #endif if( index_file_stream != NULL ) { file_stream_close( index_file_stream ); } if( item_filename != NULL ) { memory_free( item_filename ); } return( -1 ); } /* Exports the values in a record * Returns 1 if successful or -1 on error */ int export_handle_export_record( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_record"; int number_of_values = 0; int value_iterator = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { if( export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports a record value * Returns 1 if successful or -1 on error */ int export_handle_export_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *value_string = NULL; libesedb_multi_value_t *multi_value = NULL; uint8_t *binary_data = NULL; uint8_t *multi_value_data = NULL; uint8_t *value_data = NULL; static char *function = "export_handle_export_record_value"; size_t binary_data_size = 0; size_t multi_value_data_size = 0; size_t value_data_size = 0; size_t value_string_size = 0; uint32_t column_identifier = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int multi_value_iterator = 0; int number_of_multi_values = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_identifier( record, record_value_entry, &column_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column identifier of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( export_handle_export_basic_record_value( record, record_value_entry, record_file_stream, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export basic record value: %d.", function, record_value_entry ); return( -1 ); } } else if( ( ( value_data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) && ( ( value_data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) == 0 ) ) { switch( column_type ) { case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_value_utf16_string_size( record, record_value_entry, &value_string_size, error ); #else result = libesedb_record_get_value_utf8_string_size( record, record_value_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 size of value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } if( result != 0 ) { if( value_string_size == 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); } } else { value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_value_utf16_string( record, record_value_entry, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_record_get_value_utf8_string( record, record_value_entry, (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 value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); value_string = NULL; } } break; case LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA: result = libesedb_record_get_value_binary_data_size( record, record_value_entry, &binary_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of binary data: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } if( result != 0 ) { if( binary_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing binary data.", function ); goto on_error; } binary_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * binary_data_size ); 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; } result = libesedb_record_get_value_binary_data( record, record_value_entry, binary_data, binary_data_size, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve binary data: %d.", function, record_value_entry ); goto on_error; } export_binary_data( binary_data, binary_data_size, record_file_stream ); memory_free( binary_data ); binary_data = NULL; } break; default: export_binary_data( value_data, value_data_size, record_file_stream ); break; } } else if( ( ( value_data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) != 0 ) && ( ( value_data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) == 0 ) ) { result = export_handle_export_long_record_value( record, record_value_entry, record_file_stream, log_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export long record value: %d.", function, record_value_entry ); return( -1 ); } } /* TODO handle 0x10 flags */ else if( ( ( value_data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) && ( ( value_data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) == 0 ) && ( ( value_data_flags & 0x10 ) == 0 ) ) { /* TODO what about non string multi values ? */ if( libesedb_record_get_multi_value( record, record_value_entry, &multi_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value of record entry: %d.", function, record_value_entry ); goto on_error; } if( libesedb_multi_value_get_number_of_values( multi_value, &number_of_multi_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of multi values.", function ); goto on_error; } for( multi_value_iterator = 0; multi_value_iterator < number_of_multi_values; multi_value_iterator++ ) { if( ( column_type == LIBESEDB_COLUMN_TYPE_TEXT ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_multi_value_get_value_utf16_string_size( multi_value, multi_value_iterator, &value_string_size, error ); #else result = libesedb_multi_value_get_value_utf8_string_size( multi_value, multi_value_iterator, &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 size of string of multi value: %d of record entry: %d (%" PRIu32 ").", function, multi_value_iterator, record_value_entry, column_identifier ); goto on_error; } else if( result != 0 ) { value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_multi_value_get_value_utf16_string( multi_value, multi_value_iterator, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_multi_value_get_value_utf8_string( multi_value, multi_value_iterator, (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 string of multi value: %d of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); value_string = NULL; } if( multi_value_iterator < ( number_of_multi_values - 1 ) ) { fprintf( record_file_stream, "; " ); } } else { if( libesedb_multi_value_get_value_data_size( multi_value, multi_value_iterator, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d data size of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } if( multi_value_data_size > 0 ) { multi_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * multi_value_data_size ); if( multi_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value data.", function ); goto on_error; } if( libesedb_multi_value_get_value_data( multi_value, multi_value_iterator, multi_value_data, multi_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d data of record entry: %d.", function, multi_value_iterator, record_value_entry ); goto on_error; } export_binary_data( multi_value_data, multi_value_data_size, record_file_stream ); memory_free( multi_value_data ); multi_value_data = NULL; } } } if( libesedb_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: %d.", function, multi_value_iterator ); goto on_error; } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } return( 1 ); on_error: if( multi_value_data != NULL ) { memory_free( multi_value_data ); } if( multi_value != NULL ) { libesedb_multi_value_free( &multi_value, NULL ); } if( binary_data != NULL ) { memory_free( binary_data ); } if( value_string != NULL ) { memory_free( value_string ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a basic record value * Returns 1 if successful or -1 on error */ int export_handle_export_basic_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t filetime_string[ 32 ]; system_character_t *value_string = NULL; libfdatetime_filetime_t *filetime = NULL; uint8_t *value_data = NULL; static char *function = "export_handle_export_basic_record_value"; size_t value_data_size = 0; size_t value_string_size = 0; double value_double = 0.0; float value_float = 0.0; uint64_t value_64bit = 0; uint32_t column_identifier = 0; uint32_t column_type = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; uint8_t value_8bit = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_identifier( record, record_value_entry, &column_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column identifier of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value: %d data flags: 0x%02" PRIx32 ".", function, record_value_entry, value_data_flags ); goto on_error; } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_BOOLEAN: result = libesedb_record_get_value_boolean( record, record_value_entry, &value_8bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve boolean value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { if( value_8bit == 0 ) { fprintf( record_file_stream, "false" ); } else { fprintf( record_file_stream, "true" ); } } break; case LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED: result = libesedb_record_get_value_8bit( record, record_value_entry, &value_8bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 8-bit value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { fprintf( record_file_stream, "%" PRIu8 "", value_8bit ); } break; case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED: result = libesedb_record_get_value_16bit( record, record_value_entry, &value_16bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 16-bit value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ) { fprintf( record_file_stream, "%" PRIi16 "", (int16_t) value_16bit ); } else { fprintf( record_file_stream, "%" PRIu16 "", value_16bit ); } } break; case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED: result = libesedb_record_get_value_32bit( record, record_value_entry, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 32-bit value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) { fprintf( record_file_stream, "%" PRIi32 "", (int32_t) value_32bit ); } else { fprintf( record_file_stream, "%" PRIu32 "", value_32bit ); } } break; case LIBESEDB_COLUMN_TYPE_CURRENCY: case LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED: result = libesedb_record_get_value_64bit( record, record_value_entry, &value_64bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 64-bit value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { fprintf( record_file_stream, "%" PRIi64 "", (int64_t) value_64bit ); } else { fprintf( record_file_stream, "%" PRIu64 "", value_64bit ); } } break; case LIBESEDB_COLUMN_TYPE_DATE_TIME: result = libesedb_record_get_value_filetime( record, record_value_entry, &value_64bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve filetime value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { 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_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime from 64-bit value.", function ); goto on_error; } #if defined( 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 ); 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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", filetime_string ); } break; case LIBESEDB_COLUMN_TYPE_FLOAT_32BIT: result = libesedb_record_get_value_floating_point_32bit( record, record_value_entry, &value_float, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve single precision floating point value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { fprintf( record_file_stream, "%f", value_float ); } break; case LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT: result = libesedb_record_get_value_floating_point_64bit( record, record_value_entry, &value_double, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve double precision floating point value: %d.", function, record_value_entry ); goto on_error; } else if( result != 0 ) { fprintf( record_file_stream, "%f", value_double ); } break; case LIBESEDB_COLUMN_TYPE_TEXT: case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_value_utf16_string_size( record, record_value_entry, &value_string_size, error ); #else result = libesedb_record_get_value_utf8_string_size( record, record_value_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 size of value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } if( result != 0 ) { if( value_string_size == 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); } } else { value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_value_utf16_string( record, record_value_entry, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_record_get_value_utf8_string( record, record_value_entry, (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 value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); value_string = NULL; } } break; default: if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } export_binary_data( value_data, value_data_size, record_file_stream ); memory_free( value_data ); value_data = NULL; } break; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a long record value * Returns 1 if successful, 0 if not or -1 on error */ int export_handle_export_long_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t *value_string = NULL; libesedb_long_value_t *long_value = NULL; uint8_t *value_data = NULL; static char *function = "export_handle_export_long_record_value"; size64_t value_data_size = 0; size_t value_string_size = 0; uint32_t column_identifier = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_identifier( record, record_value_entry, &column_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column identifier of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value: %d data flags: 0x%02" PRIx32 ".", function, record_value_entry, value_data_flags ); goto on_error; } result = libesedb_record_get_long_value( record, record_value_entry, &long_value, error ); if( result != 1 ) { log_handle_printf( log_handle, "Unable to retrieve long value of record entry: %d.\n", record_value_entry ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to retrieve long value of record entry: %d.\n", function, record_value_entry ); } libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value of record entry: %d.", function, record_value_entry ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); return( 0 ); } /* TODO remove call to export_get_long_value_data */ if( export_get_long_value_data( long_value, &value_data, (size_t *) &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve long value data of record entry: %d.", function, record_value_entry ); goto on_error; } memory_free( value_data ); value_data = NULL; switch( column_type ) { case LIBESEDB_COLUMN_TYPE_TEXT: case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_long_value_get_utf16_string_size( long_value, &value_string_size, error ); #else result = libesedb_long_value_get_utf8_string_size( long_value, &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 size of value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } if( result != 0 ) { if( value_string_size == 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); } } else { value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_long_value_get_utf16_string( long_value, (uint16_t *) value_string, value_string_size, error ); #else result = libesedb_long_value_get_utf8_string( long_value, (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 value string: %d (%" PRIu32 ").", function, record_value_entry, column_identifier ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); value_string = NULL; } } break; default: if( libesedb_long_value_get_data_size( long_value, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value: %d data size value out of bounds.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_long_value_get_data( long_value, value_data, (size_t) value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data.", function, record_value_entry ); goto on_error; } export_binary_data( value_data, value_data_size, record_file_stream ); memory_free( value_data ); value_data = NULL; } break; } if( libesedb_long_value_free( &long_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long value.", function ); goto on_error; } return( 1 ); on_error: if( long_value != NULL ) { libesedb_long_value_free( &long_value, NULL ); } if( value_string != NULL ) { memory_free( value_string ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports the items in the file * Returns the 1 if succesful, 0 if no items are available or -1 on error */ int export_handle_export_file( export_handle_t *export_handle, const system_character_t *export_table_name, size_t export_table_name_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcdata_array_t *table_names = NULL; libesedb_table_t *table = NULL; system_character_t *sanitized_name = NULL; system_character_t *table_name = NULL; static char *function = "export_handle_export_file"; size_t sanitized_name_size = 0; size_t table_name_length = 0; size_t table_name_size = 0; int database_type = 0; int entry_index = 0; int number_of_tables = 0; int result = 0; int table_exported = 0; int table_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( export_table_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid export table name length value exceeds maximum.", function ); return( -1 ); } if( libesedb_file_get_number_of_tables( export_handle->input_file, &number_of_tables, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of tables.", function ); goto on_error; } if( number_of_tables == 0 ) { return( 0 ); } if( libcdata_array_initialize( &table_names, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table names array.", function ); goto on_error; } for( table_index = 0; table_index < number_of_tables; table_index++ ) { if( libesedb_file_get_table( export_handle->input_file, table_index, &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table: %d.", function, table_index ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_name_size( table, &table_name_size, error ); #else result = libesedb_table_get_utf8_name_size( table, &table_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the size of the table name.", function ); goto on_error; } if( table_name_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table name.", function ); goto on_error; } table_name = system_string_allocate( table_name_size ); if( table_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table name string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_table_get_utf16_name( table, (uint16_t *) table_name, table_name_size, error ); #else result = libesedb_table_get_utf8_name( table, (uint8_t *) table_name, table_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the table name.", function ); goto on_error; } if( libesedb_table_free( &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table: %d.", function, table_index ); goto on_error; } if( libcdata_array_append_entry( table_names, &entry_index, (intptr_t *) table_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append name of table: %d to array.", function, table_index ); goto on_error; } table_name = NULL; } if( database_type_determine( &database_type, table_names, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine database type.", function ); table_name = NULL; goto on_error; } fprintf( export_handle->notify_stream, "Database type: %" PRIs_SYSTEM ".\n", database_type_descriptions[ database_type ] ); for( table_index = 0; table_index < number_of_tables; table_index++ ) { if( libcdata_array_get_entry_by_index( table_names, table_index, (intptr_t **) &table_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the name of table: %d from array.", function, table_index ); table_name = NULL; goto on_error; } if( table_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing name of table: %d.", function, table_index ); table_name = NULL; goto on_error; } table_name_length = system_string_length( table_name ); if( export_table_name != NULL ) { if( table_name_length != export_table_name_length ) { continue; } if( system_string_compare( table_name, export_table_name, export_table_name_length ) != 0 ) { continue; } } if( libesedb_file_get_table( export_handle->input_file, table_index, &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table: %d.", function, table_index ); table_name = NULL; goto on_error; } if( table_exported == 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( export_handle->items_export_path, error ) != 1 ) #else if( libcpath_path_make_directory( export_handle->items_export_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_SYSTEM ".", function, export_handle->items_export_path ); table_name = NULL; goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_SYSTEM ".\n", export_handle->items_export_path ); table_exported = 1; } fprintf( export_handle->notify_stream, "Exporting table %d (%" PRIs_SYSTEM ")", table_index + 1, table_name ); if( export_table_name == NULL ) { fprintf( export_handle->notify_stream, " out of %d", number_of_tables ); } fprintf( export_handle->notify_stream, ".\n" ); /* TODO move into export_handle_export_table */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_get_sanitized_filename_wide( table_name, table_name_length, &sanitized_name, &sanitized_name_size, error ) != 1 ) #else if( libcpath_path_get_sanitized_filename( table_name, table_name_length, &sanitized_name, &sanitized_name_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable sanitize table name.", function ); table_name = NULL; goto on_error; } if( export_handle_export_table( export_handle, database_type, table, table_index, sanitized_name, sanitized_name_size - 1, 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 table: %d.", function, table_index ); table_name = NULL; goto on_error; } memory_free( sanitized_name ); sanitized_name = NULL; if( libesedb_table_free( &table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table: %d.", function, table_index ); table_name = NULL; goto on_error; } } if( libcdata_array_free( &table_names, (int (*)(intptr_t **, libcerror_error_t **)) &export_handle_free_table_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table names array.", function ); goto on_error; } return( table_exported ); on_error: if( sanitized_name != NULL ) { memory_free( sanitized_name ); } if( table_name != NULL ) { memory_free( table_name ); } if( table != NULL ) { libesedb_table_free( &table, NULL ); } if( table_names != NULL ) { libcdata_array_free( &table_names, (int (*)(intptr_t **, libcerror_error_t **)) &export_handle_free_table_name, NULL ); } return( -1 ); } libesedb-20240420/esedbtools/esedbtools_libuna.h0000644000175000017500000000336514610727252022406 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBUNA_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBUNA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _ESEDBTOOLS_LIBUNA_H ) */ libesedb-20240420/esedbtools/esedbtools_libcdata.h0000644000175000017500000000302214610727252022665 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCDATA_H ) #define _ESEDBTOOLS_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _ESEDBTOOLS_LIBCDATA_H ) */ libesedb-20240420/esedbtools/esedbtools_libfdatetime.h0000644000175000017500000000335314610727252023562 0ustar00lordyestalordyesta/* * The libfdatetime header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBFDATETIME_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBFDATETIME_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _ESEDBTOOLS_LIBFDATETIME_H ) */ libesedb-20240420/esedbtools/esedbtools_system_string.c0000644000175000017500000000561714610727625024047 0ustar00lordyestalordyesta/* * Character string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "esedbtools_libcerror.h" /* Copies a string of a decimal value from a 64-bit value * Returns 1 if successful or -1 on error */ int esedbtools_system_string_copy_from_64_bit_in_decimal( system_character_t *string, size_t string_size, size_t *string_index, uint64_t value_64bit, libcerror_error_t **error ) { static char *function = "esedbtools_system_string_copy_from_64_bit_in_decimal"; 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 ); } libesedb-20240420/esedbtools/esedbtools_libbfio.h0000644000175000017500000000332414610727252022535 0ustar00lordyestalordyesta/* * The libbfio header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBBFIO_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBBFIO_DLL_IMPORT #endif #include #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT ) #error Multi-threading support requires libbfio with multi-threading support #endif #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _ESEDBTOOLS_LIBBFIO_H ) */ libesedb-20240420/esedbtools/log_handle.c0000644000175000017500000001345614610727252021002 0ustar00lordyestalordyesta/* * Log handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #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 "esedbtools_libcerror.h" #include "log_handle.h" /* Creates a log handle * Make sure the value log_handle is referencing, is set to NULL * 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 a log handle * 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 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 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) log_handle->log_stream = file_stream_open_wide( filename, _WIDE_STRING( FILE_STREAM_OPEN_APPEND ) ); #else log_handle->log_stream = file_stream_open( filename, FILE_STREAM_OPEN_APPEND ); #endif 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( 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 libesedb-20240420/esedbtools/export.h0000644000175000017500000000355014610727252020226 0ustar00lordyestalordyesta/* * Export functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _EXPORT_H ) #define _EXPORT_H #include #include #include #include "esedbtools_libesedb.h" #if defined( __cplusplus ) extern "C" { #endif void export_binary_data( const uint8_t *data, size_t data_size, FILE *stream ); void export_narrow_text( const char *string, size_t string_size, FILE *stream ); void export_text( const system_character_t *string, size_t string_size, FILE *stream ); int export_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int export_floatingtime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int export_get_long_value_data( libesedb_long_value_t *long_value, uint8_t **long_value_data, size_t *long_value_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EXPORT_H ) */ libesedb-20240420/esedbtools/esedbtools_signal.h0000644000175000017500000000334114610727252022403 0ustar00lordyestalordyesta/* * Signal handling functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_SIGNAL_H ) #define _ESEDBTOOLS_SIGNAL_H #include #include #include "esedbtools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_SIGNAL_H ) && !defined( WINAPI ) #error missing signal functions #endif #if defined( WINAPI ) typedef unsigned long esedbtools_signal_t; #else typedef int esedbtools_signal_t; #endif /* defined( WINAPI ) */ #if defined( WINAPI ) BOOL WINAPI esedbtools_signal_handler( esedbtools_signal_t signal ); #if defined( _MSC_VER ) void esedbtools_signal_initialize_memory_debug( void ); #endif /* defined( _MSC_VER ) */ #endif /* defined( WINAPI ) */ int esedbtools_signal_attach( void (*signal_handler)( esedbtools_signal_t ), libcerror_error_t **error ); int esedbtools_signal_detach( libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDBTOOLS_SIGNAL_H ) */ libesedb-20240420/esedbtools/esedbexport.c0000644000175000017500000002734014610727252021227 0ustar00lordyestalordyesta/* * Extracts tables from an Extensible Storage Engine (ESE) Database (EDB) file * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedbtools_getopt.h" #include "esedbtools_libcerror.h" #include "esedbtools_libclocale.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libcpath.h" #include "esedbtools_libesedb.h" #include "esedbtools_output.h" #include "esedbtools_signal.h" #include "esedbtools_unused.h" #include "export_handle.h" #include "log_handle.h" export_handle_t *esedbexport_export_handle = NULL; int esedbexport_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use esedbexport to export items stored in an Extensible Storage Engine (ESE)\n" "Database (EDB) file\n\n" ); fprintf( stream, "Usage: esedbexport [ -c codepage ] [ -l logfile ] [ -m mode ] [ -t target ]\n" " [ -T table_name ] [ -hvV ] source\n\n" ); fprintf( stream, "\tsource: the source file\n\n" ); fprintf( stream, "\t-c: codepage of ASCII strings, options: ascii, windows-874,\n" "\t windows-932, windows-936, windows-1250, windows-1251,\n" "\t windows-1252 (default), windows-1253, windows-1254\n" "\t windows-1255, windows-1256, windows-1257 or windows-1258\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, tables (default)\n" "\t 'all' exports all the tables or a single specified table with indexes,\n" "\t 'tables' exports all the tables or a single specified table\n" ); fprintf( stream, "\t-t: specify the basename of the target directory to export to\n" "\t (default is the source filename) esedbexport will add the suffix\n" "\t .export to the basename\n" ); fprintf( stream, "\t-T: exports only a specific table\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" ); fprintf( stream, "\t-V: print version\n" ); } /* Signal handler for esedbexport */ void esedbexport_signal_handler( esedbtools_signal_t signal ESEDBTOOLS_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "esedbexport_signal_handler"; ESEDBTOOLS_UNREFERENCED_PARAMETER( signal ) esedbexport_abort = 1; if( esedbexport_export_handle != NULL ) { if( export_handle_signal_abort( esedbexport_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 ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ #if defined( WINAPI ) && !defined( __CYGWIN__ ) if( _close( 0 ) != 0 ) #else if( close( 0 ) != 0 ) #endif { libcnotify_printf( "%s: unable to close stdin.\n", function ); } } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { system_character_t *log_filename = NULL; system_character_t *option_ascii_codepage = NULL; system_character_t *option_export_mode = NULL; system_character_t *option_table_name = NULL; system_character_t *option_target_path = NULL; system_character_t *path_separator = NULL; system_character_t *source = NULL; libcerror_error_t *error = NULL; log_handle_t *log_handle = NULL; char *program = "esedbexport"; size_t source_length = 0; size_t option_table_name_length = 0; system_integer_t option = 0; int result = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "esedbtools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( esedbtools_output_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize output settings.\n" ); goto on_error; } esedboutput_version_fprint( stdout, program ); while( ( option = esedbtools_getopt( argc, argv, _SYSTEM_STRING( "c:hl:m:t:T:vV" ) ) ) != (system_integer_t) -1 ) { switch( option ) { case (system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_SYSTEM "\n", argv[ optind - 1 ] ); usage_fprint( stdout ); return( EXIT_FAILURE ); case (system_integer_t) 'c': option_ascii_codepage = optarg; break; case (system_integer_t) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (system_integer_t) 'l': log_filename = optarg; break; case (system_integer_t) 'm': option_export_mode = optarg; break; case (system_integer_t) 't': option_target_path = optarg; break; case (system_integer_t) 'T': option_table_name = optarg; break; case (system_integer_t) 'v': verbose = 1; break; case (system_integer_t) 'V': esedboutput_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 = system_string_length( source ); path_separator = system_string_search_character_reverse( source, (system_character_t) LIBCPATH_SEPARATOR, source_length ); if( path_separator == NULL ) { path_separator = source; } else { path_separator++; } option_target_path = path_separator; } if( option_table_name != NULL ) { option_table_name_length = system_string_length( option_table_name ); } libcnotify_verbose_set( verbose ); libesedb_notify_set_stream( stderr, NULL ); libesedb_notify_set_verbose( verbose ); if( log_handle_initialize( &log_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize log handle.\n" ); goto on_error; } if( export_handle_initialize( &esedbexport_export_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize export handle.\n" ); goto on_error; } /* TODO esedbexport_export_handle->print_status_information = print_status_information; */ if( option_export_mode != NULL ) { result = export_handle_set_export_mode( esedbexport_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: tables.\n" ); } } if( option_ascii_codepage != NULL ) { result = export_handle_set_ascii_codepage( esedbexport_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( esedbexport_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( esedbexport_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_SYSTEM " already exists.\n", esedbexport_export_handle->items_export_path ); goto on_error; } if( log_handle_open( log_handle, log_filename, &error ) != 1 ) { fprintf( stderr, "Unable to open log file: %" PRIs_SYSTEM ".\n", log_filename ); goto on_error; } fprintf( stdout, "Opening file.\n" ); #ifdef TODO_SIGNAL_ABORT if( esedbtools_signal_attach( esedbexport_signal_handler, &error ) != 1 ) { fprintf( stderr, "Unable to attach signal handler.\n" ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } #endif if( export_handle_open( esedbexport_export_handle, source, &error ) != 1 ) { fprintf( stderr, "Unable to open: %" PRIs_SYSTEM ".\n", source ); goto on_error; } result = export_handle_export_file( esedbexport_export_handle, option_table_name, option_table_name_length, log_handle, &error ); if( result == -1 ) { fprintf( stderr, "Unable to export file.\n" ); goto on_error; } #ifdef TODO_SIGNAL_ABORT if( esedbtools_signal_detach( &error ) != 1 ) { fprintf( stderr, "Unable to detach signal handler.\n" ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } #endif if( export_handle_close( esedbexport_export_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close export handle.\n" ); goto on_error; } if( export_handle_free( &esedbexport_export_handle, &error ) != 1 ) { fprintf( stderr, "Unable to free export handle.\n" ); goto on_error; } if( log_handle_close( log_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close log handle.\n" ); goto on_error; } if( log_handle_free( &log_handle, &error ) != 1 ) { fprintf( stderr, "Unable to free log handle.\n" ); goto on_error; } if( esedbexport_abort != 0 ) { fprintf( stdout, "Export aborted.\n" ); return( EXIT_FAILURE ); } if( result == 0 ) { if( option_table_name != NULL ) { fprintf( stdout, "Export failed no such table: %" PRIs_SYSTEM ".\n", option_table_name ); } else { fprintf( stdout, "Export failed.\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( esedbexport_export_handle != NULL ) { export_handle_free( &esedbexport_export_handle, NULL ); } if( log_handle != NULL ) { log_handle_free( &log_handle, NULL ); } return( EXIT_FAILURE ); } libesedb-20240420/esedbtools/esedbtools_libcerror.h0000644000175000017500000000271314610727252023113 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCERROR_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBCERROR_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _ESEDBTOOLS_LIBCERROR_H ) */ libesedb-20240420/esedbtools/windows_search.h0000644000175000017500000000565114610727252021730 0ustar00lordyestalordyesta/* * Windows Search database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _WINDOWS_SEARCH_H ) #define _WINDOWS_SEARCH_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif int windows_search_decode( uint8_t *data, size_t data_size, uint8_t *encoded_data, size_t encoded_data_size, libcerror_error_t **error ); int windows_search_export_compressed_string_value( uint8_t *value_data, size_t value_data_size, int ascii_codepage, FILE *record_file_stream, libcerror_error_t **error ); int windows_search_export_record_value_32bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int windows_search_export_record_value_64bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, uint8_t format, FILE *record_file_stream, libcerror_error_t **error ); int windows_search_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int windows_search_export_record_value_compressed_string( libesedb_record_t *record, int record_value_entry, int ascii_codepage, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int windows_search_export_record_value_utf16_string( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int windows_search_export_record_systemindex_0a( libesedb_record_t *record, int ascii_codepage, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int windows_search_export_record_systemindex_gthr( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _WINDOWS_SEARCH_H ) */ libesedb-20240420/esedbtools/export_handle.h0000644000175000017500000001363214610727252021543 0ustar00lordyestalordyesta/* * Export handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _EXPORT_HANDLE_H ) #define _EXPORT_HANDLE_H #include #include #include #include "esedbtools_libcdata.h" #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif enum EXPORT_MODES { EXPORT_MODE_ALL = (int) 'a', EXPORT_MODE_TABLES = (int) 't' }; typedef struct export_handle export_handle_t; struct export_handle { /* The export mode */ uint8_t export_mode; /* The libesedb input file */ libesedb_file_t *input_file; /* The target path */ system_character_t *target_path; /* The target path size */ size_t target_path_size; /* The items export path */ system_character_t *items_export_path; /* The items export path size */ size_t items_export_path_size; /* The notification output stream */ FILE *notify_stream; /* The ascii codepage */ int ascii_codepage; /* 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 system_character_t *string, libcerror_error_t **error ); int export_handle_set_ascii_codepage( export_handle_t *export_handle, const system_character_t *string, libcerror_error_t **error ); int export_handle_set_target_path( export_handle_t *export_handle, const system_character_t *target_path, libcerror_error_t **error ); int export_handle_set_export_path( export_handle_t *export_handle, const system_character_t *base_path, size_t base_path_length, const system_character_t *suffix, size_t suffix_length, 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_open( export_handle_t *export_handle, const system_character_t *filename, libcerror_error_t **error ); int export_handle_close( export_handle_t *export_handle, libcerror_error_t **error ); /* Database functions */ int export_handle_free_table_name( char **table_name, libcerror_error_t **error ); /* Item generic export functions */ int export_handle_create_item_filename( export_handle_t *export_handle, int item_index, const system_character_t *item_name, size_t item_name_length, system_character_t **item_filename, size_t *item_filename_size, libcerror_error_t **error ); int export_handle_create_text_item_file( export_handle_t *export_handle, const system_character_t *item_filename, size_t item_filename_length, const system_character_t *export_path, size_t export_path_length, FILE **item_file_stream, libcerror_error_t **error ); int export_handle_export_table( export_handle_t *export_handle, int database_type, libesedb_table_t *table, int table_index, const system_character_t *table_name, size_t table_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_indexes( export_handle_t *export_handle, libesedb_table_t *table, const system_character_t *table_name, size_t table_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_index( export_handle_t *export_handle, libesedb_index_t *index, int index_iterator, const system_character_t *index_name, size_t index_name_length, const system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_record( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_basic_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_long_record_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_file( export_handle_t *export_handle, const system_character_t *export_table_name, size_t export_table_name_length, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EXPORT_HANDLE_H ) */ libesedb-20240420/esedbtools/esedbtools_libfvalue.h0000644000175000017500000000334214610727252023100 0ustar00lordyestalordyesta/* * The libfvalue header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBFVALUE_H ) #define _ESEDBTOOLS_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 #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 /* defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _ESEDBTOOLS_LIBFVALUE_H ) */ libesedb-20240420/esedbtools/esedbtools_libesedb.h0000644000175000017500000000172514610727252022703 0ustar00lordyestalordyesta/* * The libesedb header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBESEDB_H ) #define _ESEDBTOOLS_LIBESEDB_H #include #include #endif /* !defined( _ESEDBTOOLS_LIBESEDB_H ) */ libesedb-20240420/esedbtools/srumdb.h0000644000175000017500000000246714610727252020207 0ustar00lordyestalordyesta/* * System Resource Usage Monitor (SRUM) database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _SRUMDB_H ) #define _SRUMDB_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif int srumdb_export_record_guid( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _SRUMDB_H ) */ libesedb-20240420/esedbtools/esedbtools_libcpath.h0000644000175000017500000000260114610727252022712 0ustar00lordyestalordyesta/* * The libcpath header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_LIBCPATH_H ) #define _ESEDBTOOLS_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBCPATH_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCPATH ) */ #endif /* !defined( _ESEDBTOOLS_LIBCPATH_H ) */ libesedb-20240420/esedbtools/Makefile.in0000644000175000017500000011110114610746265020576 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = esedbexport$(EXEEXT) esedbinfo$(EXEEXT) subdir = esedbtools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_esedbexport_OBJECTS = database_types.$(OBJEXT) \ esedbexport.$(OBJEXT) esedbtools_getopt.$(OBJEXT) \ esedbtools_output.$(OBJEXT) esedbtools_signal.$(OBJEXT) \ esedbtools_system_string.$(OBJEXT) exchange.$(OBJEXT) \ export.$(OBJEXT) export_handle.$(OBJEXT) log_handle.$(OBJEXT) \ srumdb.$(OBJEXT) webcache.$(OBJEXT) windows_search.$(OBJEXT) \ windows_search_compression.$(OBJEXT) \ windows_security.$(OBJEXT) esedbexport_OBJECTS = $(am_esedbexport_OBJECTS) esedbexport_DEPENDENCIES = ../libesedb/libesedb.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_esedbinfo_OBJECTS = esedbinfo.$(OBJEXT) esedbtools_getopt.$(OBJEXT) \ esedbtools_output.$(OBJEXT) esedbtools_signal.$(OBJEXT) \ info_handle.$(OBJEXT) esedbinfo_OBJECTS = $(am_esedbinfo_OBJECTS) esedbinfo_DEPENDENCIES = ../libesedb/libesedb.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/database_types.Po \ ./$(DEPDIR)/esedbexport.Po ./$(DEPDIR)/esedbinfo.Po \ ./$(DEPDIR)/esedbtools_getopt.Po \ ./$(DEPDIR)/esedbtools_output.Po \ ./$(DEPDIR)/esedbtools_signal.Po \ ./$(DEPDIR)/esedbtools_system_string.Po \ ./$(DEPDIR)/exchange.Po ./$(DEPDIR)/export.Po \ ./$(DEPDIR)/export_handle.Po ./$(DEPDIR)/info_handle.Po \ ./$(DEPDIR)/log_handle.Po ./$(DEPDIR)/srumdb.Po \ ./$(DEPDIR)/webcache.Po ./$(DEPDIR)/windows_search.Po \ ./$(DEPDIR)/windows_search_compression.Po \ ./$(DEPDIR)/windows_security.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(esedbexport_SOURCES) $(esedbinfo_SOURCES) DIST_SOURCES = $(esedbexport_SOURCES) $(esedbinfo_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @LIBESEDB_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ esedbexport_SOURCES = \ database_types.c database_types.h \ esedbexport.c \ esedbtools_getopt.c esedbtools_getopt.h \ esedbtools_i18n.h \ esedbtools_libbfio.h \ esedbtools_libcdata.h \ esedbtools_libcerror.h \ esedbtools_libclocale.h \ esedbtools_libcfile.h \ esedbtools_libcnotify.h \ esedbtools_libcpath.h \ esedbtools_libesedb.h \ esedbtools_libfdatetime.h \ esedbtools_libfguid.h \ esedbtools_libfmapi.h \ esedbtools_libfvalue.h \ esedbtools_libfwnt.h \ esedbtools_libuna.h \ esedbtools_output.c esedbtools_output.h \ esedbtools_signal.c esedbtools_signal.h \ esedbtools_system_string.c esedbtools_system_string.h \ esedbtools_unused.h \ exchange.c exchange.h \ export.c export.h \ export_handle.c export_handle.h \ log_handle.c log_handle.h \ srumdb.c srumdb.h \ webcache.c webcache.h \ windows_search.c windows_search.h \ windows_search_compression.c windows_search_compression.h \ windows_security.c windows_security.h esedbexport_LDADD = \ @LIBFMAPI_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ \ @LIBINTL@ esedbinfo_SOURCES = \ esedbinfo.c \ esedbtools_getopt.c esedbtools_getopt.h \ esedbtools_i18n.h \ esedbtools_libbfio.h \ esedbtools_libcerror.h \ esedbtools_libclocale.h \ esedbtools_libcnotify.h \ esedbtools_libesedb.h \ esedbtools_libfdatetime.h \ esedbtools_libfguid.h \ esedbtools_libfmapi.h \ esedbtools_libfvalue.h \ esedbtools_libfwnt.h \ esedbtools_libuna.h \ esedbtools_output.c esedbtools_output.h \ esedbtools_signal.c esedbtools_signal.h \ esedbtools_unused.h \ info_handle.c info_handle.h esedbinfo_LDADD = \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ \ @LIBINTL@ DISTCLEANFILES = \ Makefile \ 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 esedbtools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu esedbtools/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ 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 esedbexport$(EXEEXT): $(esedbexport_OBJECTS) $(esedbexport_DEPENDENCIES) $(EXTRA_esedbexport_DEPENDENCIES) @rm -f esedbexport$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedbexport_OBJECTS) $(esedbexport_LDADD) $(LIBS) esedbinfo$(EXEEXT): $(esedbinfo_OBJECTS) $(esedbinfo_DEPENDENCIES) $(EXTRA_esedbinfo_DEPENDENCIES) @rm -f esedbinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedbinfo_OBJECTS) $(esedbinfo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database_types.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbexport.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbinfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_getopt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_system_string.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exchange.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srumdb.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webcache.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows_search.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows_search_compression.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows_security.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/database_types.Po -rm -f ./$(DEPDIR)/esedbexport.Po -rm -f ./$(DEPDIR)/esedbinfo.Po -rm -f ./$(DEPDIR)/esedbtools_getopt.Po -rm -f ./$(DEPDIR)/esedbtools_output.Po -rm -f ./$(DEPDIR)/esedbtools_signal.Po -rm -f ./$(DEPDIR)/esedbtools_system_string.Po -rm -f ./$(DEPDIR)/exchange.Po -rm -f ./$(DEPDIR)/export.Po -rm -f ./$(DEPDIR)/export_handle.Po -rm -f ./$(DEPDIR)/info_handle.Po -rm -f ./$(DEPDIR)/log_handle.Po -rm -f ./$(DEPDIR)/srumdb.Po -rm -f ./$(DEPDIR)/webcache.Po -rm -f ./$(DEPDIR)/windows_search.Po -rm -f ./$(DEPDIR)/windows_search_compression.Po -rm -f ./$(DEPDIR)/windows_security.Po -rm -f Makefile 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 -f ./$(DEPDIR)/database_types.Po -rm -f ./$(DEPDIR)/esedbexport.Po -rm -f ./$(DEPDIR)/esedbinfo.Po -rm -f ./$(DEPDIR)/esedbtools_getopt.Po -rm -f ./$(DEPDIR)/esedbtools_output.Po -rm -f ./$(DEPDIR)/esedbtools_signal.Po -rm -f ./$(DEPDIR)/esedbtools_system_string.Po -rm -f ./$(DEPDIR)/exchange.Po -rm -f ./$(DEPDIR)/export.Po -rm -f ./$(DEPDIR)/export_handle.Po -rm -f ./$(DEPDIR)/info_handle.Po -rm -f ./$(DEPDIR)/log_handle.Po -rm -f ./$(DEPDIR)/srumdb.Po -rm -f ./$(DEPDIR)/webcache.Po -rm -f ./$(DEPDIR)/windows_search.Po -rm -f ./$(DEPDIR)/windows_search_compression.Po -rm -f ./$(DEPDIR)/windows_security.Po -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile splint-local: @echo "Running splint on esedbexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(esedbexport_SOURCES) @echo "Running splint on esedbinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(esedbinfo_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: libesedb-20240420/esedbtools/log_handle.h0000644000175000017500000000321214610727252020774 0ustar00lordyestalordyesta/* * Log handle * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LOG_HANDLE_H ) #define _LOG_HANDLE_H #include #include #include #include "esedbtools_libcerror.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 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 /* !defined( _LOG_HANDLE_H ) */ libesedb-20240420/esedbtools/exchange.h0000644000175000017500000000704114610727252020466 0ustar00lordyestalordyesta/* * Exchange database export functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _EXPORT_EXCHANGE_H ) #define _EXPORT_EXCHANGE_H #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "log_handle.h" #if defined( __cplusplus ) extern "C" { #endif int exchange_export_record_binary_data( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_32bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_64bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_guid( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_mapi_entryid( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_mapi_multi_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_sid( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_value_string( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ); int exchange_export_record_folders( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int exchange_export_record_global( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int exchange_export_record_mailbox( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int exchange_export_record_msg( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); int exchange_export_record_per_user_read( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _EXPORT_EXCHANGE_H ) */ libesedb-20240420/esedbtools/esedbtools_system_string.h0000644000175000017500000000245314610727625024047 0ustar00lordyestalordyesta/* * System character string functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDBTOOLS_SYSTEM_STRING_H ) #define _ESEDBTOOLS_SYSTEM_STRING_H #include #include #include "esedbtools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int esedbtools_system_string_copy_from_64_bit_in_decimal( system_character_t *string, size_t string_size, size_t *string_index, uint64_t value_64bit, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDBTOOLS_SYSTEM_STRING_H ) */ libesedb-20240420/esedbtools/exchange.c0000644000175000017500000024626214610727252020473 0ustar00lordyestalordyesta/* * Exchange database export functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libcnotify.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libfguid.h" #include "esedbtools_libfmapi.h" #include "esedbtools_libfwnt.h" #include "esedbtools_libuna.h" #include "exchange.h" #include "export.h" #include "export_handle.h" enum EXPORT_EXCHANGE_KNOWN_COLUMN_TYPES { EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_BINARY_DATA, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_MULTI_VALUE, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID, EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING, }; /* Exports a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_binary_data( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "exchange_export_record_binary_data"; size_t value_data_size = 0; uint32_t column_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI ) system_character_t column_name[ 256 ]; int result = 0; #endif if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, record_value_entry, (uint16_t *) column_name, 256, error ); #else result = libesedb_record_get_utf8_column_name( record, record_value_entry, (uint8_t *) column_name, 256, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, record_value_entry ); goto on_error; } libcnotify_printf( "%s: column name: %" PRIs_SYSTEM "\n", function, column_name ); libcnotify_print_data( value_data, value_data_size, 0 ); } #endif export_binary_data( value_data, value_data_size, record_file_stream ); memory_free( value_data ); } return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a 32-bit value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_32bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_32bit"; size_t value_data_size = 0; uint32_t column_type = 0; uint32_t value_32bit = 0; uint8_t value_data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( ( byte_order != _BYTE_STREAM_ENDIAN_BIG ) && ( byte_order != _BYTE_STREAM_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 "", function, byte_order ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); goto on_error; } if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( value_data, value_32bit ); } else { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); } fprintf( record_file_stream, "%" PRIu32 "", value_32bit ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a 64-bit value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_64bit( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_64bit"; size_t value_data_size = 0; uint64_t value_64bit = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( ( byte_order != _BYTE_STREAM_ENDIAN_BIG ) && ( byte_order != _BYTE_STREAM_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02" PRIx8 "", function, byte_order ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); goto on_error; } if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( value_data, value_64bit ); } else { byte_stream_copy_to_uint64_little_endian( value_data, value_64bit ); } /* TODO for now print as hexadecimal */ fprintf( record_file_stream, "0x%" PRIx64 "", value_64bit ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a filetime value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t filetime_string[ 32 ]; libfdatetime_filetime_t *filetime = NULL; uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_filetime"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); 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_byte_stream( filetime, value_data, value_data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to filetime.", function ); goto on_error; } #if defined( 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 ); 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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", filetime_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a GUID value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_guid( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_guid"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { 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 ); goto on_error; } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, byte_order, 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", guid_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a MAPI ENTRYID value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_mapi_entryid( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_mapi_entryid"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI ) system_character_t column_name[ 256 ]; int result = 0; #endif if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, record_value_entry, (uint16_t *) column_name, 256, error ); #else result = libesedb_record_get_utf8_column_name( record, record_value_entry, (uint8_t *) column_name, 256, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, record_value_entry ); goto on_error; } libcnotify_printf( "%s: column name: %" PRIs_SYSTEM "\n", function, column_name ); if( libfmapi_debug_print_entry_identifier( value_data, value_data_size, LIBUNA_CODEPAGE_WINDOWS_1252, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print entry identifier value: %d\n", function, record_value_entry ); goto on_error; } } #endif #if defined( HAVE_DEBUG_OUTPUT ) fprintf( record_file_stream, "ENTRYID: " ); #endif export_binary_data( value_data, value_data_size, record_file_stream ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a MAPI multi value value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_mapi_multi_value( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ) { libesedb_multi_value_t *multi_value = NULL; uint8_t *multi_value_data = NULL; uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_mapi_multi_value"; size_t multi_value_data_size = 0; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int multi_value_entry = 0; int number_of_multi_values = 0; #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI ) system_character_t column_name[ 256 ]; int result = 0; #endif if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } /* TODO handle 0x10 flag */ if( ( ( value_data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) && ( ( value_data_flags & 0x10 ) == 0 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, record_value_entry, (uint16_t *) column_name, 256, error ); #else result = libesedb_record_get_utf8_column_name( record, record_value_entry, (uint8_t *) column_name, 256, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, record_value_entry ); goto on_error; } libcnotify_printf( "%s: column name: %" PRIs_SYSTEM "\n", function, column_name ); } #endif if( libesedb_record_get_multi_value( record, record_value_entry, &multi_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value of record entry: %d.", function, record_value_entry ); goto on_error; } if( libesedb_multi_value_get_number_of_values( multi_value, &number_of_multi_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of multi values.", function ); goto on_error; } for( multi_value_entry = 0; multi_value_entry < number_of_multi_values; multi_value_entry++ ) { if( libesedb_multi_value_get_value_data_size( multi_value, multi_value_entry, &multi_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d data size of record entry: %d.", function, multi_value_entry, record_value_entry ); goto on_error; } if( multi_value_data_size > 0 ) { multi_value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * multi_value_data_size ); if( multi_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value data.", function ); goto on_error; } if( libesedb_multi_value_get_value_data( multi_value, multi_value_entry, multi_value_data, multi_value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve multi value: %d data of record entry: %d.", function, multi_value_entry, record_value_entry ); goto on_error; } /* TODO print entry index */ libcnotify_print_data( multi_value_data, multi_value_data_size, 0 ); memory_free( multi_value_data ); multi_value_data = NULL; } } if( libesedb_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: %d.", function, multi_value_entry ); goto on_error; } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( multi_value_data != NULL ) { memory_free( multi_value_data ); } if( multi_value != NULL ) { libesedb_multi_value_free( &multi_value, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a SID value in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_sid( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t sid_string[ 128 ]; libfwnt_security_identifier_t *sid = NULL; uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_sid"; size_t sid_string_size = 0; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { 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 ); goto on_error; } if( libfwnt_security_identifier_copy_from_byte_stream( sid, value_data, value_data_size, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to SID.", function ); goto on_error; } 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 ); goto on_error; } /* 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 ); goto on_error; } #if defined( 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 ); goto on_error; } 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 ); goto on_error; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", sid_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( sid != NULL ) { libfwnt_security_identifier_free( &sid, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports a string in a binary data table record value * Returns 1 if successful or -1 on error */ int exchange_export_record_value_string( libesedb_record_t *record, int record_value_entry, FILE *record_file_stream, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "exchange_export_record_value_string"; size_t value_data_size = 0; uint32_t column_type = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } /* TODO UTF-16 string also possible ? */ export_narrow_text( (char *) value_data, value_data_size, record_file_stream ); memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports the values in a Folders table record * Returns 1 if successful or -1 on error */ int exchange_export_record_folders( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "exchange_export_record_folders"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_entry = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_entry = 0; value_entry < number_of_values; value_entry++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_entry, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_entry, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_entry ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_entry, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_entry, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_entry ); return( -1 ); } if( libesedb_record_get_column_type( record, value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_entry ); return( -1 ); } known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } } } else if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'L' ) { /* TODO known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT; */ } else if( column_name[ 0 ] == (system_character_t) 'S' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } else if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } else if( column_name_size == 5 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "Ne58" ), 4 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "Ne59" ), 4 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID; } } else if( column_name_size == 6 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "N3616" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d0" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d1" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d2" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d3" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d4" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d5" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36d7" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N36dc" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N3880" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } } /* TODO add support for multi value entry identifiers MN36d8 and MN36e4 */ } } if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT ) { result = exchange_export_record_value_32bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = exchange_export_record_value_64bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME ) { result = exchange_export_record_value_filetime( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID ) { result = exchange_export_record_value_guid( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID ) { result = exchange_export_record_value_mapi_entryid( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID ) { result = exchange_export_record_value_sid( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING ) { result = exchange_export_record_value_string( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_entry, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_entry ); return( -1 ); } if( value_entry == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a Global table record * Returns 1 if successful or -1 on error */ int exchange_export_record_global( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "exchange_export_record_global"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_entry = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_entry = 0; value_entry < number_of_values; value_entry++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_entry, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_entry, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_entry ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_entry, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_entry, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_entry ); return( -1 ); } if( libesedb_record_get_column_type( record, value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_entry ); return( -1 ); } known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } } } else if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'L' ) { /* TODO known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT; */ } else if( column_name[ 0 ] == (system_character_t) 'S' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } else if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } else if( column_name_size == 6 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "N6762" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N6768" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N676a" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N677f" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_BINARY_DATA; } } else if( column_name_size == 7 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "MN667f" ), 6 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_MULTI_VALUE; } } } } if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_BINARY_DATA ) { result = exchange_export_record_binary_data( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT ) { result = exchange_export_record_value_32bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = exchange_export_record_value_64bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME ) { result = exchange_export_record_value_filetime( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID ) { result = exchange_export_record_value_guid( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_MULTI_VALUE ) { result = exchange_export_record_value_mapi_multi_value( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING ) { result = exchange_export_record_value_string( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_entry, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_entry ); return( -1 ); } if( value_entry == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a Mailbox table record * Returns 1 if successful or -1 on error */ int exchange_export_record_mailbox( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "exchange_export_record_mailbox"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_entry = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_entry = 0; value_entry < number_of_values; value_entry++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_entry, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_entry, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_entry ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_entry, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_entry, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_entry ); return( -1 ); } if( libesedb_record_get_column_type( record, value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_entry ); return( -1 ); } known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } } } else if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'L' ) { /* TODO known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT; */ } else if( column_name[ 0 ] == (system_character_t) 'S' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } else if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } else if( column_name_size == 6 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "N66a0" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N676a" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N676c" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } } } } if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT ) { result = exchange_export_record_value_32bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = exchange_export_record_value_64bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME ) { result = exchange_export_record_value_filetime( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID ) { result = exchange_export_record_value_guid( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID ) { result = exchange_export_record_value_sid( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING ) { result = exchange_export_record_value_string( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_entry, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_entry ); return( -1 ); } if( value_entry == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a Msg table record * Returns 1 if successful or -1 on error */ int exchange_export_record_msg( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "exchange_export_record_msg"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_entry = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_entry = 0; value_entry < number_of_values; value_entry++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_entry, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_entry, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_entry ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_entry, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_entry, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_entry ); return( -1 ); } if( libesedb_record_get_column_type( record, value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_entry ); return( -1 ); } known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } } } else if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'L' ) { /* TODO known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT; */ } else if( column_name[ 0 ] == (system_character_t) 'S' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } else if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } else if( column_name_size == 6 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "N300b" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N6720" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING; } } } } if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT ) { result = exchange_export_record_value_32bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = exchange_export_record_value_64bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME ) { result = exchange_export_record_value_filetime( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID ) { result = exchange_export_record_value_guid( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID ) { result = exchange_export_record_value_sid( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING ) { result = exchange_export_record_value_string( record, value_entry, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_entry, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_entry ); return( -1 ); } if( value_entry == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a PerUserRead table record * Returns 1 if successful or -1 on error */ int exchange_export_record_per_user_read( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "exchange_export_record_per_user_read"; size_t column_name_size = 0; uint32_t column_type = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_entry = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_entry = 0; value_entry < number_of_values; value_entry++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_entry, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_entry, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_entry ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_entry, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_entry, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_entry ); return( -1 ); } if( libesedb_record_get_column_type( record, value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_entry ); return( -1 ); } known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED; if( column_type == LIBESEDB_COLUMN_TYPE_CURRENCY ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } } } else if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( ( column_name_size > 1 ) && ( column_name_size < 8 ) ) { if( column_name[ 0 ] == (system_character_t) 'T' ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME; } else if( column_name[ 0 ] == (system_character_t) 'Q' ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT; } else if( column_name_size == 6 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "N676c" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } else if( system_string_compare( column_name, _SYSTEM_STRING( "N67d0" ), 5 ) == 0 ) { known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID; } } } } if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT ) { result = exchange_export_record_value_64bit( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME ) { result = exchange_export_record_value_filetime( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID ) { result = exchange_export_record_value_guid( record, value_entry, byte_order, record_file_stream, error ); } else if( known_column_type == EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_entry, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_entry ); return( -1 ); } if( value_entry == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } libesedb-20240420/esedbtools/windows_search_compression.h0000644000175000017500000000307514610727252024347 0ustar00lordyestalordyesta/* * Windows Search database compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _WINDOWS_SEARCH_COMPRESSION_H ) #define _WINDOWS_SEARCH_COMPRESSION_H #include #include #include #include "esedbtools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int windows_search_utf16_run_length_compression_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); int windows_search_utf16_run_length_compression_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _WINDOWS_SEARCH_COMPRESSION_H ) */ libesedb-20240420/esedbtools/windows_security.c0000644000175000017500000005604714610727252022332 0ustar00lordyestalordyesta/* * Windows Security database export functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "esedbtools_libcerror.h" #include "esedbtools_libesedb.h" #include "esedbtools_libfdatetime.h" #include "esedbtools_libuna.h" #include "export.h" #include "export_handle.h" #include "windows_security.h" enum WINDOWS_SECURITY_KNOWN_COLUMN_TYPES { WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_UNDEFINED, WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME, WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN, }; /* Exports a filetime value in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_security_export_record_value_filetime( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t filetime_string[ 32 ]; libfdatetime_filetime_t *filetime = NULL; uint8_t *value_data = NULL; static char *function = "windows_security_export_record_value_filetime"; size_t value_data_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size: %" PRIzd "", function, value_data_size ); 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_byte_stream( filetime, value_data, value_data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to filetime.", function ); goto on_error; } #if defined( 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 ); 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; } fprintf( record_file_stream, "%" PRIs_SYSTEM "", filetime_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports an UTF-16 string in a binary data table record value * Returns 1 if successful or -1 on error */ int windows_security_export_record_value_utf16_string( libesedb_record_t *record, int record_value_entry, uint8_t byte_order, FILE *record_file_stream, libcerror_error_t **error ) { system_character_t *value_string = NULL; uint8_t *value_data = NULL; static char *function = "windows_security_export_record_value_utf16_string"; size_t value_data_size = 0; size_t value_string_size = 0; uint32_t column_type = 0; uint8_t value_data_flags = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_column_type( record, record_value_entry, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, record_value_entry ); goto on_error; } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 "", function, column_type ); goto on_error; } if( libesedb_record_get_value_data_size( record, record_value_entry, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, record_value_entry ); goto on_error; } if( value_data_size > 0 ) { value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value data.", function ); goto on_error; } if( libesedb_record_get_value_data( record, record_value_entry, 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: %d data.", function, record_value_entry ); goto on_error; } } if( libesedb_record_get_value_data_flags( record, record_value_entry, &value_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, record_value_entry ); goto on_error; } if( ( value_data_flags & ~( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) ) == 0 ) { if( value_data != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, byte_order, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, byte_order, &value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of value string: %d.", function, record_value_entry ); goto on_error; } value_string = 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (uint16_t *) value_string, value_string_size, value_data, value_data_size, byte_order, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (uint8_t *) value_string, value_string_size, value_data, value_data_size, byte_order, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value string: %d.", function, record_value_entry ); memory_free( value_string ); goto on_error; } export_text( value_string, value_string_size, record_file_stream ); memory_free( value_string ); } } else { export_binary_data( value_data, value_data_size, record_file_stream ); } memory_free( value_data ); return( 1 ); on_error: if( value_data != NULL ) { memory_free( value_data ); } return( -1 ); } /* Exports the values in a SmTblVersion table record * Returns 1 if successful or -1 on error */ int windows_security_export_record_smtblversion( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "windows_security_export_record_smtblversion"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_UNDEFINED; /* Only check for known columns of the binary data type * some columns get their type reassigned over time */ if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( column_name_size == 16 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "ConfigTimeStamp" ), 15 ) == 0 ) { known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 17 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "AnalyzeTimeStamp" ), 16 ) == 0 ) { known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME; } } else if( column_name_size == 19 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "ProfileDescription" ), 18 ) == 0 ) { known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN; } } } if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME ) { result = windows_security_export_record_value_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN ) { result = windows_security_export_record_value_utf16_string( record, value_iterator, LIBUNA_ENDIAN_LITTLE, record_file_stream, error ); } else if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } /* Exports the values in a SmTblSection table record * Returns 1 if successful or -1 on error */ int windows_security_export_record_smtblsection( libesedb_record_t *record, FILE *record_file_stream, log_handle_t *log_handle, libcerror_error_t **error ) { system_character_t column_name[ 256 ]; static char *function = "windows_security_export_record_smtblsection"; size_t column_name_size = 0; uint32_t column_type = 0; int known_column_type = 0; int number_of_values = 0; int result = 0; int value_iterator = 0; uint8_t byte_order = _BYTE_STREAM_ENDIAN_LITTLE; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( record_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record file stream.", function ); return( -1 ); } if( libesedb_record_get_number_of_values( record, &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 ); } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name_size( record, value_iterator, &column_name_size, error ); #else result = libesedb_record_get_utf8_column_name_size( record, value_iterator, &column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name size of value: %d.", function, value_iterator ); return( -1 ); } /* It is assumed that the column name cannot be larger than 255 characters * otherwise using dynamic allocation is more appropriate */ if( column_name_size > 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: column name size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_record_get_utf16_column_name( record, value_iterator, (uint16_t *) column_name, column_name_size, error ); #else result = libesedb_record_get_utf8_column_name( record, value_iterator, (uint8_t *) column_name, column_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column name of value: %d.", function, value_iterator ); return( -1 ); } if( libesedb_record_get_column_type( record, value_iterator, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column type of value: %d.", function, value_iterator ); return( -1 ); } known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_UNDEFINED; /* Only check for known columns of the binary data type * some columns get their type reassigned over time */ if( ( column_type == LIBESEDB_COLUMN_TYPE_BINARY_DATA ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { if( column_name_size == 5 ) { if( system_string_compare( column_name, _SYSTEM_STRING( "Name" ), 4 ) == 0 ) { known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN; } } } if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME ) { result = windows_security_export_record_value_filetime( record, value_iterator, byte_order, record_file_stream, error ); } else if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN ) { result = windows_security_export_record_value_utf16_string( record, value_iterator, LIBUNA_ENDIAN_LITTLE, record_file_stream, error ); } else if( known_column_type == WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_UNDEFINED ) { result = export_handle_export_record_value( record, value_iterator, record_file_stream, log_handle, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export record value: %d.", function, value_iterator ); return( -1 ); } if( value_iterator == ( number_of_values - 1 ) ) { fprintf( record_file_stream, "\n" ); } else { fprintf( record_file_stream, "\t" ); } } return( 1 ); } libesedb-20240420/esedbtools/database_types.h0000644000175000017500000000351214610727252021673 0ustar00lordyestalordyesta/* * Database types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _DATABASE_TYPES_H ) #define _DATABASE_TYPES_H #include #include #include #include #include #include "esedbtools_libcdata.h" #include "esedbtools_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* TODO add file history database support */ enum DATABASE_TYPES { DATABASE_TYPE_UNKNOWN = 0, DATABASE_TYPE_EXCHANGE, DATABASE_TYPE_SRUM, DATABASE_TYPE_WEBCACHE, DATABASE_TYPE_WINDOWS_SEARCH, DATABASE_TYPE_WINDOWS_SECURITY, NUMBER_OF_DATABASE_TYPES }; extern const system_character_t *database_type_descriptions[ ]; typedef struct database_type_descriptor database_type_descriptor_t; struct database_type_descriptor { /* The database type */ int database_type; /* Known table names */ const system_character_t *known_table_names[ 32 ]; }; int database_type_determine( int *database_type, libcdata_array_t *table_names, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _DATABASE_TYPES_H ) */ libesedb-20240420/esedbtools/esedbtools_getopt.c0000644000175000017500000001066714610727252022434 0ustar00lordyestalordyesta/* * GetOpt functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedbtools_getopt.h" #include "esedbtools_libcnotify.h" #if !defined( HAVE_GETOPT ) /* The option index * Start with argument 1 (argument 0 is the program name) */ int optind = 1; /* The current option argument */ system_character_t *optarg = NULL; /* Value to indicate the current option */ system_integer_t optopt = 0; /* The next option in a group */ system_character_t *next_option = NULL; /* 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 */ system_integer_t esedbtools_getopt( int argument_count, system_character_t * const argument_values[], const system_character_t *options_string ) { system_character_t *argument_value = NULL; system_character_t *option_value = NULL; static char *function = "esedbtools_getopt"; size_t options_string_length = 0; if( next_option != NULL ) { argument_value = next_option; next_option = NULL; } else if( optind >= argument_count ) { return( (system_integer_t) -1 ); } else { argument_value = argument_values[ optind ]; /* Check if the argument value is not an empty string */ if( *argument_value == (system_character_t) '\0' ) { return( (system_integer_t) -1 ); } /* Check if the first character is a option marker '-' */ if( *argument_value != (system_character_t) '-' ) { return( (system_integer_t) -1 ); } argument_value++; /* Check if long options are provided '--' */ if( *argument_value == (system_character_t) '-' ) { optind++; return( (system_integer_t) -1 ); } } options_string_length = system_string_length( options_string ); optopt = *argument_value; option_value = 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 == (system_integer_t) ':' ) || ( option_value == NULL ) ) { if( *argument_value == (system_character_t) '\0' ) { optind++; } if( ( *options_string != (system_character_t) ':' ) && ( optopt != (system_integer_t) '?' ) ) { libcnotify_printf( "%s: no such option: %" PRIc_SYSTEM ".\n", function, optopt ); } return( (system_integer_t) '?' ); } option_value++; /* Check if no option argument is required */ if( *option_value != (system_character_t) ':' ) { optarg = NULL; if( *argument_value == (system_character_t) '\0' ) { optind++; } else { /* Multiple options are grouped */ next_option = argument_value; } } /* Check if the argument is right after the option flag with no space in between */ else if( *argument_value != (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( (system_integer_t) ':' ); } libcnotify_printf( "%s: option: %" PRIc_SYSTEM " requires an argument.\n", function, optopt ); return( (system_integer_t) '?' ); } optarg = argument_values[ optind ]; optind++; } return( optopt ); } #endif /* !defined( HAVE_GETOPT ) */ libesedb-20240420/configure0000755000175000017500000772350014610746263016316 0ustar00lordyestalordyesta#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71 for libesedb 20240420. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 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 as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (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 \$as_nop 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 \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || 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 -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 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$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_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # 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=`printf "%s\n" "$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 || printf "%s\n" 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_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_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_nop 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_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # 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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$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 || printf "%s\n" 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" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. 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 # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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 as_test_x='test -x' as_executable_p=as_fn_executable_p # 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='libesedb' PACKAGE_TARNAME='libesedb' PACKAGE_VERSION='20240420' PACKAGE_STRING='libesedb 20240420' PACKAGE_BUGREPORT='joachim.metz@gmail.com' PACKAGE_URL='' ac_unique_file="include/libesedb.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS SPEC_DATE DPKG_DATE libesedb_spec_tools_build_requires libesedb_spec_requires LIB_FUZZING_ENGINE HAVE_LIB_FUZZING_ENGINE_FALSE HAVE_LIB_FUZZING_ENGINE_TRUE LIBESEDB_DLL_IMPORT LIBESEDB_DLL_EXPORT HAVE_DLLMAIN ax_libmapidb_spec_build_requires ax_libmapidb_spec_requires ax_libmapidb_pc_libs_private LIBMAPIDB_LIBADD LIBMAPIDB_CPPFLAGS HAVE_LOCAL_LIBMAPIDB_FALSE HAVE_LOCAL_LIBMAPIDB_TRUE HAVE_LOCAL_LIBMAPIDB HAVE_LIBMAPIDB libmapidb_LIBS libmapidb_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 HAVE_PYTHON_TESTS_FALSE HAVE_PYTHON_TESTS_TRUE HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYTHON_PACKAGE_DIR PYTHON_LIBRARY_DIR pyexecdir pythondir PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_LDFLAGS PYTHON_CPPFLAGS PYTHON_CONFIG PYTHON_PLATFORM PYTHON 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_libcdata_spec_build_requires ax_libcdata_spec_requires ax_libcdata_pc_libs_private LIBCDATA_LIBADD LIBCDATA_CPPFLAGS HAVE_LOCAL_LIBCDATA_FALSE HAVE_LOCAL_LIBCDATA_TRUE HAVE_LOCAL_LIBCDATA HAVE_LIBCDATA libcdata_LIBS libcdata_CFLAGS ax_libcthreads_spec_build_requires ax_libcthreads_spec_requires ax_libcthreads_pc_libs_private HAVE_MULTI_THREAD_SUPPORT LIBCTHREADS_LIBADD LIBCTHREADS_CPPFLAGS HAVE_LOCAL_LIBCTHREADS_FALSE HAVE_LOCAL_LIBCTHREADS_TRUE HAVE_LOCAL_LIBCTHREADS ax_pthread_pc_libs_private PTHREAD_LIBADD PTHREAD_CPPFLAGS HAVE_PTHREAD HAVE_LIBCTHREADS libcthreads_LIBS libcthreads_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 PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_OFF64_T HAVE_SSIZE64_T HAVE_SIZE64_T HAVE_SSIZE32_T HAVE_SIZE32_T HAVE_WCHAR_H HAVE_STDINT_H HAVE_INTTYPES_H HAVE_SYS_TYPES_H HAVE_WIDE_CHARACTER_TYPE STATIC_LDFLAGS POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS PKGCONFIG LIBTOOL_DEPS CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS 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 runstatedir 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 am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_nls enable_rpath with_libiconv_prefix with_libintl_prefix enable_largefile enable_shared_libs enable_static_executables enable_winapi enable_wide_character_type enable_verbose_output enable_debug_output with_libcerror enable_multi_threading_support with_libcthreads with_pthread with_libcdata 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_pyprefix enable_python with_pythondir with_libfmapi with_libmapidb ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR libcerror_CFLAGS libcerror_LIBS libcthreads_CFLAGS libcthreads_LIBS libcdata_CFLAGS libcdata_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 libmapidb_CFLAGS libmapidb_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' runstatedir='${localstatedir}/run' 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 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=`printf "%s\n" "$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=`printf "%s\n" "$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 ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -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=`printf "%s\n" "$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=`printf "%s\n" "$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. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$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" ;; *) printf "%s\n" "$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 runstatedir 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 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 || printf "%s\n" 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 libesedb 20240420 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/libesedb] --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 libesedb 20240420:";; 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] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --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 --disable-largefile omit support for large files --disable-shared-libs disable shared library support --enable-static-executables build static executables (binaries) [default=no] --enable-winapi enable WINAPI support for cross-compilation [default=auto-detect] --enable-wide-character-type enable wide character type support [default=no] --enable-verbose-output enable verbose output [default=no] --enable-debug-output enable debug output [default=no] --enable-multi-threading-support enable multi-threading support [default=yes] --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[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --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-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-libcthreads[=DIR] search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-pthread[=DIR] search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread [default=auto-detect] --with-libcdata[=DIR] search for libcdata 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-pyprefix[=no] use `python-config --prefix' to determine the prefix of pythondir instead of --prefix [default=no] --with-pythondir[=no] use to specify the Python directory (pythondir) [default=no] --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-libmapidb[=DIR] search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] 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 LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP 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 libcerror_CFLAGS C compiler flags for libcerror, overriding pkg-config libcerror_LIBS linker flags for libcerror, overriding pkg-config libcthreads_CFLAGS C compiler flags for libcthreads, overriding pkg-config libcthreads_LIBS linker flags for libcthreads, overriding pkg-config libcdata_CFLAGS C compiler flags for libcdata, overriding pkg-config libcdata_LIBS linker flags for libcdata, 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 libmapidb_CFLAGS C compiler flags for libmapidb, overriding pkg-config libmapidb_LIBS linker flags for libmapidb, 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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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 configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. 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 printf "%s\n" "$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 libesedb configure 20240420 generated by GNU Autoconf 2.71 Copyright (C) 2021 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 conftest.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$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_nop printf "%s\n" "$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_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.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$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 || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ #include #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 (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # 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\"" printf "%s\n" "$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 printf "%s\n" "$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_nop printf "%s\n" "$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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$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_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else $as_nop printf "%s\n" "$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_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$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_cxx_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to run 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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$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_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { 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 (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$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 (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [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 (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else $as_nop 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.beam conftest.$ac_ext done else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [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 (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else $as_nop 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.beam conftest.$ac_ext done else $as_nop ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { 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 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #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 $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac 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 libesedb $as_me 20240420, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "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=`printf "%s\n" "$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=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$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 printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$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 printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*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 do not provoke an error unfortunately, instead are silently treated as an "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 is necessary to write \x00 == 0 to get something that is 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 **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" # Test code for whether the C++ compiler supports C++98 (global declarations) ac_cxx_conftest_cxx98_globals=' // Does the compiler advertise C++98 conformance? #if !defined __cplusplus || __cplusplus < 199711L # error "Compiler does not advertise C++98 conformance" #endif // These inclusions are to reject old compilers that // lack the unsuffixed header files. #include #include // and are *not* freestanding headers in C++98. extern void assert (int); namespace std { extern int strcmp (const char *, const char *); } // Namespaces, exceptions, and templates were all added after "C++ 2.0". using std::exception; using std::strcmp; namespace { void test_exception_syntax() { try { throw "test"; } catch (const char *s) { // Extra parentheses suppress a warning when building autoconf itself, // due to lint rules shared with more typical C programs. assert (!(strcmp) (s, "test")); } } template struct test_template { T const val; explicit test_template(T t) : val(t) {} template T add(U u) { return static_cast(u) + val; } }; } // anonymous namespace ' # Test code for whether the C++ compiler supports C++98 (body of main) ac_cxx_conftest_cxx98_main=' assert (argc); assert (! argv[0]); { test_exception_syntax (); test_template tt (2.0); assert (tt.add (4) == 6.0); assert (true && !false); } ' # Test code for whether the C++ compiler supports C++11 (global declarations) ac_cxx_conftest_cxx11_globals=' // Does the compiler advertise C++ 2011 conformance? #if !defined __cplusplus || __cplusplus < 201103L # error "Compiler does not advertise C++11 conformance" #endif namespace cxx11test { constexpr int get_val() { return 20; } struct testinit { int i; double d; }; class delegate { public: delegate(int n) : n(n) {} delegate(): delegate(2354) {} virtual int getval() { return this->n; }; protected: int n; }; class overridden : public delegate { public: overridden(int n): delegate(n) {} virtual int getval() override final { return this->n * 2; } }; class nocopy { public: nocopy(int i): i(i) {} nocopy() = default; nocopy(const nocopy&) = delete; nocopy & operator=(const nocopy&) = delete; private: int i; }; // for testing lambda expressions template Ret eval(Fn f, Ret v) { return f(v); } // for testing variadic templates and trailing return types template auto sum(V first) -> V { return first; } template auto sum(V first, Args... rest) -> V { return first + sum(rest...); } } ' # Test code for whether the C++ compiler supports C++11 (body of main) ac_cxx_conftest_cxx11_main=' { // Test auto and decltype auto a1 = 6538; auto a2 = 48573953.4; auto a3 = "String literal"; int total = 0; for (auto i = a3; *i; ++i) { total += *i; } decltype(a2) a4 = 34895.034; } { // Test constexpr short sa[cxx11test::get_val()] = { 0 }; } { // Test initializer lists cxx11test::testinit il = { 4323, 435234.23544 }; } { // Test range-based for int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; for (auto &x : array) { x += 23; } } { // Test lambda expressions using cxx11test::eval; assert (eval ([](int x) { return x*2; }, 21) == 42); double d = 2.0; assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); assert (d == 5.0); assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); assert (d == 5.0); } { // Test use of variadic templates using cxx11test::sum; auto a = sum(1); auto b = sum(1, 2); auto c = sum(1.0, 2.0, 3.0); } { // Test constructor delegation cxx11test::delegate d1; cxx11test::delegate d2(); cxx11test::delegate d3(45); } { // Test override and final cxx11test::overridden o1(55464); } { // Test nullptr char *c = nullptr; } { // Test template brackets test_template<::test_template> v(test_template(12)); } { // Unicode literals char const *utf8 = u8"UTF-8 string \u2500"; char16_t const *utf16 = u"UTF-8 string \u2500"; char32_t const *utf32 = U"UTF-32 string \u2500"; } ' # Test code for whether the C compiler supports C++11 (complete). ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} ${ac_cxx_conftest_cxx11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} ${ac_cxx_conftest_cxx11_main} return ok; } " # Test code for whether the C compiler supports C++98 (complete). ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} return ok; } " gt_needs="$gt_needs " # Auxiliary files required by this configure script. ac_aux_files="config.rpath compile ltmain.sh config.guess config.sub missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$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. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # 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,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$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=`printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-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.16' # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. 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 as_fn_executable_p "$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+y}; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$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' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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=`printf "%s\n" "$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 MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ 'BusyBox '* | \ '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+y}; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='libesedb' VERSION='20240420' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' # The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } _am_tools=none fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } _am_tools=none fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 printf %s "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_ustar-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -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 ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -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_ustar}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test ${am_cv_prog_tar_ustar+y} then : printf %s "(cached) " >&6 else $as_nop am_cv_prog_tar_ustar=$_am_tool fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$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 case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.7' macro_revision='2.4.7' 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "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*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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. printf "%s\n" "$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 -version; 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\"" printf "%s\n" "$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 printf "%s\n" "$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 (void) { ; 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$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+y} && 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 $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$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 (void) { 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$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 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$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_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _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 conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" 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= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop 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". rm -rf conftest.dir 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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" as_fn_executable_p "$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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" as_fn_executable_p "$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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" as_fn_executable_p "$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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" as_fn_executable_p "$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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$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+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "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 yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop 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 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else $as_nop 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else $as_nop 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop #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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_reload_flag='-r' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$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 yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; 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}file", so it can be a program name with args. set dummy ${ac_tool_prefix}file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="${ac_tool_prefix}file" printf "%s\n" "$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 FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_FILECMD"; then ac_ct_FILECMD=$FILECMD # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_FILECMD"; then ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FILECMD="file" printf "%s\n" "$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_FILECMD=$ac_cv_prog_ac_ct_FILECMD if test -n "$ac_ct_FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 printf "%s\n" "$ac_ct_FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_FILECMD" = x; then FILECMD=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FILECMD=$ac_ct_FILECMD fi else FILECMD="$ac_cv_prog_FILECMD" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else $as_nop 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 # that 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='$FILECMD -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. if ( 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* | midnightbsd*) 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=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | 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=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else $as_nop 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 one 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; 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=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else $as_nop # 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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=$? printf "%s\n" "$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=$? printf "%s\n" "$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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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=$? printf "%s\n" "$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 yes = "$pipe_works"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else $as_nop with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else $as_nop lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else $as_nop 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 there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else $as_nop lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else $as_nop 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 $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS 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 -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$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*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi 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 : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AS+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 printf "%s\n" "$AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AS+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 printf "%s\n" "$ac_ct_AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 enable_dlopen=no # Check whether --enable-shared was given. if test ${enable_shared+y} 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 $as_nop enable_shared=yes fi # Check whether --enable-static was given. if test ${enable_static+y} 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 $as_nop enable_static=yes fi # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop pic_mode=default fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} 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 $as_nop enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else $as_nop if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h 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 set != "${COLLECT_NAMES+set}"; 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 and # ICC, which need '.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 func_cc_basename $compiler cc_basename=$func_cc_basename_result # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else $as_nop 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" ## exclude from sc_useless_quotes_in_assignment # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; 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 yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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 ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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 | 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' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; 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\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # 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\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; 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 that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else $as_nop 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" ## exclude from sc_useless_quotes_in_assignment # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; 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\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "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_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++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/([^)]\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; 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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) export_dynamic_flag_spec='-rdynamic' ;; 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='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$ld_shlibs"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. 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) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam \ 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam \ 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 yes = "$with_gnu_ld"; 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 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' 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++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 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 and ICC 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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 ;; # 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* | midnightbsd*) 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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$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 yes,no = "$GCC,$with_gnu_ld"; 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) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && 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 yes,yes = "$GCC,$enable_shared"; 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else $as_nop $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=$? printf "%s\n" "$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=$? printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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 # correct to gnu/linux during the next big refactor 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* | *,icl*) # Native MSVC or ICC 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 and ICC 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 # correct to gnu/linux during the next big refactor 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 ;; freebsd* | dragonfly* | midnightbsd*) # 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[23].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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 test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; 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.beam \ 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" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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 # correct to gnu/linux during the next big refactor 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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=sco 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 yes = "$with_gnu_ld"; 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$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_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char shl_load (); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else $as_nop ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$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 $as_nop 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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else $as_nop ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dld_link (); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else $as_nop ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; 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 -fvisibility=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=$? printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; 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 -fvisibility=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=$? printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$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= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$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: 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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. printf "%s\n" "$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 -version; 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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _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 conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" 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= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop 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". rm -rf conftest.dir 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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "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 test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. # 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. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # 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 $as_nop # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$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. # 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. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # 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 $as_nop # 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 if test $ac_cv_c_compiler_gnu = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 printf %s "checking whether $CC needs -traditional... " >&6; } if test ${ac_cv_prog_gcc_traditional+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop ac_cv_prog_gcc_traditional=no fi rm -rf 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 -rf conftest* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" printf "%s\n" "$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 printf "%s\n" "$CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" printf "%s\n" "$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 printf "%s\n" "$ac_ct_CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. printf "%s\n" "$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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_prog_cxx_stdcxx=no if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx11_program _ACEOF for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx11" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 ac_prog_cxx_stdcxx=cxx11 fi fi if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx98_program _ACEOF for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx98=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx98" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 ac_prog_cxx_stdcxx=cxx98 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 depcc="$CXX" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CXX_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop 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". rm -rf conftest.dir 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_CXX_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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi 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 if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 printf %s "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test ${ac_cv_prog_CXXCPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CXX needs to be expanded for CXXCPP in "$CXX -E" cpp /lib/cpp do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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. */ #include Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : else $as_nop # 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_cxx_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # 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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 printf "%s\n" "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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. */ #include Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO" then : else $as_nop # 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_cxx_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$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 yes != "$_lt_caught_CXX_error"; 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. # 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 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* # 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 compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "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 yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop 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 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_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 yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$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 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= 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. archive_cmds_CXX='$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; 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_CXX=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_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$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_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath__CXX+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`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__CXX"; then lt_cv_aix_libpath__CXX=`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.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$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 set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath__CXX+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`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__CXX"; then lt_cv_aix_libpath__CXX=`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.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$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_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # 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_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='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, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`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_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="$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_CXX="$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" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$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" archive_expsym_cmds_CXX="$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 ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes file_list_spec_CXX='@' ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$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 yes = "$GXX"; then archive_cmds_CXX='$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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$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 yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$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 ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$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_CXX='$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_CXX='$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++ archive_cmds_CXX='$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. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$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 archive_cmds_CXX='$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 link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | 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. archive_cmds_CXX='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' archive_expsym_cmds_CXX='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"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$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."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='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`"' old_archive_cmds_CXX='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' archive_cmds_CXX='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' archive_expsym_cmds_CXX='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 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$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++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # 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 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='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 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$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_CXX=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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=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*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=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. archive_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$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' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$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' archive_expsym_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # 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 yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$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' ;; *) archive_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # 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 ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=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?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$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. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='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 $wl-h $wl$soname -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. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='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 $wl-h $wl$soname -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 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT 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_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$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 ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$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... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $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 "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $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 no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken 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. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-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_CXX='-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 lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; 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_prog_compiler_pic_CXX=-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_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--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). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test ${lt_cv_prog_compiler_pic_works_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # 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_CXX=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_static_works_CXX=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_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o_CXX=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_CXX=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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o_CXX+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o_CXX=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_CXX=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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$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_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc_CXX+y} then : printf %s "(cached) " >&6 else $as_nop $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=$? printf "%s\n" "$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_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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 # correct to gnu/linux during the next big refactor 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' ;; 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* | *,icl*) # Native MSVC or ICC 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 and ICC 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_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; freebsd* | dragonfly* | midnightbsd*) # 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[23].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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 test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_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.beam \ 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" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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 # correct to gnu/linux during the next big refactor 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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=sco 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 yes = "$with_gnu_ld"; 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 printf "%s\n" "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi 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 yes != "$_lt_caught_CXX_error" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKGCONFIG+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKGCONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 printf "%s\n" "$PKGCONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval else $as_nop USE_NLS=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.20 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. 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 # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf "%s\n" "$MSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 printf "%s\n" "$GMSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi 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 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. 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 # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf "%s\n" "$XGETTEXT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. 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 # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 printf "%s\n" "$MSGMERGE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi 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+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. 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 if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 printf %s "checking for ld... " >&6; } elif test "$GCC" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" 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 variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in *" -b64 "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$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+y} then : enableval=$enable_rpath; : else $as_nop enable_rpath=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else case "$host_cpu" in # CPUs that only support a 32-bit ABI. arc \ | bfin \ | cris* \ | csky \ | epiphany \ | ft32 \ | h8300 \ | m68k \ | microblaze | microblazeel \ | nds32 | nds32le | nds32be \ | nios2 | nios2eb | nios2el \ | or1k* \ | or32 \ | sh | sh1234 | sh1234elb \ | tic6x \ | xtensa* ) gl_cv_host_cpu_c_abi_32bit=yes ;; # CPUs that only support a 64-bit ABI. alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | mmix ) gl_cv_host_cpu_c_abi_32bit=no ;; i[34567]86 ) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) \ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _ILP32 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=yes else $as_nop gl_cv_host_cpu_c_abi_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; rs6000 ) gl_cv_host_cpu_c_abi_32bit=yes ;; riscv32 | riscv64 ) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes else $as_nop gl_cv_elf=no fi rm -rf conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac else acl_is_expected_elfclass () { : } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 printf %s "checking for the common suffixes of directories in the library search path... " >&6; } if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else $as_nop acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf "%s\n" "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` 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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} 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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= 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 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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 fi done 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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; 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/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi 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*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; 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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes else $as_nop gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes else $as_nop gt_cv_func_CFLocaleCopyPreferredLanguages=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" else $as_nop eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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.beam \ 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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* 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 ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_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, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #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 ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_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, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$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 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test ${with_libintl_prefix+y} 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\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= 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 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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 fi done 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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; 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" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; 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/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi 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*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; 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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_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$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 else $as_nop 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 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" else $as_nop eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; 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.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$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 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 printf %s "checking whether to use NLS... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 printf %s "checking how to link with libintl... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 printf "%s\n" "$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 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* 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}; /* IBM 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 sort of thing. */ char tx; char *t = &tx; 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; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; 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 $as_nop ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 printf %s "checking for working volatile... " >&6; } if test ${ac_cv_c_volatile+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { 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 $as_nop ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 printf "%s\n" "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then printf "%s\n" "#define volatile /**/" >>confdefs.h fi # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 printf %s "checking for special C compiler options needed for large files... " >&6; } if test ${ac_cv_sys_largefile_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 conftest.beam break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test ${ac_cv_sys_file_offset_bits+y} then : printf %s "(cached) " >&6 else $as_nop 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; 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.beam 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; 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.beam conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } if test ${ac_cv_sys_large_files+y} then : printf %s "(cached) " >&6 else $as_nop 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; 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.beam 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 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; 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.beam conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 printf "%s\n" "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac rm -rf conftest* fi fi # Check whether --enable-shared-libs was given. if test ${enable_shared_libs+y} then : enableval=$enable_shared_libs; ac_cv_enable_shared_libs=$enableval else $as_nop ac_cv_enable_shared_libs="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to disable disable shared library support" >&5 printf %s "checking whether to disable disable shared library support... " >&6; } if test ${ac_cv_enable_shared_libs+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_shared_libs="yes" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_shared_libs" >&5 printf "%s\n" "$ac_cv_enable_shared_libs" >&6; } # Check whether --enable-static-executables was given. if test ${enable_static_executables+y} then : enableval=$enable_static_executables; ac_cv_enable_static_executables=$enableval else $as_nop ac_cv_enable_static_executables=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5 printf %s "checking whether to enable build static executables (binaries)... " >&6; } if test ${ac_cv_enable_static_executables+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_static_executables=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5 printf "%s\n" "$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 enable_shared=no fi # Check whether --enable-winapi was given. if test ${enable_winapi+y} then : enableval=$enable_winapi; ac_cv_enable_winapi=$enableval else $as_nop ac_cv_enable_winapi=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5 printf %s "checking whether to enable enable WINAPI support for cross-compilation... " >&6; } if test ${ac_cv_enable_winapi+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_winapi=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5 printf "%s\n" "$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*) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5 printf "%s\n" "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;} ac_cv_enable_winapi=yes ;; #( *msys*) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detected MSYS enabling WINAPI support for cross-compilation" >&5 printf "%s\n" "$as_me: detected MSYS 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+y} then : enableval=$enable_wide_character_type; ac_cv_enable_wide_character_type=$enableval else $as_nop ac_cv_enable_wide_character_type=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5 printf %s "checking whether to enable enable wide character type support... " >&6; } if test ${ac_cv_enable_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_wide_character_type=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_wide_character_type" >&5 printf "%s\n" "$ac_cv_enable_wide_character_type" >&6; } # Check whether --enable-verbose-output was given. if test ${enable_verbose_output+y} then : enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval else $as_nop ac_cv_enable_verbose_output=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5 printf %s "checking whether to enable enable verbose output... " >&6; } if test ${ac_cv_enable_verbose_output+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_verbose_output=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5 printf "%s\n" "$ac_cv_enable_verbose_output" >&6; } if test "x$ac_cv_enable_verbose_output" != xno then : printf "%s\n" "#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+y} then : enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval else $as_nop ac_cv_enable_debug_output=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5 printf %s "checking whether to enable enable debug output... " >&6; } if test ${ac_cv_enable_debug_output+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_debug_output=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5 printf "%s\n" "$ac_cv_enable_debug_output" >&6; } if test "x$ac_cv_enable_debug_output" != xno then : printf "%s\n" "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h ac_cv_enable_debug_output=yes fi 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 : printf "%s\n" "#define HAVE_WIDE_CHARACTER_TYPE 1" >>confdefs.h HAVE_WIDE_CHARACTER_TYPE=1 else $as_nop HAVE_WIDE_CHARACTER_TYPE=0 fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes then : printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes then : printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes then : printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h fi if test "x$ac_cv_header_sys_types_h" = xyes then : HAVE_SYS_TYPES_H=1 else $as_nop HAVE_SYS_TYPES_H=0 fi if test "x$ac_cv_header_inttypes_h" = xyes then : HAVE_INTTYPES_H=1 else $as_nop HAVE_INTTYPES_H=0 fi if test "x$ac_cv_header_stdint_h" = xyes then : HAVE_STDINT_H=1 else $as_nop HAVE_STDINT_H=0 fi if test "x$ac_cv_header_wchar_h" = xyes then : HAVE_WCHAR_H=1 else $as_nop HAVE_WCHAR_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 $as_nop printf "%s\n" "#define mode_t int" >>confdefs.h 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 $as_nop printf "%s\n" "#define off_t long int" >>confdefs.h 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 $as_nop printf "%s\n" "#define size_t unsigned int" >>confdefs.h 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 $as_nop 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 $as_nop 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 $as_nop 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 $as_nop 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 $as_nop 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_off_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 printf %s "checking size of size_t... " >&6; } if test ${ac_cv_sizeof_size_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_size_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h if test "x$ac_cv_header_wchar_h" = xyes then : # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 printf %s "checking size of wchar_t... " >&6; } if test ${ac_cv_sizeof_wchar_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_wchar_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else $as_nop ac_cv_c_undeclared_builtin_options=$ac_arg fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac if test "x$ac_cv_enable_winapi" = xyes then : ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes then : printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h fi if test "x$ac_cv_header_windows_h" = xno then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes then : printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h fi fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes then : printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes then : printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" if test "x$ac_cv_header_wctype_h" = xyes then : printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fclose" "ac_cv_func_fclose" if test "x$ac_cv_func_fclose" = xyes then : printf "%s\n" "#define HAVE_FCLOSE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "feof" "ac_cv_func_feof" if test "x$ac_cv_func_feof" = xyes then : printf "%s\n" "#define HAVE_FEOF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fgets" "ac_cv_func_fgets" if test "x$ac_cv_func_fgets" = xyes then : printf "%s\n" "#define HAVE_FGETS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fopen" "ac_cv_func_fopen" if test "x$ac_cv_func_fopen" = xyes then : printf "%s\n" "#define HAVE_FOPEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fread" "ac_cv_func_fread" if test "x$ac_cv_func_fread" = xyes then : printf "%s\n" "#define HAVE_FREAD 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko" if test "x$ac_cv_func_fseeko" = xyes then : printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fseeko64" "ac_cv_func_fseeko64" if test "x$ac_cv_func_fseeko64" = xyes then : printf "%s\n" "#define HAVE_FSEEKO64 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fwrite" "ac_cv_func_fwrite" if test "x$ac_cv_func_fwrite" = xyes then : printf "%s\n" "#define HAVE_FWRITE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf" if test "x$ac_cv_func_vfprintf" = xyes then : printf "%s\n" "#define HAVE_VFPRINTF 1" >>confdefs.h fi if test "x$ac_cv_func_fclose" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : ac_fn_c_check_func "$LINENO" "fgetws" "ac_cv_func_fgetws" if test "x$ac_cv_func_fgetws" = xyes then : printf "%s\n" "#define HAVE_FGETWS 1" >>confdefs.h fi if test "x$ac_cv_func_fgetws" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgetws See \`config.log' for more details" "$LINENO" 5; } fi fi ac_fn_c_check_func "$LINENO" "free" "ac_cv_func_free" if test "x$ac_cv_func_free" = xyes then : printf "%s\n" "#define HAVE_FREE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "malloc" "ac_cv_func_malloc" if test "x$ac_cv_func_malloc" = xyes then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp" if test "x$ac_cv_func_memcmp" = xyes then : printf "%s\n" "#define HAVE_MEMCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy" if test "x$ac_cv_func_memcpy" = xyes then : printf "%s\n" "#define HAVE_MEMCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" if test "x$ac_cv_func_memset" = xyes then : printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "realloc" "ac_cv_func_realloc" if test "x$ac_cv_func_realloc" = xyes then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h fi if test "x$ac_cv_func_free" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: realloc See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" if test "x$ac_cv_func_memchr" = xyes then : printf "%s\n" "#define HAVE_MEMCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" if test "x$ac_cv_func_memrchr" = xyes then : printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes then : printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sscanf" "ac_cv_func_sscanf" if test "x$ac_cv_func_sscanf" = xyes then : printf "%s\n" "#define HAVE_SSCANF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes then : printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strlen" "ac_cv_func_strlen" if test "x$ac_cv_func_strlen" = xyes then : printf "%s\n" "#define HAVE_STRLEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncmp" "ac_cv_func_strncmp" if test "x$ac_cv_func_strncmp" = xyes then : printf "%s\n" "#define HAVE_STRNCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncpy" "ac_cv_func_strncpy" if test "x$ac_cv_func_strncpy" = xyes then : printf "%s\n" "#define HAVE_STRNCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp" if test "x$ac_cv_func_strnicmp" = xyes then : printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr" if test "x$ac_cv_func_strrchr" = xyes then : printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" if test "x$ac_cv_func_strstr" = xyes then : printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes then : printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_memrchr" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h 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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 && test "x$ac_cv_func_strnicmp" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strncasecmp, strcasecmp and strnicmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strstr" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_vsnprintf" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : ac_fn_c_check_func "$LINENO" "swprintf" "ac_cv_func_swprintf" if test "x$ac_cv_func_swprintf" = xyes then : printf "%s\n" "#define HAVE_SWPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" if test "x$ac_cv_func_towlower" = xyes then : printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcscasecmp" "ac_cv_func_wcscasecmp" if test "x$ac_cv_func_wcscasecmp" = xyes then : printf "%s\n" "#define HAVE_WCSCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcschr" "ac_cv_func_wcschr" if test "x$ac_cv_func_wcschr" = xyes then : printf "%s\n" "#define HAVE_WCSCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen" if test "x$ac_cv_func_wcslen" = xyes then : printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsncasecmp" "ac_cv_func_wcsncasecmp" if test "x$ac_cv_func_wcsncasecmp" = xyes then : printf "%s\n" "#define HAVE_WCSNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsncmp" "ac_cv_func_wcsncmp" if test "x$ac_cv_func_wcsncmp" = xyes then : printf "%s\n" "#define HAVE_WCSNCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsncpy" "ac_cv_func_wcsncpy" if test "x$ac_cv_func_wcsncpy" = xyes then : printf "%s\n" "#define HAVE_WCSNCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsnicmp" "ac_cv_func_wcsnicmp" if test "x$ac_cv_func_wcsnicmp" = xyes then : printf "%s\n" "#define HAVE_WCSNICMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsrchr" "ac_cv_func_wcsrchr" if test "x$ac_cv_func_wcsrchr" = xyes then : printf "%s\n" "#define HAVE_WCSRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsstr" "ac_cv_func_wcsstr" if test "x$ac_cv_func_wcsstr" = xyes then : printf "%s\n" "#define HAVE_WCSSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wmemchr" "ac_cv_func_wmemchr" if test "x$ac_cv_func_wmemchr" = xyes then : printf "%s\n" "#define HAVE_WMEMCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp" if test "x$ac_cv_func_wmemcmp" = xyes then : printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wmemcpy" "ac_cv_func_wmemcpy" if test "x$ac_cv_func_wmemcpy" = xyes then : printf "%s\n" "#define HAVE_WMEMCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wmemrchr" "ac_cv_func_wmemrchr" if test "x$ac_cv_func_wmemrchr" = xyes then : printf "%s\n" "#define HAVE_WMEMRCHR 1" >>confdefs.h fi if test "x$ac_cv_func_swprintf" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_wcsnicmp" != xyes && test "x$ac_cv_func_towlower" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcsstr" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcsstr See \`config.log' for more details" "$LINENO" 5; } fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5 printf %s "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 (void) { printf( "%jd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_cv_have_printf_jd=no else $as_nop ac_cv_cv_have_printf_jd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 (void) { printf( "%jd", (off_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_cv_have_printf_jd=yes else $as_nop ac_cv_cv_have_printf_jd=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop 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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PRINTF_JD 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5 printf "%s\n" "$ac_cv_cv_have_printf_jd" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5 printf %s "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 (void) { printf( "%zd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_cv_have_printf_zd=no else $as_nop ac_cv_cv_have_printf_zd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 (void) { printf( "%zd", (size_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_cv_have_printf_zd=yes else $as_nop ac_cv_cv_have_printf_zd=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop 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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PRINTF_ZD 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_strerror_r" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h # Check whether --with-libcerror was given. if test ${with_libcerror+y} then : withval=$with_libcerror; ac_cv_with_libcerror=$withval else $as_nop ac_cv_with_libcerror=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libcerror+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcerror=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcerror" >&5 printf "%s\n" "$ac_cv_with_libcerror" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcerror" = xno then : ac_cv_libcerror=no else $as_nop ac_cv_libcerror=check if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcerror See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror >= 20120425" >&5 printf %s "checking for libcerror >= 20120425... " >&6; } if test -n "$libcerror_CFLAGS"; then pkg_cv_libcerror_CFLAGS="$libcerror_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libcerror >= 20120425" 2>&1` else libcerror_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcerror >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcerror_PKG_ERRORS" >&5 ac_cv_libcerror=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcerror=check else libcerror_CFLAGS=$pkg_cv_libcerror_CFLAGS libcerror_LIBS=$pkg_cv_libcerror_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libcerror" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcerror.h" "ac_cv_header_libcerror_h" "$ac_includes_default" if test "x$ac_cv_header_libcerror_h" = xyes then : printf "%s\n" "#define HAVE_LIBCERROR_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcerror_h" = xno then : ac_cv_libcerror=no else $as_nop ac_cv_libcerror=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_get_version in -lcerror" >&5 printf %s "checking for libcerror_get_version in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_get_version (); int main (void) { return libcerror_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_get_version=yes else $as_nop ac_cv_lib_cerror_libcerror_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_free in -lcerror" >&5 printf %s "checking for libcerror_error_free in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_free (); int main (void) { return libcerror_error_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_error_free=yes else $as_nop ac_cv_lib_cerror_libcerror_error_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_set in -lcerror" >&5 printf %s "checking for libcerror_error_set in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_set+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_set (); int main (void) { return libcerror_error_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_error_set=yes else $as_nop ac_cv_lib_cerror_libcerror_error_set=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_set" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_matches in -lcerror" >&5 printf %s "checking for libcerror_error_matches in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_matches+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_matches (); int main (void) { return libcerror_error_matches (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_error_matches=yes else $as_nop ac_cv_lib_cerror_libcerror_error_matches=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_matches" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_fprint in -lcerror" >&5 printf %s "checking for libcerror_error_fprint in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_fprint+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_fprint (); int main (void) { return libcerror_error_fprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_error_fprint=yes else $as_nop ac_cv_lib_cerror_libcerror_error_fprint=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_fprint" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_sprint in -lcerror" >&5 printf %s "checking for libcerror_error_sprint in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_sprint+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_sprint (); int main (void) { return libcerror_error_sprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cerror_libcerror_error_sprint=yes else $as_nop ac_cv_lib_cerror_libcerror_error_sprint=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_sprint" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_fprint in -lcerror" >&5 printf %s "checking for libcerror_error_backtrace_fprint in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_backtrace_fprint+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_backtrace_fprint (); int main (void) { 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 $as_nop ac_cv_lib_cerror_libcerror_error_backtrace_fprint=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_sprint in -lcerror" >&5 printf %s "checking for libcerror_error_backtrace_sprint in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_error_backtrace_sprint+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_error_backtrace_sprint (); int main (void) { 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 $as_nop ac_cv_lib_cerror_libcerror_error_backtrace_sprint=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcerror_system_set_error in -lcerror" >&5 printf %s "checking for libcerror_system_set_error in -lcerror... " >&6; } if test ${ac_cv_lib_cerror_libcerror_system_set_error+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcerror_system_set_error (); int main (void) { 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 $as_nop ac_cv_lib_cerror_libcerror_system_set_error=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_system_set_error" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcerror=no fi ac_cv_libcerror_LIBADD="-lcerror" fi fi if test "x$ac_cv_libcerror" != xyes && test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcerror in directory: $ac_cv_with_libcerror See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcerror" = xyes then : printf "%s\n" "#define HAVE_LIBCERROR 1" >>confdefs.h fi if test "x$ac_cv_libcerror" = xyes then : HAVE_LIBCERROR=1 else $as_nop HAVE_LIBCERROR=0 fi if test "x$ac_cv_libcerror" != xyes then : ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" if test "x$ac_cv_header_varargs_h" = xyes then : printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h fi if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : ac_fn_c_check_func "$LINENO" "wcstombs" "ac_cv_func_wcstombs" if test "x$ac_cv_func_wcstombs" = xyes then : printf "%s\n" "#define HAVE_WCSTOMBS 1" >>confdefs.h fi if test "x$ac_cv_func_wcstombs" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcstombs See \`config.log' for more details" "$LINENO" 5; } fi fi if test $ac_cv_have_decl_strerror_r = yes; then # For backward compatibility's sake, define HAVE_STRERROR_R. # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well # as AC_CHECK_DECLS_ONCE.) printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 printf %s "checking whether strerror_r returns char *... " >&6; } if test ${ac_cv_func_strerror_r_char_p+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ #include int main (void) { 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.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi if test "x$ac_cv_have_decl_strerror_r" != xyes then : ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi if test "x$ac_cv_func_strerror" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 -I\$(top_srcdir)/libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local printf "%s\n" "#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 --enable-multi-threading-support was given. if test ${enable_multi_threading_support+y} then : enableval=$enable_multi_threading_support; ac_cv_enable_multi_threading_support=$enableval else $as_nop ac_cv_enable_multi_threading_support=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5 printf %s "checking whether to enable enable multi-threading support... " >&6; } if test ${ac_cv_enable_multi_threading_support+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_multi_threading_support=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_multi_threading_support" >&5 printf "%s\n" "$ac_cv_enable_multi_threading_support" >&6; } # Check whether --with-libcthreads was given. if test ${with_libcthreads+y} then : withval=$with_libcthreads; ac_cv_with_libcthreads=$withval else $as_nop ac_cv_with_libcthreads=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version" >&5 printf %s "checking whether to use search for libcthreads in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if test ${ac_cv_with_libcthreads+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcthreads=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcthreads" >&5 printf "%s\n" "$ac_cv_with_libcthreads" >&6; } if test "x$ac_cv_enable_multi_threading_support" = xno then : ac_cv_libcthreads="no" ac_cv_libcthreads_multi_threading="no" else $as_nop if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcthreads" = xno then : ac_cv_libcthreads=no else $as_nop ac_cv_libcthreads=check if test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes then : if test -d "$ac_cv_with_libcthreads" then : CFLAGS="$CFLAGS -I${ac_cv_with_libcthreads}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcthreads}/lib" else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcthreads See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads >= 20160404" >&5 printf %s "checking for libcthreads >= 20160404... " >&6; } if test -n "$libcthreads_CFLAGS"; then pkg_cv_libcthreads_CFLAGS="$libcthreads_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcthreads_CFLAGS=`$PKG_CONFIG --cflags "libcthreads >= 20160404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcthreads_LIBS"; then pkg_cv_libcthreads_LIBS="$libcthreads_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcthreads >= 20160404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcthreads >= 20160404") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcthreads_LIBS=`$PKG_CONFIG --libs "libcthreads >= 20160404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 libcthreads_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` else libcthreads_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcthreads >= 20160404" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcthreads_PKG_ERRORS" >&5 ac_cv_libcthreads=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcthreads=check else libcthreads_CFLAGS=$pkg_cv_libcthreads_CFLAGS libcthreads_LIBS=$pkg_cv_libcthreads_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libcthreads=yes fi fi if test "x$ac_cv_libcthreads" = xyes then : ac_cv_libcthreads_CPPFLAGS="$pkg_cv_libcthreads_CFLAGS" ac_cv_libcthreads_LIBADD="$pkg_cv_libcthreads_LIBS" fi fi if test "x$ac_cv_libcthreads" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcthreads.h" "ac_cv_header_libcthreads_h" "$ac_includes_default" if test "x$ac_cv_header_libcthreads_h" = xyes then : printf "%s\n" "#define HAVE_LIBCTHREADS_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcthreads_h" = xno then : ac_cv_libcthreads=no else $as_nop ac_cv_libcthreads=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_get_version in -lcthreads" >&5 printf %s "checking for libcthreads_get_version in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_get_version+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_get_version (); int main (void) { return libcthreads_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_get_version=yes else $as_nop ac_cv_lib_cthreads_libcthreads_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_get_version" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_get_version" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_get_version" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_create in -lcthreads" >&5 printf %s "checking for libcthreads_thread_create in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_create+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_create (); int main (void) { return libcthreads_thread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_create=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_create=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_create" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_create" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_create" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_join in -lcthreads" >&5 printf %s "checking for libcthreads_thread_join in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_join+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_join (); int main (void) { return libcthreads_thread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_join=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_join=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_join" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_join" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_join" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_thread_attributes_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_attributes_initialize (); int main (void) { return libcthreads_thread_attributes_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_attributes_free in -lcthreads" >&5 printf %s "checking for libcthreads_thread_attributes_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_attributes_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_attributes_free (); int main (void) { return libcthreads_thread_attributes_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_attributes_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_attributes_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_attributes_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_condition_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_condition_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_condition_initialize (); int main (void) { return libcthreads_condition_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_condition_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_condition_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_condition_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_free in -lcthreads" >&5 printf %s "checking for libcthreads_condition_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_condition_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_condition_free (); int main (void) { return libcthreads_condition_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_condition_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_condition_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_condition_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_broadcast in -lcthreads" >&5 printf %s "checking for libcthreads_condition_broadcast in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_condition_broadcast+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_condition_broadcast (); int main (void) { return libcthreads_condition_broadcast (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_condition_broadcast=yes else $as_nop ac_cv_lib_cthreads_libcthreads_condition_broadcast=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_broadcast" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_condition_broadcast" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_signal in -lcthreads" >&5 printf %s "checking for libcthreads_condition_signal in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_condition_signal+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_condition_signal (); int main (void) { return libcthreads_condition_signal (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_condition_signal=yes else $as_nop ac_cv_lib_cthreads_libcthreads_condition_signal=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_signal" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_signal" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_condition_signal" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_condition_wait in -lcthreads" >&5 printf %s "checking for libcthreads_condition_wait in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_condition_wait+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_condition_wait (); int main (void) { return libcthreads_condition_wait (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_condition_wait=yes else $as_nop ac_cv_lib_cthreads_libcthreads_condition_wait=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_condition_wait" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_condition_wait" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_condition_wait" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_lock_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_lock_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_lock_initialize (); int main (void) { return libcthreads_lock_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_lock_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_lock_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_lock_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_free in -lcthreads" >&5 printf %s "checking for libcthreads_lock_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_lock_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_lock_free (); int main (void) { return libcthreads_lock_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_lock_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_lock_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_lock_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_grab in -lcthreads" >&5 printf %s "checking for libcthreads_lock_grab in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_lock_grab+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_lock_grab (); int main (void) { return libcthreads_lock_grab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_lock_grab=yes else $as_nop ac_cv_lib_cthreads_libcthreads_lock_grab=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_grab" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_grab" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_lock_grab" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_lock_release in -lcthreads" >&5 printf %s "checking for libcthreads_lock_release in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_lock_release+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_lock_release (); int main (void) { return libcthreads_lock_release (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_lock_release=yes else $as_nop ac_cv_lib_cthreads_libcthreads_lock_release=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_lock_release" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_lock_release" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_lock_release" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_mutex_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_mutex_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_mutex_initialize (); int main (void) { return libcthreads_mutex_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_mutex_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_mutex_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_free in -lcthreads" >&5 printf %s "checking for libcthreads_mutex_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_mutex_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_mutex_free (); int main (void) { return libcthreads_mutex_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_mutex_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_mutex_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_grab in -lcthreads" >&5 printf %s "checking for libcthreads_mutex_grab in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_mutex_grab+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_mutex_grab (); int main (void) { return libcthreads_mutex_grab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_mutex_grab=yes else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_grab=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_grab" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_grab" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_mutex_grab" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_try_grab in -lcthreads" >&5 printf %s "checking for libcthreads_mutex_try_grab in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_mutex_try_grab+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_mutex_try_grab (); int main (void) { return libcthreads_mutex_try_grab (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_mutex_try_grab=yes else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_try_grab=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_mutex_try_grab" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_mutex_release in -lcthreads" >&5 printf %s "checking for libcthreads_mutex_release in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_mutex_release+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_mutex_release (); int main (void) { return libcthreads_mutex_release (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_mutex_release=yes else $as_nop ac_cv_lib_cthreads_libcthreads_mutex_release=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_mutex_release" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_mutex_release" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_mutex_release" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_initialize (); int main (void) { return libcthreads_read_write_lock_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_free in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_free (); int main (void) { return libcthreads_read_write_lock_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_read in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_grab_for_read in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_grab_for_read (); int main (void) { return libcthreads_read_write_lock_grab_for_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_read" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_grab_for_write in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_grab_for_write in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_grab_for_write (); int main (void) { return libcthreads_read_write_lock_grab_for_write (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_grab_for_write" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_read in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_release_for_read in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_release_for_read (); int main (void) { return libcthreads_read_write_lock_release_for_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_read" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_read_write_lock_release_for_write in -lcthreads" >&5 printf %s "checking for libcthreads_read_write_lock_release_for_write in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_read_write_lock_release_for_write (); int main (void) { return libcthreads_read_write_lock_release_for_write (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write=yes else $as_nop ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_read_write_lock_release_for_write" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_initialize in -lcthreads" >&5 printf %s "checking for libcthreads_queue_initialize in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_initialize (); int main (void) { return libcthreads_queue_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_initialize=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_initialize" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_initialize" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_initialize" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_free in -lcthreads" >&5 printf %s "checking for libcthreads_queue_free in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_free (); int main (void) { return libcthreads_queue_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_free=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_free" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_free" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_free" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_type_pop in -lcthreads" >&5 printf %s "checking for libcthreads_queue_type_pop in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_type_pop+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_type_pop (); int main (void) { return libcthreads_queue_type_pop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_type_pop=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_type_pop=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_type_pop" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_type_pop" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_pop in -lcthreads" >&5 printf %s "checking for libcthreads_queue_pop in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_pop+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_pop (); int main (void) { return libcthreads_queue_pop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_pop=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_pop=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_pop" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_pop" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_pop" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_try_push in -lcthreads" >&5 printf %s "checking for libcthreads_queue_try_push in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_try_push+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_try_push (); int main (void) { return libcthreads_queue_try_push (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_try_push=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_try_push=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_try_push" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_try_push" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_try_push" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push in -lcthreads" >&5 printf %s "checking for libcthreads_queue_push in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_push+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_push (); int main (void) { return libcthreads_queue_push (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_push=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_push=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_push" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_push" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_queue_push_sorted in -lcthreads" >&5 printf %s "checking for libcthreads_queue_push_sorted in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_queue_push_sorted+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_queue_push_sorted (); int main (void) { return libcthreads_queue_push_sorted (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_queue_push_sorted=yes else $as_nop ac_cv_lib_cthreads_libcthreads_queue_push_sorted=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_queue_push_sorted" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_create in -lcthreads" >&5 printf %s "checking for libcthreads_thread_pool_create in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_create+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_pool_create (); int main (void) { return libcthreads_thread_pool_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_pool_create=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_create=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_create" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_create" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push in -lcthreads" >&5 printf %s "checking for libcthreads_thread_pool_push in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_push+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_pool_push (); int main (void) { return libcthreads_thread_pool_push (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_pool_push=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_push=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_push" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_push_sorted in -lcthreads" >&5 printf %s "checking for libcthreads_thread_pool_push_sorted in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_pool_push_sorted (); int main (void) { return libcthreads_thread_pool_push_sorted (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_push_sorted" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcthreads_thread_pool_join in -lcthreads" >&5 printf %s "checking for libcthreads_thread_pool_join in -lcthreads... " >&6; } if test ${ac_cv_lib_cthreads_libcthreads_thread_pool_join+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcthreads_thread_pool_join (); int main (void) { return libcthreads_thread_pool_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cthreads_libcthreads_thread_pool_join=yes else $as_nop ac_cv_lib_cthreads_libcthreads_thread_pool_join=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&5 printf "%s\n" "$ac_cv_lib_cthreads_libcthreads_thread_pool_join" >&6; } if test "x$ac_cv_lib_cthreads_libcthreads_thread_pool_join" = xyes then : ac_cv_libcthreads_dummy=yes else $as_nop ac_cv_libcthreads=no fi ac_cv_libcthreads_LIBADD="-lcthreads" fi fi if test "x$ac_cv_libcthreads" != xyes && test "x$ac_cv_with_libcthreads" != x && test "x$ac_cv_with_libcthreads" != xauto-detect && test "x$ac_cv_with_libcthreads" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcthreads in directory: $ac_cv_with_libcthreads See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcthreads" = xyes then : printf "%s\n" "#define HAVE_LIBCTHREADS 1" >>confdefs.h fi if test "x$ac_cv_libcthreads" = xyes then : ac_cv_libcthreads_multi_threading=libcthreads else $as_nop ac_cv_libcthreads_multi_threading=no fi if test "x$ac_cv_libcthreads" = xyes then : HAVE_LIBCTHREADS=1 else $as_nop HAVE_LIBCTHREADS=0 fi if test "x$ac_cv_libcthreads" != xyes then : if test "x$ac_cv_enable_winapi" = xno then : # Check whether --with-pthread was given. if test ${with_pthread+y} then : withval=$with_pthread; ac_cv_with_pthread=$withval else $as_nop ac_cv_with_pthread=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread" >&5 printf %s "checking whether to use search for pthread in includedir and libdir or in the specified DIR, or no if not to use pthread... " >&6; } if test ${ac_cv_with_pthread+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_pthread=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pthread" >&5 printf "%s\n" "$ac_cv_with_pthread" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_pthread" = xno then : ac_cv_pthread=no else $as_nop ac_cv_pthread=check if test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes then : if test -d "$ac_cv_with_pthread" then : CFLAGS="$CFLAGS -I${ac_cv_with_pthread}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_pthread}/lib" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_pthread" >&5 printf "%s\n" "$as_me: WARNING: no such directory: $ac_cv_with_pthread" >&2;} fi fi fi if test "x$ac_cv_pthread" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes then : printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h fi if test "x$ac_cv_header_pthread_h" = xno then : ac_cv_pthread=no else $as_nop ac_cv_pthread=pthread { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 printf %s "checking for pthread_create in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_create+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_create (); int main (void) { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_create=yes else $as_nop ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_exit in -lpthread" >&5 printf %s "checking for pthread_exit in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_exit+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_exit (); int main (void) { return pthread_exit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_exit=yes else $as_nop ac_cv_lib_pthread_pthread_exit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_exit" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_exit" >&6; } if test "x$ac_cv_lib_pthread_pthread_exit" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 printf %s "checking for pthread_join in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_join+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_join (); int main (void) { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_join=yes else $as_nop ac_cv_lib_pthread_pthread_join=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_join" >&6; } if test "x$ac_cv_lib_pthread_pthread_join" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_init in -lpthread" >&5 printf %s "checking for pthread_cond_init in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_cond_init+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_cond_init (); int main (void) { return pthread_cond_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_cond_init=yes else $as_nop ac_cv_lib_pthread_pthread_cond_init=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_init" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_cond_init" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_destroy in -lpthread" >&5 printf %s "checking for pthread_cond_destroy in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_cond_destroy+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_cond_destroy (); int main (void) { return pthread_cond_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_cond_destroy=yes else $as_nop ac_cv_lib_pthread_pthread_cond_destroy=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_destroy" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_destroy" >&6; } if test "x$ac_cv_lib_pthread_pthread_cond_destroy" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_broadcast in -lpthread" >&5 printf %s "checking for pthread_cond_broadcast in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_cond_broadcast+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_cond_broadcast (); int main (void) { return pthread_cond_broadcast (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_cond_broadcast=yes else $as_nop ac_cv_lib_pthread_pthread_cond_broadcast=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_broadcast" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_broadcast" >&6; } if test "x$ac_cv_lib_pthread_pthread_cond_broadcast" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_signal in -lpthread" >&5 printf %s "checking for pthread_cond_signal in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_cond_signal+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_cond_signal (); int main (void) { return pthread_cond_signal (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_cond_signal=yes else $as_nop ac_cv_lib_pthread_pthread_cond_signal=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_signal" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_signal" >&6; } if test "x$ac_cv_lib_pthread_pthread_cond_signal" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_wait in -lpthread" >&5 printf %s "checking for pthread_cond_wait in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_cond_wait+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_cond_wait (); int main (void) { return pthread_cond_wait (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_cond_wait=yes else $as_nop ac_cv_lib_pthread_pthread_cond_wait=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_wait" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_cond_wait" >&6; } if test "x$ac_cv_lib_pthread_pthread_cond_wait" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 printf %s "checking for pthread_mutex_init in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_mutex_init+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main (void) { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_mutex_init=yes else $as_nop ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_destroy in -lpthread" >&5 printf %s "checking for pthread_mutex_destroy in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_mutex_destroy+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_mutex_destroy (); int main (void) { return pthread_mutex_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_mutex_destroy=yes else $as_nop ac_cv_lib_pthread_pthread_mutex_destroy=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_destroy" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_destroy" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_destroy" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 printf %s "checking for pthread_mutex_lock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_mutex_lock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_mutex_lock (); int main (void) { return pthread_mutex_lock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_mutex_lock=yes else $as_nop ac_cv_lib_pthread_pthread_mutex_lock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_trylock in -lpthread" >&5 printf %s "checking for pthread_mutex_trylock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_mutex_trylock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_mutex_trylock (); int main (void) { return pthread_mutex_trylock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_mutex_trylock=yes else $as_nop ac_cv_lib_pthread_pthread_mutex_trylock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_trylock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_trylock" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_trylock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_unlock in -lpthread" >&5 printf %s "checking for pthread_mutex_unlock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_mutex_unlock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_mutex_unlock (); int main (void) { return pthread_mutex_unlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_mutex_unlock=yes else $as_nop ac_cv_lib_pthread_pthread_mutex_unlock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_unlock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_unlock" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_unlock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_init in -lpthread" >&5 printf %s "checking for pthread_rwlock_init in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_rwlock_init+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_rwlock_init (); int main (void) { return pthread_rwlock_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_rwlock_init=yes else $as_nop ac_cv_lib_pthread_pthread_rwlock_init=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_init" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy in -lpthread" >&5 printf %s "checking for pthread_rwlock_destroy in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_rwlock_destroy+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_rwlock_destroy (); int main (void) { return pthread_rwlock_destroy (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_rwlock_destroy=yes else $as_nop ac_cv_lib_pthread_pthread_rwlock_destroy=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_destroy" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_destroy" >&6; } if test "x$ac_cv_lib_pthread_pthread_rwlock_destroy" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_rdlock in -lpthread" >&5 printf %s "checking for pthread_rwlock_rdlock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_rwlock_rdlock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_rwlock_rdlock (); int main (void) { return pthread_rwlock_rdlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_rwlock_rdlock=yes else $as_nop ac_cv_lib_pthread_pthread_rwlock_rdlock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_rdlock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_rdlock" >&6; } if test "x$ac_cv_lib_pthread_pthread_rwlock_rdlock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_wrlock in -lpthread" >&5 printf %s "checking for pthread_rwlock_wrlock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_rwlock_wrlock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_rwlock_wrlock (); int main (void) { return pthread_rwlock_wrlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_rwlock_wrlock=yes else $as_nop ac_cv_lib_pthread_pthread_rwlock_wrlock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_wrlock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_wrlock" >&6; } if test "x$ac_cv_lib_pthread_pthread_rwlock_wrlock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_unlock in -lpthread" >&5 printf %s "checking for pthread_rwlock_unlock in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_rwlock_unlock+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_rwlock_unlock (); int main (void) { return pthread_rwlock_unlock (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_rwlock_unlock=yes else $as_nop ac_cv_lib_pthread_pthread_rwlock_unlock=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_rwlock_unlock" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_rwlock_unlock" >&6; } if test "x$ac_cv_lib_pthread_pthread_rwlock_unlock" = xyes then : ac_pthread_dummy=yes else $as_nop ac_cv_pthread=no fi ac_cv_pthread_LIBADD="-lpthread"; fi if test "x$ac_cv_with_pthread" != x && test "x$ac_cv_with_pthread" != xauto-detect && test "x$ac_cv_with_pthread" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported pthread in directory: $ac_cv_with_pthread See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_pthread" = xpthread then : printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h fi if test "x$ac_cv_pthread" != xno then : HAVE_PTHREAD=1 else $as_nop HAVE_PTHREAD=0 fi if test "x$ac_cv_pthread_CPPFLAGS" != "x" then : PTHREAD_CPPFLAGS=$ac_cv_pthread_CPPFLAGS fi if test "x$ac_cv_pthread_LIBADD" != "x" then : PTHREAD_LIBADD=$ac_cv_pthread_LIBADD fi if test "x$ac_cv_pthread" = xpthread then : ax_pthread_pc_libs_private=-lpthread fi ac_cv_libcthreads_multi_threading=$ac_cv_pthread else $as_nop ac_cv_libcthreads_multi_threading="winapi" fi if test "x$ac_cv_libcthreads_multi_threading" != xno then : ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local else $as_nop ac_cv_libcthreads=no fi printf "%s\n" "#define HAVE_LOCAL_LIBCTHREADS 1" >>confdefs.h HAVE_LOCAL_LIBCTHREADS=1 fi fi if test "x$ac_cv_libcthreads" = xlocal; then HAVE_LOCAL_LIBCTHREADS_TRUE= HAVE_LOCAL_LIBCTHREADS_FALSE='#' else HAVE_LOCAL_LIBCTHREADS_TRUE='#' HAVE_LOCAL_LIBCTHREADS_FALSE= fi if test "x$ac_cv_libcthreads_CPPFLAGS" != "x" then : LIBCTHREADS_CPPFLAGS=$ac_cv_libcthreads_CPPFLAGS fi if test "x$ac_cv_libcthreads_LIBADD" != "x" then : LIBCTHREADS_LIBADD=$ac_cv_libcthreads_LIBADD fi if test "x$ac_cv_libcthreads" != xno then : printf "%s\n" "#define HAVE_MULTI_THREAD_SUPPORT 1" >>confdefs.h HAVE_MULTI_THREAD_SUPPORT=1 else $as_nop HAVE_MULTI_THREAD_SUPPORT=0 fi if test "x$ac_cv_libcthreads" = xyes then : ax_libcthreads_pc_libs_private=-lcthreads fi if test "x$ac_cv_libcthreads" = xyes then : ax_libcthreads_spec_requires=libcthreads ax_libcthreads_spec_build_requires=libcthreads-devel fi # Check whether --with-libcdata was given. if test ${with_libcdata+y} then : withval=$with_libcdata; ac_cv_with_libcdata=$withval else $as_nop ac_cv_with_libcdata=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 printf %s "checking whether to use search for libcdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if test ${ac_cv_with_libcdata+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcdata=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcdata" >&5 printf "%s\n" "$ac_cv_with_libcdata" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcdata" = xno then : ac_cv_libcdata=no else $as_nop ac_cv_libcdata=check if test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes then : if test -d "$ac_cv_with_libcdata" then : CFLAGS="$CFLAGS -I${ac_cv_with_libcdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcdata}/lib" else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcdata See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata >= 20230108" >&5 printf %s "checking for libcdata >= 20230108... " >&6; } if test -n "$libcdata_CFLAGS"; then pkg_cv_libcdata_CFLAGS="$libcdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20230108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdata >= 20230108") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdata_CFLAGS=`$PKG_CONFIG --cflags "libcdata >= 20230108" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcdata_LIBS"; then pkg_cv_libcdata_LIBS="$libcdata_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcdata >= 20230108\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcdata >= 20230108") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcdata_LIBS=`$PKG_CONFIG --libs "libcdata >= 20230108" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 libcdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcdata >= 20230108" 2>&1` else libcdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcdata >= 20230108" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcdata_PKG_ERRORS" >&5 ac_cv_libcdata=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcdata=check else libcdata_CFLAGS=$pkg_cv_libcdata_CFLAGS libcdata_LIBS=$pkg_cv_libcdata_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libcdata=yes fi fi if test "x$ac_cv_libcdata" = xyes then : ac_cv_libcdata_CPPFLAGS="$pkg_cv_libcdata_CFLAGS" ac_cv_libcdata_LIBADD="$pkg_cv_libcdata_LIBS" fi fi if test "x$ac_cv_libcdata" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcdata.h" "ac_cv_header_libcdata_h" "$ac_includes_default" if test "x$ac_cv_header_libcdata_h" = xyes then : printf "%s\n" "#define HAVE_LIBCDATA_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcdata_h" = xno then : ac_cv_libcdata=no else $as_nop ac_cv_libcdata=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_get_version in -lcdata" >&5 printf %s "checking for libcdata_get_version in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_get_version+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_get_version (); int main (void) { return libcdata_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_get_version=yes else $as_nop ac_cv_lib_cdata_libcdata_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_get_version" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_get_version" >&6; } if test "x$ac_cv_lib_cdata_libcdata_get_version" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_initialize in -lcdata" >&5 printf %s "checking for libcdata_array_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_initialize (); int main (void) { return libcdata_array_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_array_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_free in -lcdata" >&5 printf %s "checking for libcdata_array_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_free (); int main (void) { return libcdata_array_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_free=yes else $as_nop ac_cv_lib_cdata_libcdata_array_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_empty in -lcdata" >&5 printf %s "checking for libcdata_array_empty in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_empty+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_empty (); int main (void) { return libcdata_array_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_empty=yes else $as_nop ac_cv_lib_cdata_libcdata_array_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_empty" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_empty" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_empty" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_clone in -lcdata" >&5 printf %s "checking for libcdata_array_clone in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_clone+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_clone (); int main (void) { return libcdata_array_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_clone=yes else $as_nop ac_cv_lib_cdata_libcdata_array_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_clone" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_clone" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_clone" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_resize in -lcdata" >&5 printf %s "checking for libcdata_array_resize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_resize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_resize (); int main (void) { return libcdata_array_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_resize=yes else $as_nop ac_cv_lib_cdata_libcdata_array_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_resize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_resize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_resize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_reverse in -lcdata" >&5 printf %s "checking for libcdata_array_reverse in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_reverse+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_reverse (); int main (void) { return libcdata_array_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_reverse=yes else $as_nop ac_cv_lib_cdata_libcdata_array_reverse=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_reverse" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_reverse" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_reverse" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_number_of_entries in -lcdata" >&5 printf %s "checking for libcdata_array_get_number_of_entries in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_get_number_of_entries+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_get_number_of_entries (); int main (void) { return libcdata_array_get_number_of_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_get_number_of_entries=yes else $as_nop ac_cv_lib_cdata_libcdata_array_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_get_number_of_entries" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_index in -lcdata" >&5 printf %s "checking for libcdata_array_get_entry_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_get_entry_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_get_entry_by_index (); int main (void) { return libcdata_array_get_entry_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_get_entry_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_array_get_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_get_entry_by_value in -lcdata" >&5 printf %s "checking for libcdata_array_get_entry_by_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_get_entry_by_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_get_entry_by_value (); int main (void) { return libcdata_array_get_entry_by_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_get_entry_by_value=yes else $as_nop ac_cv_lib_cdata_libcdata_array_get_entry_by_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_get_entry_by_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_set_entry_by_index in -lcdata" >&5 printf %s "checking for libcdata_array_set_entry_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_set_entry_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_set_entry_by_index (); int main (void) { return libcdata_array_set_entry_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_set_entry_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_array_set_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_set_entry_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_prepend_entry in -lcdata" >&5 printf %s "checking for libcdata_array_prepend_entry in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_prepend_entry+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_prepend_entry (); int main (void) { return libcdata_array_prepend_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_prepend_entry=yes else $as_nop ac_cv_lib_cdata_libcdata_array_prepend_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_prepend_entry" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_prepend_entry" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_prepend_entry" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_append_entry in -lcdata" >&5 printf %s "checking for libcdata_array_append_entry in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_append_entry+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_append_entry (); int main (void) { return libcdata_array_append_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_append_entry=yes else $as_nop ac_cv_lib_cdata_libcdata_array_append_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_append_entry" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_append_entry" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_append_entry" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_insert_entry in -lcdata" >&5 printf %s "checking for libcdata_array_insert_entry in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_insert_entry+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_insert_entry (); int main (void) { return libcdata_array_insert_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_insert_entry=yes else $as_nop ac_cv_lib_cdata_libcdata_array_insert_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_insert_entry" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_insert_entry" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_insert_entry" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_array_remove_entry in -lcdata" >&5 printf %s "checking for libcdata_array_remove_entry in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_array_remove_entry+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_array_remove_entry (); int main (void) { return libcdata_array_remove_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_array_remove_entry=yes else $as_nop ac_cv_lib_cdata_libcdata_array_remove_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_array_remove_entry" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_array_remove_entry" >&6; } if test "x$ac_cv_lib_cdata_libcdata_array_remove_entry" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_initialize in -lcdata" >&5 printf %s "checking for libcdata_btree_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_initialize (); int main (void) { return libcdata_btree_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_free in -lcdata" >&5 printf %s "checking for libcdata_btree_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_free (); int main (void) { return libcdata_btree_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_free=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_number_of_values in -lcdata" >&5 printf %s "checking for libcdata_btree_get_number_of_values in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_get_number_of_values+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_get_number_of_values (); int main (void) { return libcdata_btree_get_number_of_values (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_get_number_of_values=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_get_number_of_values=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_get_number_of_values" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_index in -lcdata" >&5 printf %s "checking for libcdata_btree_get_value_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_get_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_get_value_by_index (); int main (void) { return libcdata_btree_get_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_get_value_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_get_value_by_value in -lcdata" >&5 printf %s "checking for libcdata_btree_get_value_by_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_get_value_by_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_get_value_by_value (); int main (void) { return libcdata_btree_get_value_by_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_get_value_by_value=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_get_value_by_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_get_value_by_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_insert_value in -lcdata" >&5 printf %s "checking for libcdata_btree_insert_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_insert_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_insert_value (); int main (void) { return libcdata_btree_insert_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_insert_value=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_insert_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_insert_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_insert_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_insert_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_replace_value in -lcdata" >&5 printf %s "checking for libcdata_btree_replace_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_replace_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_replace_value (); int main (void) { return libcdata_btree_replace_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_replace_value=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_replace_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_replace_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_replace_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_replace_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_btree_remove_value in -lcdata" >&5 printf %s "checking for libcdata_btree_remove_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_btree_remove_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_btree_remove_value (); int main (void) { return libcdata_btree_remove_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_btree_remove_value=yes else $as_nop ac_cv_lib_cdata_libcdata_btree_remove_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_btree_remove_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_btree_remove_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_btree_remove_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_initialize in -lcdata" >&5 printf %s "checking for libcdata_list_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_initialize (); int main (void) { return libcdata_list_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_free in -lcdata" >&5 printf %s "checking for libcdata_list_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_free (); int main (void) { return libcdata_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_free=yes else $as_nop ac_cv_lib_cdata_libcdata_list_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_empty in -lcdata" >&5 printf %s "checking for libcdata_list_empty in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_empty+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_empty (); int main (void) { return libcdata_list_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_empty=yes else $as_nop ac_cv_lib_cdata_libcdata_list_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_empty" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_empty" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_empty" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_clone in -lcdata" >&5 printf %s "checking for libcdata_list_clone in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_clone+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_clone (); int main (void) { return libcdata_list_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_clone=yes else $as_nop ac_cv_lib_cdata_libcdata_list_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_clone" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_clone" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_clone" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_number_of_elements in -lcdata" >&5 printf %s "checking for libcdata_list_get_number_of_elements in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_get_number_of_elements+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_get_number_of_elements (); int main (void) { return libcdata_list_get_number_of_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_get_number_of_elements=yes else $as_nop ac_cv_lib_cdata_libcdata_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_get_number_of_elements" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_first_element in -lcdata" >&5 printf %s "checking for libcdata_list_get_first_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_get_first_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_get_first_element (); int main (void) { return libcdata_list_get_first_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_get_first_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_get_first_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_first_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_first_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_get_first_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_last_element in -lcdata" >&5 printf %s "checking for libcdata_list_get_last_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_get_last_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_get_last_element (); int main (void) { return libcdata_list_get_last_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_get_last_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_get_last_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_last_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_last_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_get_last_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_element_by_index in -lcdata" >&5 printf %s "checking for libcdata_list_get_element_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_get_element_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_get_element_by_index (); int main (void) { return libcdata_list_get_element_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_get_element_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_list_get_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_element_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_get_element_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_get_value_by_index in -lcdata" >&5 printf %s "checking for libcdata_list_get_value_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_get_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_get_value_by_index (); int main (void) { return libcdata_list_get_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_get_value_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_list_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_get_value_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_get_value_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_element in -lcdata" >&5 printf %s "checking for libcdata_list_prepend_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_prepend_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_prepend_element (); int main (void) { return libcdata_list_prepend_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_prepend_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_prepend_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_prepend_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_prepend_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_prepend_value in -lcdata" >&5 printf %s "checking for libcdata_list_prepend_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_prepend_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_prepend_value (); int main (void) { return libcdata_list_prepend_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_prepend_value=yes else $as_nop ac_cv_lib_cdata_libcdata_list_prepend_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_prepend_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_prepend_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_prepend_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_element in -lcdata" >&5 printf %s "checking for libcdata_list_append_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_append_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_append_element (); int main (void) { return libcdata_list_append_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_append_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_append_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_append_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_append_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_append_value in -lcdata" >&5 printf %s "checking for libcdata_list_append_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_append_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_append_value (); int main (void) { return libcdata_list_append_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_append_value=yes else $as_nop ac_cv_lib_cdata_libcdata_list_append_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_append_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_append_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_append_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element in -lcdata" >&5 printf %s "checking for libcdata_list_insert_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_insert_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_insert_element (); int main (void) { return libcdata_list_insert_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_insert_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_insert_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_insert_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_element_with_existing in -lcdata" >&5 printf %s "checking for libcdata_list_insert_element_with_existing in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_insert_element_with_existing+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_insert_element_with_existing (); int main (void) { return libcdata_list_insert_element_with_existing (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_insert_element_with_existing=yes else $as_nop ac_cv_lib_cdata_libcdata_list_insert_element_with_existing=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_insert_element_with_existing" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value in -lcdata" >&5 printf %s "checking for libcdata_list_insert_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_insert_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_insert_value (); int main (void) { return libcdata_list_insert_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_insert_value=yes else $as_nop ac_cv_lib_cdata_libcdata_list_insert_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_insert_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_insert_value_with_existing in -lcdata" >&5 printf %s "checking for libcdata_list_insert_value_with_existing in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_insert_value_with_existing+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_insert_value_with_existing (); int main (void) { return libcdata_list_insert_value_with_existing (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_insert_value_with_existing=yes else $as_nop ac_cv_lib_cdata_libcdata_list_insert_value_with_existing=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_insert_value_with_existing" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_remove_element in -lcdata" >&5 printf %s "checking for libcdata_list_remove_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_remove_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_remove_element (); int main (void) { return libcdata_list_remove_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_remove_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_remove_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_remove_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_remove_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_remove_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_initialize in -lcdata" >&5 printf %s "checking for libcdata_list_element_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_initialize (); int main (void) { return libcdata_list_element_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_free in -lcdata" >&5 printf %s "checking for libcdata_list_element_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_free (); int main (void) { return libcdata_list_element_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_free=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_value in -lcdata" >&5 printf %s "checking for libcdata_list_element_get_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_get_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_get_value (); int main (void) { return libcdata_list_element_get_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_get_value=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_get_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_value in -lcdata" >&5 printf %s "checking for libcdata_list_element_set_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_set_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_set_value (); int main (void) { return libcdata_list_element_set_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_set_value=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_set_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_previous_element in -lcdata" >&5 printf %s "checking for libcdata_list_element_get_previous_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_get_previous_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_get_previous_element (); int main (void) { return libcdata_list_element_get_previous_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_get_previous_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_previous_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_get_previous_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_previous_element in -lcdata" >&5 printf %s "checking for libcdata_list_element_set_previous_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_set_previous_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_set_previous_element (); int main (void) { return libcdata_list_element_set_previous_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_set_previous_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_previous_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_set_previous_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_next_element in -lcdata" >&5 printf %s "checking for libcdata_list_element_get_next_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_get_next_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_get_next_element (); int main (void) { return libcdata_list_element_get_next_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_get_next_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_next_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_next_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_get_next_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_next_element in -lcdata" >&5 printf %s "checking for libcdata_list_element_set_next_element in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_set_next_element+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_set_next_element (); int main (void) { return libcdata_list_element_set_next_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_set_next_element=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_next_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_next_element" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_set_next_element" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_get_elements in -lcdata" >&5 printf %s "checking for libcdata_list_element_get_elements in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_get_elements+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_get_elements (); int main (void) { return libcdata_list_element_get_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_get_elements=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_get_elements=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_get_elements" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_get_elements" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_get_elements" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_list_element_set_elements in -lcdata" >&5 printf %s "checking for libcdata_list_element_set_elements in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_list_element_set_elements+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_list_element_set_elements (); int main (void) { return libcdata_list_element_set_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_list_element_set_elements=yes else $as_nop ac_cv_lib_cdata_libcdata_list_element_set_elements=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_list_element_set_elements" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_list_element_set_elements" >&6; } if test "x$ac_cv_lib_cdata_libcdata_list_element_set_elements" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_initialize in -lcdata" >&5 printf %s "checking for libcdata_range_list_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_initialize (); int main (void) { return libcdata_range_list_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_free in -lcdata" >&5 printf %s "checking for libcdata_range_list_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_free (); int main (void) { return libcdata_range_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_free=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_empty in -lcdata" >&5 printf %s "checking for libcdata_range_list_empty in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_empty+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_empty (); int main (void) { return libcdata_range_list_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_empty=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_empty" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_empty" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_empty" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_clone in -lcdata" >&5 printf %s "checking for libcdata_range_list_clone in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_clone+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_clone (); int main (void) { return libcdata_range_list_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_clone=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_clone" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_clone" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_clone" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_number_of_elements in -lcdata" >&5 printf %s "checking for libcdata_range_list_get_number_of_elements in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_get_number_of_elements (); int main (void) { return libcdata_range_list_get_number_of_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_get_number_of_elements" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range in -lcdata" >&5 printf %s "checking for libcdata_range_list_insert_range in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_insert_range+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_insert_range (); int main (void) { return libcdata_range_list_insert_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_insert_range=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_insert_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_insert_range" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_insert_range_list in -lcdata" >&5 printf %s "checking for libcdata_range_list_insert_range_list in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_insert_range_list+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_insert_range_list (); int main (void) { return libcdata_range_list_insert_range_list (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_insert_range_list=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_insert_range_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_insert_range_list" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_remove_range in -lcdata" >&5 printf %s "checking for libcdata_range_list_remove_range in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_remove_range+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_remove_range (); int main (void) { return libcdata_range_list_remove_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_remove_range=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_remove_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_remove_range" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_remove_range" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_remove_range" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_by_index in -lcdata" >&5 printf %s "checking for libcdata_range_list_get_range_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_get_range_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_get_range_by_index (); int main (void) { return libcdata_range_list_get_range_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_get_range_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_range_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_range_at_offset in -lcdata" >&5 printf %s "checking for libcdata_range_list_get_range_at_offset in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_get_range_at_offset (); int main (void) { return libcdata_range_list_get_range_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_get_range_at_offset" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_is_present in -lcdata" >&5 printf %s "checking for libcdata_range_list_range_is_present in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_range_is_present+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_range_is_present (); int main (void) { return libcdata_range_list_range_is_present (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_range_is_present=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_range_is_present=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_range_is_present" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_range_is_present" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_range_has_overlapping_range in -lcdata" >&5 printf %s "checking for libcdata_range_list_range_has_overlapping_range in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_range_has_overlapping_range (); int main (void) { return libcdata_range_list_range_has_overlapping_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_range_has_overlapping_range" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_range_list_get_spanning_range in -lcdata" >&5 printf %s "checking for libcdata_range_list_get_spanning_range in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_range_list_get_spanning_range+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_range_list_get_spanning_range (); int main (void) { return libcdata_range_list_get_spanning_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_range_list_get_spanning_range=yes else $as_nop ac_cv_lib_cdata_libcdata_range_list_get_spanning_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" >&6; } if test "x$ac_cv_lib_cdata_libcdata_range_list_get_spanning_range" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_initialize in -lcdata" >&5 printf %s "checking for libcdata_tree_node_initialize in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_initialize (); int main (void) { return libcdata_tree_node_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_initialize=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_initialize" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_initialize" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_initialize" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_free in -lcdata" >&5 printf %s "checking for libcdata_tree_node_free in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_free (); int main (void) { return libcdata_tree_node_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_free=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_free" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_free" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_free" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_empty in -lcdata" >&5 printf %s "checking for libcdata_tree_node_empty in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_empty+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_empty (); int main (void) { return libcdata_tree_node_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_empty=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_empty" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_empty" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_empty" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_clone in -lcdata" >&5 printf %s "checking for libcdata_tree_node_clone in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_clone+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_clone (); int main (void) { return libcdata_tree_node_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_clone=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_clone" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_clone" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_clone" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_value in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_value (); int main (void) { return libcdata_tree_node_get_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_value=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_value in -lcdata" >&5 printf %s "checking for libcdata_tree_node_set_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_set_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_set_value (); int main (void) { return libcdata_tree_node_set_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_set_value=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_parent_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_parent_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_parent_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_parent_node (); int main (void) { return libcdata_tree_node_get_parent_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_parent_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_parent_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_parent_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_parent_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_set_parent_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_set_parent_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_set_parent_node (); int main (void) { return libcdata_tree_node_set_parent_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_set_parent_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_parent_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_parent_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_previous_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_previous_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_previous_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_previous_node (); int main (void) { return libcdata_tree_node_get_previous_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_previous_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_previous_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_previous_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_previous_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_set_previous_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_set_previous_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_set_previous_node (); int main (void) { return libcdata_tree_node_set_previous_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_set_previous_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_previous_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_previous_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_next_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_next_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_next_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_next_node (); int main (void) { return libcdata_tree_node_get_next_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_next_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_next_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_next_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_next_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_set_next_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_set_next_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_set_next_node (); int main (void) { return libcdata_tree_node_set_next_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_set_next_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_next_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_next_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_nodes in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_nodes in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_nodes+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_nodes (); int main (void) { return libcdata_tree_node_get_nodes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_nodes=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_nodes=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_nodes" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_set_nodes in -lcdata" >&5 printf %s "checking for libcdata_tree_node_set_nodes in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_set_nodes+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_set_nodes (); int main (void) { return libcdata_tree_node_set_nodes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_set_nodes=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_set_nodes=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_set_nodes" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_append_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_append_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_append_node (); int main (void) { return libcdata_tree_node_append_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_append_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_append_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_append_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_append_value in -lcdata" >&5 printf %s "checking for libcdata_tree_node_append_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_append_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_append_value (); int main (void) { return libcdata_tree_node_append_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_append_value=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_append_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_append_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_append_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_append_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_insert_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_insert_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_insert_node (); int main (void) { return libcdata_tree_node_insert_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_insert_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_insert_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_insert_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_insert_value in -lcdata" >&5 printf %s "checking for libcdata_tree_node_insert_value in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_insert_value+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_insert_value (); int main (void) { return libcdata_tree_node_insert_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_insert_value=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_insert_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_insert_value" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_insert_value" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_replace_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_replace_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_replace_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_replace_node (); int main (void) { return libcdata_tree_node_replace_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_replace_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_replace_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_replace_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_replace_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_remove_node in -lcdata" >&5 printf %s "checking for libcdata_tree_node_remove_node in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_remove_node+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_remove_node (); int main (void) { return libcdata_tree_node_remove_node (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_remove_node=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_remove_node=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_remove_node" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_remove_node" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_number_of_sub_nodes in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_number_of_sub_nodes (); int main (void) { return libcdata_tree_node_get_number_of_sub_nodes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_number_of_sub_nodes" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_sub_node_by_index in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_sub_node_by_index in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_sub_node_by_index (); int main (void) { return libcdata_tree_node_get_sub_node_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_sub_node_by_index" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcdata_tree_node_get_leaf_node_list in -lcdata" >&5 printf %s "checking for libcdata_tree_node_get_leaf_node_list in -lcdata... " >&6; } if test ${ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libcdata_tree_node_get_leaf_node_list (); int main (void) { return libcdata_tree_node_get_leaf_node_list (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list=yes else $as_nop ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&5 printf "%s\n" "$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" >&6; } if test "x$ac_cv_lib_cdata_libcdata_tree_node_get_leaf_node_list" = xyes then : ac_cv_libcdata_dummy=yes else $as_nop ac_cv_libcdata=no fi ac_cv_libcdata_LIBADD="-lcdata" fi fi if test "x$ac_cv_libcdata" != xyes && test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcdata in directory: $ac_cv_with_libcdata See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcdata" = xyes then : printf "%s\n" "#define HAVE_LIBCDATA 1" >>confdefs.h fi if test "x$ac_cv_libcdata" = xyes then : HAVE_LIBCDATA=1 else $as_nop HAVE_LIBCDATA=0 fi if test "x$ac_cv_libcdata" != xyes then : ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local printf "%s\n" "#define HAVE_LOCAL_LIBCDATA 1" >>confdefs.h HAVE_LOCAL_LIBCDATA=1 fi if test "x$ac_cv_libcdata" = xlocal; then HAVE_LOCAL_LIBCDATA_TRUE= HAVE_LOCAL_LIBCDATA_FALSE='#' else HAVE_LOCAL_LIBCDATA_TRUE='#' HAVE_LOCAL_LIBCDATA_FALSE= fi if test "x$ac_cv_libcdata_CPPFLAGS" != "x" then : LIBCDATA_CPPFLAGS=$ac_cv_libcdata_CPPFLAGS fi if test "x$ac_cv_libcdata_LIBADD" != "x" then : LIBCDATA_LIBADD=$ac_cv_libcdata_LIBADD fi if test "x$ac_cv_libcdata" = xyes then : ax_libcdata_pc_libs_private=-lcdata fi if test "x$ac_cv_libcdata" = xyes then : ax_libcdata_spec_requires=libcdata ax_libcdata_spec_build_requires=libcdata-devel fi # Check whether --with-libclocale was given. if test ${with_libclocale+y} then : withval=$with_libclocale; ac_cv_with_libclocale=$withval else $as_nop ac_cv_with_libclocale=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libclocale+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libclocale=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libclocale" >&5 printf "%s\n" "$ac_cv_with_libclocale" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libclocale" = xno then : ac_cv_libclocale=no else $as_nop ac_cv_libclocale=check if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libclocale See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale >= 20120425" >&5 printf %s "checking for libclocale >= 20120425... " >&6; } if test -n "$libclocale_CFLAGS"; then pkg_cv_libclocale_CFLAGS="$libclocale_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libclocale >= 20120425" 2>&1` else libclocale_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libclocale >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libclocale_PKG_ERRORS" >&5 ac_cv_libclocale=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libclocale=check else libclocale_CFLAGS=$pkg_cv_libclocale_CFLAGS libclocale_LIBS=$pkg_cv_libclocale_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libclocale=yes fi fi if test "x$ac_cv_libclocale" = xyes && test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 printf %s "checking whether libclocale/features.h defines LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } if test ${ac_cv_header_libclocale_features_h_have_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { #if !defined( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCLOCALE_HAVE_WIDE_CHARACTER_TYPE not defined #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_libclocale_features_h_have_wide_character_type=yes else $as_nop ac_cv_header_libclocale_features_h_have_wide_character_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libclocale_features_h_have_wide_character_type" >&5 printf "%s\n" "$ac_cv_header_libclocale_features_h_have_wide_character_type" >&6; } if test "x$ac_cv_header_libclocale_features_h_have_wide_character_type" = xno then : ac_cv_libclocale=no 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" fi fi if test "x$ac_cv_libclocale" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libclocale.h" "ac_cv_header_libclocale_h" "$ac_includes_default" if test "x$ac_cv_header_libclocale_h" = xyes then : printf "%s\n" "#define HAVE_LIBCLOCALE_H 1" >>confdefs.h fi if test "x$ac_cv_header_libclocale_h" = xno then : ac_cv_libclocale=no else $as_nop ac_cv_libclocale=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_get_version in -lclocale" >&5 printf %s "checking for libclocale_get_version in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_get_version (); int main (void) { return libclocale_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_clocale_libclocale_get_version=yes else $as_nop ac_cv_lib_clocale_libclocale_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage in -lclocale" >&5 printf %s "checking for libclocale_codepage in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_codepage+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_codepage (); int main (void) { return libclocale_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_clocale_libclocale_codepage=yes else $as_nop ac_cv_lib_clocale_libclocale_codepage=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage" >&5 printf "%s\n" "$ac_cv_lib_clocale_libclocale_codepage" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage" = xyes then : ac_cv_libclocale_dummy=yes else $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_get in -lclocale" >&5 printf %s "checking for libclocale_codepage_get in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_codepage_get+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_codepage_get (); int main (void) { return libclocale_codepage_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_clocale_libclocale_codepage_get=yes else $as_nop ac_cv_lib_clocale_libclocale_codepage_get=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_get" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_set in -lclocale" >&5 printf %s "checking for libclocale_codepage_set in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_codepage_set+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_codepage_set (); int main (void) { return libclocale_codepage_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_clocale_libclocale_codepage_set=yes else $as_nop ac_cv_lib_clocale_libclocale_codepage_set=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_set" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string in -lclocale" >&5 printf %s "checking for libclocale_codepage_copy_from_string in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_codepage_copy_from_string (); int main (void) { 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 $as_nop ac_cv_lib_clocale_libclocale_codepage_copy_from_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string_wide in -lclocale" >&5 printf %s "checking for libclocale_codepage_copy_from_string_wide in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_codepage_copy_from_string_wide (); int main (void) { 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 $as_nop ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_codepage in -lclocale" >&5 printf %s "checking for libclocale_locale_get_codepage in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_locale_get_codepage+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_locale_get_codepage (); int main (void) { 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 $as_nop ac_cv_lib_clocale_libclocale_locale_get_codepage=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_codepage" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_decimal_point in -lclocale" >&5 printf %s "checking for libclocale_locale_get_decimal_point in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_locale_get_decimal_point+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_locale_get_decimal_point (); int main (void) { 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 $as_nop ac_cv_lib_clocale_libclocale_locale_get_decimal_point=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&5 printf "%s\n" "$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 $as_nop ac_cv_libclocale=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libclocale_initialize in -lclocale" >&5 printf %s "checking for libclocale_initialize in -lclocale... " >&6; } if test ${ac_cv_lib_clocale_libclocale_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libclocale_initialize (); int main (void) { return libclocale_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_clocale_libclocale_initialize=yes else $as_nop ac_cv_lib_clocale_libclocale_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_initialize" >&5 printf "%s\n" "$ac_cv_lib_clocale_libclocale_initialize" >&6; } if test "x$ac_cv_lib_clocale_libclocale_initialize" = xyes then : ac_cv_libclocale_dummy=yes else $as_nop ac_cv_libclocale=no fi ac_cv_libclocale_LIBADD="-lclocale" fi fi if test "x$ac_cv_libclocale" != xyes && test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libclocale in directory: $ac_cv_with_libclocale See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libclocale" = xyes then : printf "%s\n" "#define HAVE_LIBCLOCALE 1" >>confdefs.h fi if test "x$ac_cv_libclocale" = xyes then : HAVE_LIBCLOCALE=1 else $as_nop HAVE_LIBCLOCALE=0 fi if test "x$ac_cv_libclocale" != xyes then : ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" if test "x$ac_cv_header_langinfo_h" = xyes then : printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes then : printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" if test "x$ac_cv_func_getenv" = xyes then : printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h fi if test "x$ac_cv_func_getenv" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" if test "x$ac_cv_func_localeconv" = xyes then : printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h fi if test "x$ac_cv_func_localeconv" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: localeconv See \`config.log' for more details" "$LINENO" 5; } fi fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes then : printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi if test "x$ac_cv_func_setlocale" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: setlocale See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes then : printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h fi if test "x$ac_cv_func_nl_langinfo" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo CODESET support" >&5 printf %s "checking for nl_langinfo CODESET support... " >&6; } if test ${ac_cv_cv_langinfo_codeset+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { char* charset = nl_langinfo( CODESET ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_cv_langinfo_codeset=yes else $as_nop ac_cv_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_langinfo_codeset" >&5 printf "%s\n" "$ac_cv_cv_langinfo_codeset" >&6; } else $as_nop ac_cv_cv_langinfo_codeset=no fi if test "x$ac_cv_cv_langinfo_codeset" = xyes then : printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi ac_cv_libclocale_CPPFLAGS="-I../libclocale -I\$(top_srcdir)/libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local printf "%s\n" "#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+y} then : withval=$with_libcnotify; ac_cv_with_libcnotify=$withval else $as_nop ac_cv_with_libcnotify=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libcnotify+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcnotify=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcnotify" >&5 printf "%s\n" "$ac_cv_with_libcnotify" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcnotify" = xno then : ac_cv_libcnotify=no else $as_nop ac_cv_libcnotify=check if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcnotify See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify >= 20120425" >&5 printf %s "checking for libcnotify >= 20120425... " >&6; } if test -n "$libcnotify_CFLAGS"; then pkg_cv_libcnotify_CFLAGS="$libcnotify_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libcnotify >= 20120425" 2>&1` else libcnotify_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcnotify >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcnotify_PKG_ERRORS" >&5 ac_cv_libcnotify=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcnotify=check else libcnotify_CFLAGS=$pkg_cv_libcnotify_CFLAGS libcnotify_LIBS=$pkg_cv_libcnotify_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libcnotify" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcnotify.h" "ac_cv_header_libcnotify_h" "$ac_includes_default" if test "x$ac_cv_header_libcnotify_h" = xyes then : printf "%s\n" "#define HAVE_LIBCNOTIFY_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcnotify_h" = xno then : ac_cv_libcnotify=no else $as_nop ac_cv_libcnotify=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_get_version in -lcnotify" >&5 printf %s "checking for libcnotify_get_version in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_get_version (); int main (void) { return libcnotify_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_get_version=yes else $as_nop ac_cv_lib_cnotify_libcnotify_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_printf in -lcnotify" >&5 printf %s "checking for libcnotify_printf in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_printf+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_printf (); int main (void) { return libcnotify_printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_printf=yes else $as_nop ac_cv_lib_cnotify_libcnotify_printf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_printf" >&5 printf "%s\n" "$ac_cv_lib_cnotify_libcnotify_printf" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_printf" = xyes then : ac_cv_libcnotify_dummy=yes else $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_data in -lcnotify" >&5 printf %s "checking for libcnotify_print_data in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_print_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_print_data (); int main (void) { return libcnotify_print_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_print_data=yes else $as_nop ac_cv_lib_cnotify_libcnotify_print_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_data" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_error_backtrace in -lcnotify" >&5 printf %s "checking for libcnotify_print_error_backtrace in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_print_error_backtrace+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_print_error_backtrace (); int main (void) { 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 $as_nop ac_cv_lib_cnotify_libcnotify_print_error_backtrace=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_set in -lcnotify" >&5 printf %s "checking for libcnotify_stream_set in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_stream_set+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_stream_set (); int main (void) { return libcnotify_stream_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_stream_set=yes else $as_nop ac_cv_lib_cnotify_libcnotify_stream_set=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_set" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_open in -lcnotify" >&5 printf %s "checking for libcnotify_stream_open in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_stream_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_stream_open (); int main (void) { return libcnotify_stream_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_stream_open=yes else $as_nop ac_cv_lib_cnotify_libcnotify_stream_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_close in -lcnotify" >&5 printf %s "checking for libcnotify_stream_close in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_stream_close+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_stream_close (); int main (void) { return libcnotify_stream_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_stream_close=yes else $as_nop ac_cv_lib_cnotify_libcnotify_stream_close=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_close" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcnotify_verbose_set in -lcnotify" >&5 printf %s "checking for libcnotify_verbose_set in -lcnotify... " >&6; } if test ${ac_cv_lib_cnotify_libcnotify_verbose_set+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcnotify_verbose_set (); int main (void) { return libcnotify_verbose_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cnotify_libcnotify_verbose_set=yes else $as_nop ac_cv_lib_cnotify_libcnotify_verbose_set=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_verbose_set" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcnotify=no fi ac_cv_libcnotify_LIBADD="-lcnotify" fi fi if test "x$ac_with_libcnotify" != xyes && test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcnotify in directory: $ac_cv_with_libcnotify See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcnotify" = xyes then : printf "%s\n" "#define HAVE_LIBCNOTIFY 1" >>confdefs.h fi if test "x$ac_cv_libcnotify" = xyes then : HAVE_LIBCNOTIFY=1 else $as_nop HAVE_LIBCNOTIFY=0 fi if test "x$ac_cv_libcnotify" != xyes then : ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" if test "x$ac_cv_header_varargs_h" = xyes then : printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h fi if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local printf "%s\n" "#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+y} then : withval=$with_libcsplit; ac_cv_with_libcsplit=$withval else $as_nop ac_cv_with_libcsplit=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libcsplit+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcsplit=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsplit" >&5 printf "%s\n" "$ac_cv_with_libcsplit" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcsplit" = xno then : ac_cv_libcsplit=no else $as_nop ac_cv_libcsplit=check if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcsplit See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit >= 20120701" >&5 printf %s "checking for libcsplit >= 20120701... " >&6; } if test -n "$libcsplit_CFLAGS"; then pkg_cv_libcsplit_CFLAGS="$libcsplit_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libcsplit >= 20120701" 2>&1` else libcsplit_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcsplit >= 20120701" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcsplit_PKG_ERRORS" >&5 ac_cv_libcsplit=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcsplit=check else libcsplit_CFLAGS=$pkg_cv_libcsplit_CFLAGS libcsplit_LIBS=$pkg_cv_libcsplit_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libcsplit=yes fi fi if test "x$ac_cv_libcsplit" = xyes && test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 printf %s "checking whether libcsplit/features.h defines LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } if test ${ac_cv_header_libcsplit_features_h_have_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { #if !defined( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCSPLIT_HAVE_WIDE_CHARACTER_TYPE not defined #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_libcsplit_features_h_have_wide_character_type=yes else $as_nop ac_cv_header_libcsplit_features_h_have_wide_character_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcsplit_features_h_have_wide_character_type" >&5 printf "%s\n" "$ac_cv_header_libcsplit_features_h_have_wide_character_type" >&6; } if test "x$ac_cv_header_libcsplit_features_h_have_wide_character_type" = xno then : ac_cv_libcsplit=no 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" fi fi if test "x$ac_cv_libcsplit" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcsplit.h" "ac_cv_header_libcsplit_h" "$ac_includes_default" if test "x$ac_cv_header_libcsplit_h" = xyes then : printf "%s\n" "#define HAVE_LIBCSPLIT_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcsplit_h" = xno then : ac_cv_libcsplit=no else $as_nop ac_cv_libcsplit=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_get_version in -lcsplit" >&5 printf %s "checking for libcsplit_get_version in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_get_version (); int main (void) { return libcsplit_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_csplit_libcsplit_get_version=yes else $as_nop ac_cv_lib_csplit_libcsplit_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_string_split in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_string_split in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_string_split+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_string_split (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_string_split=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_string_split" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_free in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_split_string_free in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_split_string_free (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_string in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_split_string_get_string in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_split_string_get_string (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_split_string_get_number_of_segments (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_split_string_get_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit" >&5 printf %s "checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_narrow_split_string_set_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_string_split in -lcsplit" >&5 printf %s "checking for libcsplit_wide_string_split in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_string_split+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_string_split (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_string_split=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_string_split" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_free in -lcsplit" >&5 printf %s "checking for libcsplit_wide_split_string_free in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_split_string_free (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_string in -lcsplit" >&5 printf %s "checking for libcsplit_wide_split_string_get_string in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_split_string_get_string (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit" >&5 printf %s "checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_split_string_get_number_of_segments (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit" >&5 printf %s "checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_split_string_get_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit" >&5 printf %s "checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit... " >&6; } if test ${ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcsplit_wide_split_string_set_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcsplit=no fi fi ac_cv_libcsplit_LIBADD="-lcsplit" fi fi if test "x$ac_cv_libcsplit" != xyes && test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xauto-detect && test "x$ac_cv_with_libcsplit" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcsplit in directory: $ac_cv_with_libcsplit See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcsplit" = xyes then : printf "%s\n" "#define HAVE_LIBCSPLIT 1" >>confdefs.h fi if test "x$ac_cv_libcsplit" = xyes then : HAVE_LIBCSPLIT=1 else $as_nop HAVE_LIBCSPLIT=0 fi if test "x$ac_cv_libcsplit" != xyes then : ac_cv_libcsplit_CPPFLAGS="-I../libcsplit -I\$(top_srcdir)/libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local printf "%s\n" "#define HAVE_LOCAL_LIBCSPLIT 1" >>confdefs.h HAVE_LOCAL_LIBCSPLIT=1 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+y} then : withval=$with_libuna; ac_cv_with_libuna=$withval else $as_nop ac_cv_with_libuna=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libuna+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libuna=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libuna" >&5 printf "%s\n" "$ac_cv_with_libuna" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libuna" = xno then : ac_cv_libuna=no else $as_nop ac_cv_libuna=check if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libuna See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna >= 20230702" >&5 printf %s "checking for libuna >= 20230702... " >&6; } if test -n "$libuna_CFLAGS"; then pkg_cv_libuna_CFLAGS="$libuna_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20230702\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20230702") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_CFLAGS=`$PKG_CONFIG --cflags "libuna >= 20230702" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20230702\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20230702") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_LIBS=`$PKG_CONFIG --libs "libuna >= 20230702" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libuna >= 20230702" 2>&1` else libuna_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libuna >= 20230702" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libuna_PKG_ERRORS" >&5 ac_cv_libuna=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libuna=check else libuna_CFLAGS=$pkg_cv_libuna_CFLAGS libuna_LIBS=$pkg_cv_libuna_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libuna" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libuna.h" "ac_cv_header_libuna_h" "$ac_includes_default" if test "x$ac_cv_header_libuna_h" = xyes then : printf "%s\n" "#define HAVE_LIBUNA_H 1" >>confdefs.h fi if test "x$ac_cv_header_libuna_h" = xno then : ac_cv_libuna=no else $as_nop ac_cv_libuna=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_get_version in -luna" >&5 printf %s "checking for libuna_get_version in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_get_version (); int main (void) { return libuna_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_get_version=yes else $as_nop ac_cv_lib_una_libuna_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base16_stream_size_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base16_stream_size_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base16_stream_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base16_stream_copy_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base16_stream_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base16_stream_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base16_stream_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base16_stream_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base16_stream_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna" >&5 printf %s "checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_quintuplet_copy_from_base32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna" >&5 printf %s "checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_quintuplet_copy_to_base32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_quintuplet_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_quintuplet_copy_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_stream_size_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_stream_size_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_stream_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_stream_copy_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_stream_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_stream_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_stream_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_stream_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base32_stream_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_base64_stream in -luna" >&5 printf %s "checking for libuna_base64_triplet_copy_from_base64_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_triplet_copy_from_base64_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_base64_stream in -luna" >&5 printf %s "checking for libuna_base64_triplet_copy_to_base64_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_triplet_copy_to_base64_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_triplet_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_triplet_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_triplet_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_triplet_copy_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_stream_size_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_stream_size_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_stream_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_stream_copy_to_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_stream_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_stream_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_stream_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_stream_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_base64_stream_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_byte_stream_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_byte_stream_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_byte_stream_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_byte_stream_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_byte_stream_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_byte_stream_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_byte_stream_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_byte_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_byte_stream (); int main (void) { return libuna_unicode_character_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_byte_stream (); int main (void) { return libuna_unicode_character_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_byte_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_byte_stream (); int main (void) { return libuna_unicode_character_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_ucs2 in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_ucs2 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_ucs2+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_ucs2 (); int main (void) { return libuna_unicode_character_size_to_ucs2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_ucs2=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_ucs2=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_ucs2" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_ucs2 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_ucs2 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_ucs2 (); int main (void) { return libuna_unicode_character_copy_from_ucs2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs2" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_ucs2 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_ucs2 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_ucs2 (); int main (void) { return libuna_unicode_character_copy_to_ucs2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs2" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_ucs4 in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_ucs4 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_ucs4+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_ucs4 (); int main (void) { return libuna_unicode_character_size_to_ucs4 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_ucs4=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_ucs4=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_ucs4" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_ucs4 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_ucs4 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_ucs4 (); int main (void) { return libuna_unicode_character_copy_from_ucs4 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_ucs4" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_ucs4 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_ucs4 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_ucs4 (); int main (void) { return libuna_unicode_character_copy_to_ucs4 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_ucs4" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf7_stream (); int main (void) { return libuna_unicode_character_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf7_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf7_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf7_stream (); int main (void) { return libuna_unicode_character_copy_to_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf7_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf8 in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_utf8 (); int main (void) { return libuna_unicode_character_size_to_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_utf8=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf8" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf8" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf8 (); int main (void) { return libuna_unicode_character_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf8=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf8 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf8 (); int main (void) { return libuna_unicode_character_copy_to_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf8=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf8_rfc2279 in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_utf8_rfc2279 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_utf8_rfc2279 (); int main (void) { return libuna_unicode_character_size_to_utf8_rfc2279 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf8_rfc2279" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf8_rfc2279 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf8_rfc2279 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf8_rfc2279 (); int main (void) { return libuna_unicode_character_copy_from_utf8_rfc2279 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf8_rfc2279" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf8_rfc2279 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf8_rfc2279 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf8_rfc2279 (); int main (void) { return libuna_unicode_character_copy_to_utf8_rfc2279 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf8_rfc2279" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_size_to_utf16 in -luna" >&5 printf %s "checking for libuna_unicode_character_size_to_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_size_to_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_size_to_utf16 (); int main (void) { return libuna_unicode_character_size_to_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_size_to_utf16=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_size_to_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_size_to_utf16" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_size_to_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_size_to_utf16" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf16 (); int main (void) { return libuna_unicode_character_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf16=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf16 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf16 (); int main (void) { return libuna_unicode_character_copy_to_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf16=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf16_stream (); int main (void) { return libuna_unicode_character_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf16_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf16_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf16_stream (); int main (void) { return libuna_unicode_character_copy_to_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf16_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf32 (); int main (void) { return libuna_unicode_character_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf32=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf32 in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf32 (); int main (void) { return libuna_unicode_character_copy_to_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf32=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_from_utf32_stream (); int main (void) { return libuna_unicode_character_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_from_utf32_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_unicode_character_copy_to_utf32_stream in -luna" >&5 printf %s "checking for libuna_unicode_character_copy_to_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_unicode_character_copy_to_utf32_stream (); int main (void) { return libuna_unicode_character_copy_to_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream=yes else $as_nop ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_unicode_character_copy_to_utf32_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf8_stream_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf8_stream_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_stream_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_stream_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_stream_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_stream_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_stream_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf16_stream_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf16_stream_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf16_stream_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf16_stream_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_stream_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_stream_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_stream_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf32_stream_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf32_stream_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf32_stream_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf32_stream_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf32_stream_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf32_stream_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_stream_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_byte_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_byte_stream (); int main (void) { return libuna_utf8_string_compare_with_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf7_stream (); int main (void) { return libuna_utf8_string_compare_with_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf7_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf8_stream (); int main (void) { return libuna_utf8_string_compare_with_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf8_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf16 in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf16 (); int main (void) { return libuna_utf8_string_compare_with_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf16=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf16_stream (); int main (void) { return libuna_utf8_string_compare_with_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf16_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf32 in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf32 (); int main (void) { return libuna_utf8_string_compare_with_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf32=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_compare_with_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_compare_with_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_compare_with_utf32_stream (); int main (void) { return libuna_utf8_string_compare_with_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_compare_with_utf32_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_size_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_size_from_scsu_stream (); int main (void) { return libuna_utf8_string_size_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_copy_from_scsu_stream (); int main (void) { return libuna_utf8_string_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf8_string_with_index_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf8_string_with_index_copy_from_scsu_stream (); int main (void) { return libuna_utf8_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_byte_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_byte_stream (); int main (void) { return libuna_utf16_string_compare_with_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_utf7_stream (); int main (void) { return libuna_utf16_string_compare_with_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf7_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_utf8_stream (); int main (void) { return libuna_utf16_string_compare_with_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf8_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_utf16_stream (); int main (void) { return libuna_utf16_string_compare_with_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf16_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf32 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf32 in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_utf32 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf32+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_utf32 (); int main (void) { return libuna_utf16_string_compare_with_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_utf32=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_utf32=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_compare_with_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_compare_with_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_compare_with_utf32_stream (); int main (void) { return libuna_utf16_string_compare_with_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_compare_with_utf32_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_size_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_size_from_scsu_stream (); int main (void) { return libuna_utf16_string_size_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_copy_from_scsu_stream (); int main (void) { return libuna_utf16_string_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf16_string_with_index_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf16_string_with_index_copy_from_scsu_stream (); int main (void) { return libuna_utf16_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_byte_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_compare_with_byte_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_compare_with_byte_stream (); int main (void) { return libuna_utf32_string_compare_with_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_byte_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_utf7_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf7_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_compare_with_utf7_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_compare_with_utf7_stream (); int main (void) { return libuna_utf32_string_compare_with_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf7_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8 in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf8 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf8 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8" >&5 printf %s "checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8... " >&6; } if test ${ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char ac_cv_libuna_dummy=yes (); int main (void) { return ac_cv_libuna_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=yes else $as_nop ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&5 printf "%s\n" "$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" >&6; } if test "x$ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy_yes" = xyes then : ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_utf8_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf8_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_compare_with_utf8_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_compare_with_utf8_stream (); int main (void) { return libuna_utf32_string_compare_with_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf8_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_utf16 (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_utf16_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf16_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_compare_with_utf16_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_compare_with_utf16_stream (); int main (void) { return libuna_utf32_string_compare_with_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf16_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_utf32_stream (); int main (void) { 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 $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_compare_with_utf32_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_compare_with_utf32_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_compare_with_utf32_stream (); int main (void) { return libuna_utf32_string_compare_with_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_compare_with_utf32_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_size_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_size_from_scsu_stream (); int main (void) { return libuna_utf32_string_size_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_copy_from_scsu_stream (); int main (void) { return libuna_utf32_string_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna" >&5 printf %s "checking for libuna_utf32_string_with_index_copy_from_scsu_stream in -luna... " >&6; } if test ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libuna_utf32_string_with_index_copy_from_scsu_stream (); int main (void) { return libuna_utf32_string_with_index_copy_from_scsu_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream=yes else $as_nop ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&5 printf "%s\n" "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_scsu_stream" = xyes then : ac_cv_libuna_dummy=yes else $as_nop ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_LESS' is defined" >&5 printf %s "checking if \`LIBUNA_COMPARE_LESS' is defined... " >&6; } if test ${ac_cv_libuna_defines_compare_less+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { int test = LIBUNA_COMPARE_LESS; return( 0 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_libuna_defines_compare_less=yes else $as_nop ac_cv_libuna_defines_compare_less=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_less" >&5 printf "%s\n" "$ac_cv_libuna_defines_compare_less" >&6; } if test "x$ac_cv_libuna_defines_compare_less" != xyes then : ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_EQUAL' is defined" >&5 printf %s "checking if \`LIBUNA_COMPARE_EQUAL' is defined... " >&6; } if test ${ac_cv_libuna_defines_compare_equal+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { int test = LIBUNA_COMPARE_EQUAL; return( 0 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_libuna_defines_compare_equal=yes else $as_nop ac_cv_libuna_defines_compare_equal=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_equal" >&5 printf "%s\n" "$ac_cv_libuna_defines_compare_equal" >&6; } if test "x$ac_cv_libuna_defines_compare_less" != xyes then : ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_COMPARE_GREATER' is defined" >&5 printf %s "checking if \`LIBUNA_COMPARE_GREATER' is defined... " >&6; } if test ${ac_cv_libuna_defines_compare_greater+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { int test = LIBUNA_COMPARE_GREATER; return( 0 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_libuna_defines_compare_greater=yes else $as_nop ac_cv_libuna_defines_compare_greater=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_greater" >&5 printf "%s\n" "$ac_cv_libuna_defines_compare_greater" >&6; } if test "x$ac_cv_libuna_defines_compare_less" != xyes then : ac_cv_libuna=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \`LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE' is defined" >&5 printf %s "checking if \`LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE' is defined... " >&6; } if test ${ac_cv_libuna_defines_compare_greater+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { int test = LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE; return( 0 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_libuna_defines_compare_greater=yes else $as_nop ac_cv_libuna_defines_compare_greater=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libuna_defines_compare_greater" >&5 printf "%s\n" "$ac_cv_libuna_defines_compare_greater" >&6; } if test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes then : ac_cv_libuna=no fi ac_cv_libuna_LIBADD="-luna" fi fi if test "x$ac_cv_libuna" != xyes && test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xauto-detect && test "x$ac_cv_with_libuna" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libuna in directory: $ac_cv_with_libuna See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libuna" = xyes then : printf "%s\n" "#define HAVE_LIBUNA 1" >>confdefs.h fi if test "x$ac_cv_libuna" = xyes then : HAVE_LIBUNA=1 else $as_nop HAVE_LIBUNA=0 fi if test "x$ac_cv_libuna" != xyes then : ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local printf "%s\n" "#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+y} then : withval=$with_libcfile; ac_cv_with_libcfile=$withval else $as_nop ac_cv_with_libcfile=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libcfile+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcfile=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcfile" >&5 printf "%s\n" "$ac_cv_with_libcfile" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcfile" = xno then : ac_cv_libcfile=no else $as_nop ac_cv_libcfile=check if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcfile See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile >= 20160409" >&5 printf %s "checking for libcfile >= 20160409... " >&6; } if test -n "$libcfile_CFLAGS"; then pkg_cv_libcfile_CFLAGS="$libcfile_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_CFLAGS=`$PKG_CONFIG --cflags "libcfile >= 20160409" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20160409\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20160409") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_LIBS=`$PKG_CONFIG --libs "libcfile >= 20160409" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libcfile >= 20160409" 2>&1` else libcfile_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcfile >= 20160409" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcfile_PKG_ERRORS" >&5 ac_cv_libcfile=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcfile=check else libcfile_CFLAGS=$pkg_cv_libcfile_CFLAGS libcfile_LIBS=$pkg_cv_libcfile_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libcfile=yes fi fi if test "x$ac_cv_libcfile" = xyes && test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 printf %s "checking whether libcfile/features.h defines LIBCFILE_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } if test ${ac_cv_header_libcfile_features_h_have_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { #if !defined( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCFILE_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCFILE_HAVE_WIDE_CHARACTER_TYPE not defined #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_libcfile_features_h_have_wide_character_type=yes else $as_nop ac_cv_header_libcfile_features_h_have_wide_character_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcfile_features_h_have_wide_character_type" >&5 printf "%s\n" "$ac_cv_header_libcfile_features_h_have_wide_character_type" >&6; } if test "x$ac_cv_header_libcfile_features_h_have_wide_character_type" = xno then : ac_cv_libcfile=no 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" fi fi if test "x$ac_cv_libcfile" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcfile.h" "ac_cv_header_libcfile_h" "$ac_includes_default" if test "x$ac_cv_header_libcfile_h" = xyes then : printf "%s\n" "#define HAVE_LIBCFILE_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcfile_h" = xno then : ac_cv_libcfile=no else $as_nop ac_cv_libcfile=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_get_version in -lcfile" >&5 printf %s "checking for libcfile_get_version in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_get_version (); int main (void) { return libcfile_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_get_version=yes else $as_nop ac_cv_lib_cfile_libcfile_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_initialize in -lcfile" >&5 printf %s "checking for libcfile_file_initialize in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_initialize (); int main (void) { return libcfile_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_initialize=yes else $as_nop ac_cv_lib_cfile_libcfile_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_free in -lcfile" >&5 printf %s "checking for libcfile_file_free in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_free (); int main (void) { return libcfile_file_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_free=yes else $as_nop ac_cv_lib_cfile_libcfile_file_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open in -lcfile" >&5 printf %s "checking for libcfile_file_open in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_open (); int main (void) { return libcfile_file_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_open=yes else $as_nop ac_cv_lib_cfile_libcfile_file_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_with_error_code in -lcfile" >&5 printf %s "checking for libcfile_file_open_with_error_code in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_open_with_error_code+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_open_with_error_code (); int main (void) { return libcfile_file_open_with_error_code (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_open_with_error_code=yes else $as_nop ac_cv_lib_cfile_libcfile_file_open_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open_with_error_code" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open_with_error_code" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_close in -lcfile" >&5 printf %s "checking for libcfile_file_close in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_close+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_close (); int main (void) { return libcfile_file_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_close=yes else $as_nop ac_cv_lib_cfile_libcfile_file_close=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_close" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer in -lcfile" >&5 printf %s "checking for libcfile_file_read_buffer in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_read_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_read_buffer (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer_with_error_code in -lcfile" >&5 printf %s "checking for libcfile_file_read_buffer_with_error_code in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_read_buffer_with_error_code (); int main (void) { return libcfile_file_read_buffer_with_error_code (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code=yes else $as_nop ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer_with_error_code" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer in -lcfile" >&5 printf %s "checking for libcfile_file_write_buffer in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_write_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_write_buffer (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer_with_error_code in -lcfile" >&5 printf %s "checking for libcfile_file_write_buffer_with_error_code in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_write_buffer_with_error_code (); int main (void) { return libcfile_file_write_buffer_with_error_code (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code=yes else $as_nop ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer_with_error_code" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_seek_offset in -lcfile" >&5 printf %s "checking for libcfile_file_seek_offset in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_seek_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_seek_offset (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_seek_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_resize in -lcfile" >&5 printf %s "checking for libcfile_file_resize in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_resize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_resize (); int main (void) { return libcfile_file_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_resize=yes else $as_nop ac_cv_lib_cfile_libcfile_file_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_resize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_open in -lcfile" >&5 printf %s "checking for libcfile_file_is_open in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_is_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_is_open (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_is_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_offset in -lcfile" >&5 printf %s "checking for libcfile_file_get_offset in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_get_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_get_offset (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_get_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_size in -lcfile" >&5 printf %s "checking for libcfile_file_get_size in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_get_size (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_device in -lcfile" >&5 printf %s "checking for libcfile_file_is_device in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_is_device+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_is_device (); int main (void) { return libcfile_file_is_device (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_is_device=yes else $as_nop ac_cv_lib_cfile_libcfile_file_is_device=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_device" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_is_device" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_is_device" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read in -lcfile" >&5 printf %s "checking for libcfile_file_io_control_read in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_io_control_read+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_io_control_read (); int main (void) { return libcfile_file_io_control_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_io_control_read=yes else $as_nop ac_cv_lib_cfile_libcfile_file_io_control_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_io_control_read" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_io_control_read_with_error_code in -lcfile" >&5 printf %s "checking for libcfile_file_io_control_read_with_error_code in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_io_control_read_with_error_code (); int main (void) { return libcfile_file_io_control_read_with_error_code (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code=yes else $as_nop ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_io_control_read_with_error_code" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide in -lcfile" >&5 printf %s "checking for libcfile_file_open_wide in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_open_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_open_wide (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_open_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide_with_error_code in -lcfile" >&5 printf %s "checking for libcfile_file_open_wide_with_error_code in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_open_wide_with_error_code (); int main (void) { return libcfile_file_open_wide_with_error_code (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code=yes else $as_nop ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open_wide_with_error_code" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists in -lcfile" >&5 printf %s "checking for libcfile_file_exists in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_exists+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_exists (); int main (void) { return libcfile_file_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_exists=yes else $as_nop ac_cv_lib_cfile_libcfile_file_exists=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove in -lcfile" >&5 printf %s "checking for libcfile_file_remove in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_remove+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_remove (); int main (void) { return libcfile_file_remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_remove=yes else $as_nop ac_cv_lib_cfile_libcfile_file_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_remove" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_remove" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists_wide in -lcfile" >&5 printf %s "checking for libcfile_file_exists_wide in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_exists_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_exists_wide (); int main (void) { 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 $as_nop ac_cv_lib_cfile_libcfile_file_exists_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcfile=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_remove_wide in -lcfile" >&5 printf %s "checking for libcfile_file_remove_wide in -lcfile... " >&6; } if test ${ac_cv_lib_cfile_libcfile_file_remove_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcfile_file_remove_wide (); int main (void) { return libcfile_file_remove_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cfile_libcfile_file_remove_wide=yes else $as_nop ac_cv_lib_cfile_libcfile_file_remove_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_remove_wide" >&5 printf "%s\n" "$ac_cv_lib_cfile_libcfile_file_remove_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_remove_wide" = xyes then : ac_cv_libcfile_dummy=yes else $as_nop ac_cv_libcfile=no fi fi ac_cv_libcfile_LIBADD="-lcfile" fi fi if test "x$ac_cv_libcfile" != xyes && test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcfile in directory: $ac_cv_with_libcfile See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcfile" = xyes then : printf "%s\n" "#define HAVE_LIBCFILE 1" >>confdefs.h fi if test "x$ac_cv_libcfile" = xyes then : HAVE_LIBCFILE=1 else $as_nop HAVE_LIBCFILE=0 fi if test "x$ac_cv_libcfile" != xyes then : ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes then : printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes then : printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "cygwin/fs.h" "ac_cv_header_cygwin_fs_h" "$ac_includes_default" if test "x$ac_cv_header_cygwin_fs_h" = xyes then : printf "%s\n" "#define HAVE_CYGWIN_FS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/fs.h" "ac_cv_header_linux_fs_h" "$ac_includes_default" if test "x$ac_cv_header_linux_fs_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_FS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/disk.h" "ac_cv_header_sys_disk_h" "$ac_includes_default" if test "x$ac_cv_header_sys_disk_h" = xyes then : printf "%s\n" "#define HAVE_SYS_DISK_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/disklabel.h" "ac_cv_header_sys_disklabel_h" "$ac_includes_default" if test "x$ac_cv_header_sys_disklabel_h" = xyes then : printf "%s\n" "#define HAVE_SYS_DISKLABEL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ioctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "close" "ac_cv_func_close" if test "x$ac_cv_func_close" = xyes then : printf "%s\n" "#define HAVE_CLOSE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat" if test "x$ac_cv_func_fstat" = xyes then : printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes then : printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl" if test "x$ac_cv_func_ioctl" = xyes then : printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "lseek" "ac_cv_func_lseek" if test "x$ac_cv_func_lseek" = xyes then : printf "%s\n" "#define HAVE_LSEEK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "open" "ac_cv_func_open" if test "x$ac_cv_func_open" = xyes then : printf "%s\n" "#define HAVE_OPEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "read" "ac_cv_func_read" if test "x$ac_cv_func_read" = xyes then : printf "%s\n" "#define HAVE_READ 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "write" "ac_cv_func_write" if test "x$ac_cv_func_write" = xyes then : printf "%s\n" "#define HAVE_WRITE 1" >>confdefs.h fi if test "x$ac_cv_func_close" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" if test "x$ac_cv_func_posix_fadvise" = xyes then : printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h fi if test "x$ac_cv_func_posix_fadvise" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_fadvise can be linked" >&5 printf %s "checking whether posix_fadvise can be linked... " >&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 (void) { #if !defined( POSIX_FADV_SEQUENTIAL ) #define POSIX_FADV_SEQUENTIAL 2 #endif posix_fadvise( 0, 0, 0, POSIX_FADV_SEQUENTIAL ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_posix_fadvise=yes else $as_nop ac_cv_func_posix_fadvise=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_func_posix_fadvise" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test "x$ac_cv_func_fstat" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_enable_winapi" = xno then : if test "x$ac_cv_func_ioctl" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ioctl See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_func_lseek" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: write See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" if test "x$ac_cv_func_stat" = xyes then : printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "unlink" "ac_cv_func_unlink" if test "x$ac_cv_func_unlink" = xyes then : printf "%s\n" "#define HAVE_UNLINK 1" >>confdefs.h fi if test "x$ac_cv_func_stat" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_unlink" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: unlink See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local printf "%s\n" "#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+y} then : withval=$with_libcpath; ac_cv_with_libcpath=$withval else $as_nop ac_cv_with_libcpath=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libcpath+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libcpath=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcpath" >&5 printf "%s\n" "$ac_cv_with_libcpath" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcpath" = xno then : ac_cv_libcpath=no else $as_nop ac_cv_libcpath=check if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libcpath See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath >= 20180716" >&5 printf %s "checking for libcpath >= 20180716... " >&6; } if test -n "$libcpath_CFLAGS"; then pkg_cv_libcpath_CFLAGS="$libcpath_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20180716") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_CFLAGS=`$PKG_CONFIG --cflags "libcpath >= 20180716" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20180716\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20180716") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_LIBS=`$PKG_CONFIG --libs "libcpath >= 20180716" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libcpath >= 20180716" 2>&1` else libcpath_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcpath >= 20180716" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcpath_PKG_ERRORS" >&5 ac_cv_libcpath=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libcpath=check else libcpath_CFLAGS=$pkg_cv_libcpath_CFLAGS libcpath_LIBS=$pkg_cv_libcpath_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libcpath=yes fi fi if test "x$ac_cv_libcpath" = xyes && test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 printf %s "checking whether libcpath/features.h defines LIBCPATH_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } if test ${ac_cv_header_libcpath_features_h_have_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { #if !defined( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBCPATH_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBCPATH_HAVE_WIDE_CHARACTER_TYPE not defined #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_libcpath_features_h_have_wide_character_type=yes else $as_nop ac_cv_header_libcpath_features_h_have_wide_character_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libcpath_features_h_have_wide_character_type" >&5 printf "%s\n" "$ac_cv_header_libcpath_features_h_have_wide_character_type" >&6; } if test "x$ac_cv_header_libcpath_features_h_have_wide_character_type" = xno then : ac_cv_libcpath=no 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" fi fi if test "x$ac_cv_libcpath" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libcpath.h" "ac_cv_header_libcpath_h" "$ac_includes_default" if test "x$ac_cv_header_libcpath_h" = xyes then : printf "%s\n" "#define HAVE_LIBCPATH_H 1" >>confdefs.h fi if test "x$ac_cv_header_libcpath_h" = xno then : ac_cv_libcpath=no else $as_nop ac_cv_libcpath=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_get_version in -lcpath" >&5 printf %s "checking for libcpath_get_version in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_get_version (); int main (void) { return libcpath_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_get_version=yes else $as_nop ac_cv_lib_cpath_libcpath_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory in -lcpath" >&5 printf %s "checking for libcpath_path_change_directory in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_change_directory+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_change_directory (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_change_directory=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory in -lcpath" >&5 printf %s "checking for libcpath_path_get_current_working_directory in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_current_working_directory (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_get_current_working_directory=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path in -lcpath" >&5 printf %s "checking for libcpath_path_get_full_path in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_full_path+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_full_path (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_get_full_path=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename in -lcpath" >&5 printf %s "checking for libcpath_path_get_sanitized_filename in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_sanitized_filename (); int main (void) { return libcpath_path_get_sanitized_filename (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_path_get_sanitized_filename=yes else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_filename=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&5 printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename" = xyes then : ac_cv_libcpath_dummy=yes else $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path in -lcpath" >&5 printf %s "checking for libcpath_path_get_sanitized_path in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_sanitized_path (); int main (void) { return libcpath_path_get_sanitized_path (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_path_get_sanitized_path=yes else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_path=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&5 printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path" = xyes then : ac_cv_libcpath_dummy=yes else $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join in -lcpath" >&5 printf %s "checking for libcpath_path_join in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_join+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_join (); int main (void) { return libcpath_path_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_path_join=yes else $as_nop ac_cv_lib_cpath_libcpath_path_join=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory in -lcpath" >&5 printf %s "checking for libcpath_path_make_directory in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_make_directory+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_make_directory (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_make_directory=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory_wide in -lcpath" >&5 printf %s "checking for libcpath_path_change_directory_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_change_directory_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_change_directory_wide (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_change_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory_wide in -lcpath" >&5 printf %s "checking for libcpath_path_get_current_working_directory_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_current_working_directory_wide (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path_wide in -lcpath" >&5 printf %s "checking for libcpath_path_get_full_path_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_full_path_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_full_path_wide (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_get_full_path_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_filename_wide in -lcpath" >&5 printf %s "checking for libcpath_path_get_sanitized_filename_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_sanitized_filename_wide (); int main (void) { return libcpath_path_get_sanitized_filename_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide=yes else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&5 printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_filename_wide" = xyes then : ac_cv_libcpath_dummy=yes else $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_sanitized_path_wide in -lcpath" >&5 printf %s "checking for libcpath_path_get_sanitized_path_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_get_sanitized_path_wide (); int main (void) { return libcpath_path_get_sanitized_path_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide=yes else $as_nop ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&5 printf "%s\n" "$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_sanitized_path_wide" = xyes then : ac_cv_libcpath_dummy=yes else $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join_wide in -lcpath" >&5 printf %s "checking for libcpath_path_join_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_join_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_join_wide (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_join_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory_wide in -lcpath" >&5 printf %s "checking for libcpath_path_make_directory_wide in -lcpath... " >&6; } if test ${ac_cv_lib_cpath_libcpath_path_make_directory_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libcpath_path_make_directory_wide (); int main (void) { 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 $as_nop ac_cv_lib_cpath_libcpath_path_make_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libcpath=no fi fi ac_cv_libcpath_LIBADD="-lcpath" fi fi if test "x$ac_cv_libcpath" != xyes && test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xauto-detect && test "x$ac_cv_with_libcpath" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libcpath in directory: $ac_cv_with_libcpath See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libcpath" = xyes then : printf "%s\n" "#define HAVE_LIBCPATH 1" >>confdefs.h fi if test "x$ac_cv_libcpath" = xyes then : HAVE_LIBCPATH=1 else $as_nop HAVE_LIBCPATH=0 fi if test "x$ac_cv_libcpath" != xyes then : ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes then : printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/syslimits.h" "ac_cv_header_sys_syslimits_h" "$ac_includes_default" if test "x$ac_cv_header_sys_syslimits_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SYSLIMITS_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "chdir" "ac_cv_func_chdir" if test "x$ac_cv_func_chdir" = xyes then : printf "%s\n" "#define HAVE_CHDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" if test "x$ac_cv_func_getcwd" = xyes then : printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h fi if test "x$ac_cv_func_chdir" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: getcwd See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes then : printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi if test "x$ac_cv_func_mkdir" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to use mkdir" >&5 printf %s "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 (void) { mkdir( "", 0 ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: with additional mode argument" >&5 printf "%s\n" "with additional mode argument" >&6; } ac_cv_cv_mkdir_mode=yes else $as_nop ac_cv_cv_mkdir_mode=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 (void) { mkdir( "" ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: with single argument" >&5 printf "%s\n" "with single argument" >&6; } ac_cv_cv_mkdir=yes else $as_nop ac_cv_cv_mkdir=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 printf "%s\n" "$as_me: WARNING: unknown" >&2;} ac_cv_func_mkdir=no fi if test "x$ac_cv_func_mkdir" = xyes then : printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi if test "x$ac_cv_cv_mkdir_mode" = xyes then : printf "%s\n" "#define HAVE_MKDIR_MODE 1" >>confdefs.h fi fi if test "x$ac_cv_func_mkdir" = xno then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 -I\$(top_srcdir)/libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local printf "%s\n" "#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+y} then : withval=$with_libbfio; ac_cv_with_libbfio=$withval else $as_nop ac_cv_with_libbfio=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libbfio+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libbfio=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libbfio" >&5 printf "%s\n" "$ac_cv_with_libbfio" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libbfio" = xno then : ac_cv_libbfio=no else $as_nop ac_cv_libbfio=check if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libbfio See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio >= 20201125" >&5 printf %s "checking for libbfio >= 20201125... " >&6; } if test -n "$libbfio_CFLAGS"; then pkg_cv_libbfio_CFLAGS="$libbfio_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20201125\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20201125") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_CFLAGS=`$PKG_CONFIG --cflags "libbfio >= 20201125" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20201125\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20201125") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_LIBS=`$PKG_CONFIG --libs "libbfio >= 20201125" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libbfio >= 20201125" 2>&1` else libbfio_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbfio >= 20201125" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libbfio_PKG_ERRORS" >&5 ac_cv_libbfio=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libbfio=check else libbfio_CFLAGS=$pkg_cv_libbfio_CFLAGS libbfio_LIBS=$pkg_cv_libbfio_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libbfio=yes fi fi if test "x$ac_cv_libbfio" = xyes && test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1" >&5 printf %s "checking whether libbfio/features.h defines LIBBFIO_HAVE_WIDE_CHARACTER_TYPE as 1... " >&6; } if test ${ac_cv_header_libbfio_features_h_have_wide_character_type+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { #if !defined( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE ) || ( LIBBFIO_HAVE_WIDE_CHARACTER_TYPE != 1 ) #error LIBBFIO_HAVE_WIDE_CHARACTER_TYPE not defined #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_libbfio_features_h_have_wide_character_type=yes else $as_nop ac_cv_header_libbfio_features_h_have_wide_character_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_libbfio_features_h_have_wide_character_type" >&5 printf "%s\n" "$ac_cv_header_libbfio_features_h_have_wide_character_type" >&6; } if test "x$ac_cv_header_libbfio_features_h_have_wide_character_type" = xno then : ac_cv_libbfio=no 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" fi fi if test "x$ac_cv_libbfio" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libbfio.h" "ac_cv_header_libbfio_h" "$ac_includes_default" if test "x$ac_cv_header_libbfio_h" = xyes then : printf "%s\n" "#define HAVE_LIBBFIO_H 1" >>confdefs.h fi if test "x$ac_cv_header_libbfio_h" = xno then : ac_cv_libbfio=no else $as_nop ac_cv_libbfio=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_get_version in -lbfio" >&5 printf %s "checking for libbfio_get_version in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_get_version (); int main (void) { return libbfio_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_get_version=yes else $as_nop ac_cv_lib_bfio_libbfio_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_free in -lbfio" >&5 printf %s "checking for libbfio_handle_free in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_free (); int main (void) { return libbfio_handle_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_free=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_open in -lbfio" >&5 printf %s "checking for libbfio_handle_open in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_open (); int main (void) { return libbfio_handle_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_open=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_close in -lbfio" >&5 printf %s "checking for libbfio_handle_close in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_close+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_close (); int main (void) { return libbfio_handle_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_close=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_close=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_close" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_exists in -lbfio" >&5 printf %s "checking for libbfio_handle_exists in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_exists+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_exists (); int main (void) { return libbfio_handle_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_exists=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_exists=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_exists" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer in -lbfio" >&5 printf %s "checking for libbfio_handle_read_buffer in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_read_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_read_buffer (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer_at_offset in -lbfio" >&5 printf %s "checking for libbfio_handle_read_buffer_at_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_read_buffer_at_offset (); int main (void) { return libbfio_handle_read_buffer_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer_at_offset" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer in -lbfio" >&5 printf %s "checking for libbfio_handle_write_buffer in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_write_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_write_buffer (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer_at_offset in -lbfio" >&5 printf %s "checking for libbfio_handle_write_buffer_at_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_write_buffer_at_offset (); int main (void) { return libbfio_handle_write_buffer_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset=yes else $as_nop ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer_at_offset" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_seek_offset in -lbfio" >&5 printf %s "checking for libbfio_handle_seek_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_seek_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_seek_offset (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_seek_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_is_open in -lbfio" >&5 printf %s "checking for libbfio_handle_is_open in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_is_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_is_open (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_is_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_is_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset in -lbfio" >&5 printf %s "checking for libbfio_handle_get_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_get_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_get_offset (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_get_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_size in -lbfio" >&5 printf %s "checking for libbfio_handle_get_size in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_get_size (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_set_track_offsets_read in -lbfio" >&5 printf %s "checking for libbfio_handle_set_track_offsets_read in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_set_track_offsets_read (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_number_of_offsets_read in -lbfio" >&5 printf %s "checking for libbfio_handle_get_number_of_offsets_read in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_get_number_of_offsets_read (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset_read in -lbfio" >&5 printf %s "checking for libbfio_handle_get_offset_read in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_handle_get_offset_read+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_handle_get_offset_read (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_handle_get_offset_read=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_initialize in -lbfio" >&5 printf %s "checking for libbfio_file_initialize in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_initialize (); int main (void) { return libbfio_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_file_initialize=yes else $as_nop ac_cv_lib_bfio_libbfio_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size in -lbfio" >&5 printf %s "checking for libbfio_file_get_name_size in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_get_name_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_get_name_size (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_get_name_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name in -lbfio" >&5 printf %s "checking for libbfio_file_get_name in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_get_name+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_get_name (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_get_name=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name in -lbfio" >&5 printf %s "checking for libbfio_file_set_name in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_set_name+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_set_name (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_set_name=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size_wide in -lbfio" >&5 printf %s "checking for libbfio_file_get_name_size_wide in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_get_name_size_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_get_name_size_wide (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_get_name_size_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_wide in -lbfio" >&5 printf %s "checking for libbfio_file_get_name_wide in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_get_name_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_get_name_wide (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_get_name_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name_wide in -lbfio" >&5 printf %s "checking for libbfio_file_set_name_wide in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_set_name_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_set_name_wide (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_file_set_name_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name_wide" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_initialize in -lbfio" >&5 printf %s "checking for libbfio_pool_initialize in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_initialize (); int main (void) { return libbfio_pool_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_initialize=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_free in -lbfio" >&5 printf %s "checking for libbfio_pool_free in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_free (); int main (void) { return libbfio_pool_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_free=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_clone in -lbfio" >&5 printf %s "checking for libbfio_pool_clone in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_clone (); int main (void) { return libbfio_pool_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_clone=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_clone" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_number_of_handles in -lbfio" >&5 printf %s "checking for libbfio_pool_get_number_of_handles in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_get_number_of_handles+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_get_number_of_handles (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_handle in -lbfio" >&5 printf %s "checking for libbfio_pool_get_handle in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_get_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_get_handle (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_get_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_handle" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_handle in -lbfio" >&5 printf %s "checking for libbfio_pool_set_handle in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_set_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_set_handle (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_set_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_handle" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_append_handle in -lbfio" >&5 printf %s "checking for libbfio_pool_append_handle in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_append_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_append_handle (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_append_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_append_handle" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_remove_handle in -lbfio" >&5 printf %s "checking for libbfio_pool_remove_handle in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_remove_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_remove_handle (); int main (void) { return libbfio_pool_remove_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_remove_handle=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_remove_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_remove_handle" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_remove_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_remove_handle" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio" >&5 printf %s "checking for libbfio_pool_get_maximum_number_of_open_handles in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_get_maximum_number_of_open_handles (); int main (void) { return libbfio_pool_get_maximum_number_of_open_handles (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_maximum_number_of_open_handles" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio" >&5 printf %s "checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_set_maximum_number_of_open_handles (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_open in -lbfio" >&5 printf %s "checking for libbfio_pool_open in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_open (); int main (void) { return libbfio_pool_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_open=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_open" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_reopen in -lbfio" >&5 printf %s "checking for libbfio_pool_reopen in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_reopen+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_reopen (); int main (void) { return libbfio_pool_reopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_reopen=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_reopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_reopen" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close in -lbfio" >&5 printf %s "checking for libbfio_pool_close in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_close+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_close (); int main (void) { return libbfio_pool_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_close=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_close=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close_all in -lbfio" >&5 printf %s "checking for libbfio_pool_close_all in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_close_all+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_close_all (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_close_all=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close_all" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer in -lbfio" >&5 printf %s "checking for libbfio_pool_read_buffer in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_read_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_read_buffer (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer_at_offset in -lbfio" >&5 printf %s "checking for libbfio_pool_read_buffer_at_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_read_buffer_at_offset (); int main (void) { return libbfio_pool_read_buffer_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer_at_offset" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer in -lbfio" >&5 printf %s "checking for libbfio_pool_write_buffer in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_write_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_write_buffer (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer_at_offset in -lbfio" >&5 printf %s "checking for libbfio_pool_write_buffer_at_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_write_buffer_at_offset (); int main (void) { return libbfio_pool_write_buffer_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset=yes else $as_nop ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer_at_offset" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_seek_offset in -lbfio" >&5 printf %s "checking for libbfio_pool_seek_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_seek_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_seek_offset (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_seek_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_offset in -lbfio" >&5 printf %s "checking for libbfio_pool_get_offset in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_get_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_get_offset (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_get_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_offset" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_size in -lbfio" >&5 printf %s "checking for libbfio_pool_get_size in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_pool_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_pool_get_size (); int main (void) { 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 $as_nop ac_cv_lib_bfio_libbfio_pool_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libbfio=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_pool_open in -lbfio" >&5 printf %s "checking for libbfio_file_pool_open in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_pool_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_pool_open (); int main (void) { return libbfio_file_pool_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_file_pool_open=yes else $as_nop ac_cv_lib_bfio_libbfio_file_pool_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_pool_open" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_pool_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_pool_open" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi if test "x$ac_cv_enable_wide_character_type" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_pool_open_wide in -lbfio" >&5 printf %s "checking for libbfio_file_pool_open_wide in -lbfio... " >&6; } if test ${ac_cv_lib_bfio_libbfio_file_pool_open_wide+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libbfio_file_pool_open_wide (); int main (void) { return libbfio_file_pool_open_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfio_libbfio_file_pool_open_wide=yes else $as_nop ac_cv_lib_bfio_libbfio_file_pool_open_wide=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_pool_open_wide" >&5 printf "%s\n" "$ac_cv_lib_bfio_libbfio_file_pool_open_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_pool_open_wide" = xyes then : ac_cv_libbfio_dummy=yes else $as_nop ac_cv_libbfio=no fi fi ac_cv_libbfio_LIBADD="-lbfio" fi fi if test "x$ac_cv_libbfio" != xyes && test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libbfio in directory: $ac_cv_with_libbfio See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libbfio" = xyes then : printf "%s\n" "#define HAVE_LIBBFIO 1" >>confdefs.h fi if test "x$ac_cv_libbfio" = xyes then : HAVE_LIBBFIO=1 else $as_nop HAVE_LIBBFIO=0 fi if test "x$ac_cv_libbfio" != xyes then : ac_cv_libbfio_CPPFLAGS="-I../libbfio -I\$(top_srcdir)/libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local printf "%s\n" "#define HAVE_LOCAL_LIBBFIO 1" >>confdefs.h HAVE_LOCAL_LIBBFIO=1 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+y} then : withval=$with_libfcache; ac_cv_with_libfcache=$withval else $as_nop ac_cv_with_libfcache=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfcache+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfcache=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfcache" >&5 printf "%s\n" "$ac_cv_with_libfcache" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfcache" = xno then : ac_cv_libfcache=no else $as_nop ac_cv_libfcache=check if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfcache See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache >= 20191109" >&5 printf %s "checking for libfcache >= 20191109... " >&6; } if test -n "$libfcache_CFLAGS"; then pkg_cv_libfcache_CFLAGS="$libfcache_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20191109") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_CFLAGS=`$PKG_CONFIG --cflags "libfcache >= 20191109" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20191109\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20191109") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_LIBS=`$PKG_CONFIG --libs "libfcache >= 20191109" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfcache >= 20191109" 2>&1` else libfcache_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfcache >= 20191109" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfcache_PKG_ERRORS" >&5 ac_cv_libfcache=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfcache=check else libfcache_CFLAGS=$pkg_cv_libfcache_CFLAGS libfcache_LIBS=$pkg_cv_libfcache_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfcache" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfcache.h" "ac_cv_header_libfcache_h" "$ac_includes_default" if test "x$ac_cv_header_libfcache_h" = xyes then : printf "%s\n" "#define HAVE_LIBFCACHE_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfcache_h" = xno then : ac_cv_libfcache=no else $as_nop ac_cv_libfcache=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_get_version in -lfcache" >&5 printf %s "checking for libfcache_get_version in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_get_version (); int main (void) { return libfcache_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_get_version=yes else $as_nop ac_cv_lib_fcache_libfcache_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_initialize in -lfcache" >&5 printf %s "checking for libfcache_cache_initialize in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_initialize (); int main (void) { return libfcache_cache_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_initialize=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_initialize" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_initialize" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_initialize" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_free in -lfcache" >&5 printf %s "checking for libfcache_cache_free in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_free (); int main (void) { return libfcache_cache_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_free=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_free" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_free" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_free" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clone in -lfcache" >&5 printf %s "checking for libfcache_cache_clone in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_clone (); int main (void) { return libfcache_cache_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_clone=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clone" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clone" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_clone" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear in -lfcache" >&5 printf %s "checking for libfcache_cache_clear in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_clear+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_clear (); int main (void) { return libfcache_cache_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_clear=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_clear=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clear" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_clear" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_entries in -lfcache" >&5 printf %s "checking for libfcache_cache_get_number_of_entries in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_get_number_of_entries+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_get_number_of_entries (); int main (void) { return libfcache_cache_get_number_of_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_get_number_of_entries=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_entries" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_number_of_cache_values in -lfcache" >&5 printf %s "checking for libfcache_cache_get_number_of_cache_values in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_get_number_of_cache_values (); int main (void) { return libfcache_cache_get_number_of_cache_values (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_get_number_of_cache_values" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_clear_value_by_index in -lfcache" >&5 printf %s "checking for libfcache_cache_clear_value_by_index in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_clear_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_clear_value_by_index (); int main (void) { return libfcache_cache_clear_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_clear_value_by_index=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_clear_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_clear_value_by_index" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_identifier in -lfcache" >&5 printf %s "checking for libfcache_cache_get_value_by_identifier in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_get_value_by_identifier (); int main (void) { return libfcache_cache_get_value_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_identifier" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_get_value_by_index in -lfcache" >&5 printf %s "checking for libfcache_cache_get_value_by_index in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_get_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_get_value_by_index (); int main (void) { return libfcache_cache_get_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_get_value_by_index=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_get_value_by_index" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_identifier in -lfcache" >&5 printf %s "checking for libfcache_cache_set_value_by_identifier in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_set_value_by_identifier (); int main (void) { return libfcache_cache_set_value_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_identifier" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_set_value_by_index in -lfcache" >&5 printf %s "checking for libfcache_cache_set_value_by_index in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_set_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_set_value_by_index (); int main (void) { return libfcache_cache_set_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_set_value_by_index=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_set_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_set_value_by_index" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_free in -lfcache" >&5 printf %s "checking for libfcache_cache_value_free in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_free (); int main (void) { return libfcache_cache_value_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_free=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_free" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_free" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_free" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_clear in -lfcache" >&5 printf %s "checking for libfcache_cache_value_clear in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_clear+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_clear (); int main (void) { return libfcache_cache_value_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_clear=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_clear=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_clear" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_clear" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_clear" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_identifier in -lfcache" >&5 printf %s "checking for libfcache_cache_value_get_identifier in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_get_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_get_identifier (); int main (void) { return libfcache_cache_value_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_get_identifier=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_identifier" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_identifier in -lfcache" >&5 printf %s "checking for libfcache_cache_value_set_identifier in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_set_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_set_identifier (); int main (void) { return libfcache_cache_value_set_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_set_identifier=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_set_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_identifier" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_get_value in -lfcache" >&5 printf %s "checking for libfcache_cache_value_get_value in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_get_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_get_value (); int main (void) { return libfcache_cache_value_get_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_get_value=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_get_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_get_value" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_get_value" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_get_value" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_cache_value_set_value in -lfcache" >&5 printf %s "checking for libfcache_cache_value_set_value in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_cache_value_set_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_cache_value_set_value (); int main (void) { return libfcache_cache_value_set_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_cache_value_set_value=yes else $as_nop ac_cv_lib_fcache_libfcache_cache_value_set_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_cache_value_set_value" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_cache_value_set_value" >&6; } if test "x$ac_cv_lib_fcache_libfcache_cache_value_set_value" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfcache_date_time_get_timestamp in -lfcache" >&5 printf %s "checking for libfcache_date_time_get_timestamp in -lfcache... " >&6; } if test ${ac_cv_lib_fcache_libfcache_date_time_get_timestamp+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfcache_date_time_get_timestamp (); int main (void) { return libfcache_date_time_get_timestamp (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fcache_libfcache_date_time_get_timestamp=yes else $as_nop ac_cv_lib_fcache_libfcache_date_time_get_timestamp=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&5 printf "%s\n" "$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" >&6; } if test "x$ac_cv_lib_fcache_libfcache_date_time_get_timestamp" = xyes then : ac_cv_libfcache_dummy=yes else $as_nop ac_cv_libfcache=no fi ac_cv_libfcache_LIBADD="-lfcache" fi fi if test "x$ac_cv_libfcache" != xyes && test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xauto-detect && test "x$ac_cv_with_libfcache" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfcache in directory: $ac_cv_with_libfcache See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfcache" = xyes then : printf "%s\n" "#define HAVE_LIBFCACHE 1" >>confdefs.h fi if test "x$ac_cv_libfcache" = xyes then : HAVE_LIBFCACHE=1 else $as_nop HAVE_LIBFCACHE=0 fi if test "x$ac_cv_libfcache" != xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "time" "ac_cv_func_time" if test "x$ac_cv_func_time" = xyes then : printf "%s\n" "#define HAVE_TIME 1" >>confdefs.h fi if test "x$ac_cv_func_time" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: time See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libfcache_CPPFLAGS="-I../libfcache -I\$(top_srcdir)/libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local printf "%s\n" "#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+y} then : withval=$with_libfdata; ac_cv_with_libfdata=$withval else $as_nop ac_cv_with_libfdata=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfdata+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfdata=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdata" >&5 printf "%s\n" "$ac_cv_with_libfdata" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdata" = xno then : ac_cv_libfdata=no else $as_nop ac_cv_libfdata=check if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfdata See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata >= 20201129" >&5 printf %s "checking for libfdata >= 20201129... " >&6; } if test -n "$libfdata_CFLAGS"; then pkg_cv_libfdata_CFLAGS="$libfdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20201129\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20201129") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_CFLAGS=`$PKG_CONFIG --cflags "libfdata >= 20201129" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20201129\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20201129") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_LIBS=`$PKG_CONFIG --libs "libfdata >= 20201129" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfdata >= 20201129" 2>&1` else libfdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdata >= 20201129" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdata_PKG_ERRORS" >&5 ac_cv_libfdata=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfdata=check else libfdata_CFLAGS=$pkg_cv_libfdata_CFLAGS libfdata_LIBS=$pkg_cv_libfdata_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfdata" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfdata.h" "ac_cv_header_libfdata_h" "$ac_includes_default" if test "x$ac_cv_header_libfdata_h" = xyes then : printf "%s\n" "#define HAVE_LIBFDATA_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfdata_h" = xno then : ac_cv_libfdata=no else $as_nop ac_cv_libfdata=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_get_version in -lfdata" >&5 printf %s "checking for libfdata_get_version in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_get_version (); int main (void) { return libfdata_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_get_version=yes else $as_nop ac_cv_lib_fdata_libfdata_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_initialize in -lfdata" >&5 printf %s "checking for libfdata_area_initialize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_initialize (); int main (void) { return libfdata_area_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_initialize=yes else $as_nop ac_cv_lib_fdata_libfdata_area_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_initialize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_initialize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_initialize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_free in -lfdata" >&5 printf %s "checking for libfdata_area_free in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_free (); int main (void) { return libfdata_area_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_free=yes else $as_nop ac_cv_lib_fdata_libfdata_area_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_free" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_free" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_free" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_clone in -lfdata" >&5 printf %s "checking for libfdata_area_clone in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_clone (); int main (void) { return libfdata_area_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_clone=yes else $as_nop ac_cv_lib_fdata_libfdata_area_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_clone" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_clone" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_clone" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_empty in -lfdata" >&5 printf %s "checking for libfdata_area_empty in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_empty+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_empty (); int main (void) { return libfdata_area_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_empty=yes else $as_nop ac_cv_lib_fdata_libfdata_area_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_empty" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_empty" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_empty" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_resize in -lfdata" >&5 printf %s "checking for libfdata_area_resize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_resize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_resize (); int main (void) { return libfdata_area_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_resize=yes else $as_nop ac_cv_lib_fdata_libfdata_area_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_resize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_resize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_resize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_number_of_segments in -lfdata" >&5 printf %s "checking for libfdata_area_get_number_of_segments in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_get_number_of_segments (); int main (void) { return libfdata_area_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_get_number_of_segments=yes else $as_nop ac_cv_lib_fdata_libfdata_area_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_get_number_of_segments" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_segment_by_index in -lfdata" >&5 printf %s "checking for libfdata_area_get_segment_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_get_segment_by_index (); int main (void) { return libfdata_area_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_get_segment_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_area_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_get_segment_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_segment_by_index in -lfdata" >&5 printf %s "checking for libfdata_area_set_segment_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_set_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_set_segment_by_index (); int main (void) { return libfdata_area_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_set_segment_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_area_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_set_segment_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_prepend_segment in -lfdata" >&5 printf %s "checking for libfdata_area_prepend_segment in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_prepend_segment+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_prepend_segment (); int main (void) { return libfdata_area_prepend_segment (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_prepend_segment=yes else $as_nop ac_cv_lib_fdata_libfdata_area_prepend_segment=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_prepend_segment" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_prepend_segment" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_prepend_segment" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_append_segment in -lfdata" >&5 printf %s "checking for libfdata_area_append_segment in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_append_segment+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_append_segment (); int main (void) { return libfdata_area_append_segment (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_append_segment=yes else $as_nop ac_cv_lib_fdata_libfdata_area_append_segment=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_append_segment" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_append_segment" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_append_segment" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_data_size in -lfdata" >&5 printf %s "checking for libfdata_area_get_element_data_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_get_element_data_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_get_element_data_size (); int main (void) { return libfdata_area_get_element_data_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_get_element_data_size=yes else $as_nop ac_cv_lib_fdata_libfdata_area_get_element_data_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_element_data_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_get_element_data_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_element_value_at_offset in -lfdata" >&5 printf %s "checking for libfdata_area_get_element_value_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_get_element_value_at_offset (); int main (void) { return libfdata_area_get_element_value_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_get_element_value_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_set_element_value_at_offset in -lfdata" >&5 printf %s "checking for libfdata_area_set_element_value_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_set_element_value_at_offset (); int main (void) { return libfdata_area_set_element_value_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_set_element_value_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_area_get_size in -lfdata" >&5 printf %s "checking for libfdata_area_get_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_area_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_area_get_size (); int main (void) { return libfdata_area_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_area_get_size=yes else $as_nop ac_cv_lib_fdata_libfdata_area_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_area_get_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_area_get_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_area_get_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_initialize in -lfdata" >&5 printf %s "checking for libfdata_list_initialize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_initialize (); int main (void) { return libfdata_list_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_initialize=yes else $as_nop ac_cv_lib_fdata_libfdata_list_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_initialize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_initialize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_initialize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_free in -lfdata" >&5 printf %s "checking for libfdata_list_free in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_free (); int main (void) { return libfdata_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_free=yes else $as_nop ac_cv_lib_fdata_libfdata_list_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_free" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_free" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_free" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_clone in -lfdata" >&5 printf %s "checking for libfdata_list_clone in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_clone (); int main (void) { return libfdata_list_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_clone=yes else $as_nop ac_cv_lib_fdata_libfdata_list_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_clone" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_clone" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_clone" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_empty in -lfdata" >&5 printf %s "checking for libfdata_list_empty in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_empty+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_empty (); int main (void) { return libfdata_list_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_empty=yes else $as_nop ac_cv_lib_fdata_libfdata_list_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_empty" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_empty" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_empty" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_resize in -lfdata" >&5 printf %s "checking for libfdata_list_resize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_resize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_resize (); int main (void) { return libfdata_list_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_resize=yes else $as_nop ac_cv_lib_fdata_libfdata_list_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_resize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_resize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_resize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_reverse in -lfdata" >&5 printf %s "checking for libfdata_list_reverse in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_reverse+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_reverse (); int main (void) { return libfdata_list_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_reverse=yes else $as_nop ac_cv_lib_fdata_libfdata_list_reverse=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_reverse" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_reverse" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_reverse" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_number_of_elements in -lfdata" >&5 printf %s "checking for libfdata_list_get_number_of_elements in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_number_of_elements+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_number_of_elements (); int main (void) { return libfdata_list_get_number_of_elements (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_number_of_elements=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_number_of_elements=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_number_of_elements" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_get_list_element_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_list_element_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_list_element_by_index (); int main (void) { return libfdata_list_get_list_element_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_list_element_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_list_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_by_index (); int main (void) { return libfdata_list_get_element_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_set_element_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_element_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_element_by_index (); int main (void) { return libfdata_list_set_element_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_element_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_prepend_element in -lfdata" >&5 printf %s "checking for libfdata_list_prepend_element in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_prepend_element+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_prepend_element (); int main (void) { return libfdata_list_prepend_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_prepend_element=yes else $as_nop ac_cv_lib_fdata_libfdata_list_prepend_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_prepend_element" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_prepend_element" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_prepend_element" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element in -lfdata" >&5 printf %s "checking for libfdata_list_append_element in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_append_element+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_append_element (); int main (void) { return libfdata_list_append_element (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_append_element=yes else $as_nop ac_cv_lib_fdata_libfdata_list_append_element=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_element" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_append_element" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_list in -lfdata" >&5 printf %s "checking for libfdata_list_append_list in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_append_list+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_append_list (); int main (void) { return libfdata_list_append_list (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_append_list=yes else $as_nop ac_cv_lib_fdata_libfdata_list_append_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_list" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_list" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_append_list" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_is_element_set in -lfdata" >&5 printf %s "checking for libfdata_list_is_element_set in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_is_element_set+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_is_element_set (); int main (void) { return libfdata_list_is_element_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_is_element_set=yes else $as_nop ac_cv_lib_fdata_libfdata_list_is_element_set=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_is_element_set" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_is_element_set" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_is_element_set" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_mapped_range in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_mapped_range in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_mapped_range+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_mapped_range (); int main (void) { return libfdata_list_get_element_mapped_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_mapped_range=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_mapped_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_mapped_range" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_offset in -lfdata" >&5 printf %s "checking for libfdata_list_get_mapped_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_mapped_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_mapped_offset (); int main (void) { return libfdata_list_get_mapped_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_mapped_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_mapped_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_offset in -lfdata" >&5 printf %s "checking for libfdata_list_set_mapped_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_mapped_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_mapped_offset (); int main (void) { return libfdata_list_set_mapped_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_mapped_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_mapped_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_mapped_size_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_get_mapped_size_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_mapped_size_by_index (); int main (void) { return libfdata_list_get_mapped_size_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_mapped_size_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_mapped_size_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_set_mapped_size_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_mapped_size_by_index (); int main (void) { return libfdata_list_set_mapped_size_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_mapped_size_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_by_index_with_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_by_index_with_mapped_size (); int main (void) { return libfdata_list_get_element_by_index_with_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_by_index_with_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_set_element_by_index_with_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_element_by_index_with_mapped_size (); int main (void) { return libfdata_list_set_element_by_index_with_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_element_by_index_with_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_append_element_with_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_append_element_with_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_append_element_with_mapped_size (); int main (void) { return libfdata_list_append_element_with_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_append_element_with_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_index_at_offset in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_index_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_index_at_offset (); int main (void) { return libfdata_list_get_element_index_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_index_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_list_element_at_offset in -lfdata" >&5 printf %s "checking for libfdata_list_get_list_element_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_list_element_at_offset (); int main (void) { return libfdata_list_get_list_element_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_list_element_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_at_offset in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_at_offset (); int main (void) { return libfdata_list_get_element_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_cache_element_value in -lfdata" >&5 printf %s "checking for libfdata_list_cache_element_value in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_cache_element_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_cache_element_value (); int main (void) { return libfdata_list_cache_element_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_cache_element_value=yes else $as_nop ac_cv_lib_fdata_libfdata_list_cache_element_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_cache_element_value" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_cache_element_value" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_cache_element_value" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_value_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_value_by_index (); int main (void) { return libfdata_list_get_element_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_value_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_element_value_at_offset in -lfdata" >&5 printf %s "checking for libfdata_list_get_element_value_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_element_value_at_offset (); int main (void) { return libfdata_list_get_element_value_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_element_value_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_by_index in -lfdata" >&5 printf %s "checking for libfdata_list_set_element_value_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_element_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_element_value_by_index (); int main (void) { return libfdata_list_set_element_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_element_value_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_set_element_value_at_offset in -lfdata" >&5 printf %s "checking for libfdata_list_set_element_value_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_set_element_value_at_offset (); int main (void) { return libfdata_list_set_element_value_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_set_element_value_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_get_size in -lfdata" >&5 printf %s "checking for libfdata_list_get_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_get_size (); int main (void) { return libfdata_list_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_get_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_get_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_get_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_get_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_get_mapped_size (); int main (void) { return libfdata_list_element_get_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_set_mapped_size (); int main (void) { return libfdata_list_element_set_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 printf %s "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_get_element_value (); int main (void) { return libfdata_list_element_get_element_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_get_element_value=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 printf %s "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_set_element_value (); int main (void) { return libfdata_list_element_set_element_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_set_element_value=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_element_get_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_get_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_get_mapped_size (); int main (void) { return libfdata_list_element_get_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_get_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_list_element_set_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_set_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_set_mapped_size (); int main (void) { return libfdata_list_element_set_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_set_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_get_element_value in -lfdata" >&5 printf %s "checking for libfdata_list_element_get_element_value in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_get_element_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_get_element_value (); int main (void) { return libfdata_list_element_get_element_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_get_element_value=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_get_element_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_get_element_value" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_get_element_value" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_list_element_set_element_value in -lfdata" >&5 printf %s "checking for libfdata_list_element_set_element_value in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_list_element_set_element_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_list_element_set_element_value (); int main (void) { return libfdata_list_element_set_element_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_list_element_set_element_value=yes else $as_nop ac_cv_lib_fdata_libfdata_list_element_set_element_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_list_element_set_element_value" >&6; } if test "x$ac_cv_lib_fdata_libfdata_list_element_set_element_value" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_initialize in -lfdata" >&5 printf %s "checking for libfdata_stream_initialize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_initialize (); int main (void) { return libfdata_stream_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_initialize=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_initialize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_initialize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_initialize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_free in -lfdata" >&5 printf %s "checking for libfdata_stream_free in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_free (); int main (void) { return libfdata_stream_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_free=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_free" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_free" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_free" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_clone in -lfdata" >&5 printf %s "checking for libfdata_stream_clone in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_clone (); int main (void) { return libfdata_stream_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_clone=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_clone" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_clone" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_clone" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_empty in -lfdata" >&5 printf %s "checking for libfdata_stream_empty in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_empty+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_empty (); int main (void) { return libfdata_stream_empty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_empty=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_empty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_empty" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_empty" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_empty" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_resize in -lfdata" >&5 printf %s "checking for libfdata_stream_resize in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_resize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_resize (); int main (void) { return libfdata_stream_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_resize=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_resize" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_resize" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_resize" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_reverse in -lfdata" >&5 printf %s "checking for libfdata_stream_reverse in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_reverse+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_reverse (); int main (void) { return libfdata_stream_reverse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_reverse=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_reverse=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_reverse" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_reverse" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_reverse" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_number_of_segments in -lfdata" >&5 printf %s "checking for libfdata_stream_get_number_of_segments in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_number_of_segments (); int main (void) { return libfdata_stream_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_number_of_segments=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_number_of_segments" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_by_index in -lfdata" >&5 printf %s "checking for libfdata_stream_get_segment_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_segment_by_index (); int main (void) { return libfdata_stream_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_segment_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_segment_by_index in -lfdata" >&5 printf %s "checking for libfdata_stream_set_segment_by_index in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_set_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_set_segment_by_index (); int main (void) { return libfdata_stream_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_set_segment_by_index=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_set_segment_by_index" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_prepend_segment in -lfdata" >&5 printf %s "checking for libfdata_stream_prepend_segment in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_prepend_segment+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_prepend_segment (); int main (void) { return libfdata_stream_prepend_segment (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_prepend_segment=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_prepend_segment=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_prepend_segment" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_prepend_segment" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_append_segment in -lfdata" >&5 printf %s "checking for libfdata_stream_append_segment in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_append_segment+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_append_segment (); int main (void) { return libfdata_stream_append_segment (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_append_segment=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_append_segment=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_append_segment" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_append_segment" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_append_segment" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_set_mapped_size in -lfdata" >&5 printf %s "checking for libfdata_stream_set_mapped_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_set_mapped_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_set_mapped_size (); int main (void) { return libfdata_stream_set_mapped_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_set_mapped_size=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_set_mapped_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_set_mapped_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_mapped_range in -lfdata" >&5 printf %s "checking for libfdata_stream_get_segment_mapped_range in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_segment_mapped_range (); int main (void) { return libfdata_stream_get_segment_mapped_range (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_mapped_range" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_index_at_offset in -lfdata" >&5 printf %s "checking for libfdata_stream_get_segment_index_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_segment_index_at_offset (); int main (void) { return libfdata_stream_get_segment_index_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_index_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_segment_at_offset in -lfdata" >&5 printf %s "checking for libfdata_stream_get_segment_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_segment_at_offset (); int main (void) { return libfdata_stream_get_segment_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_segment_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer in -lfdata" >&5 printf %s "checking for libfdata_stream_read_buffer in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_read_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_read_buffer (); int main (void) { return libfdata_stream_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_read_buffer=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_read_buffer" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_read_buffer_at_offset in -lfdata" >&5 printf %s "checking for libfdata_stream_read_buffer_at_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_read_buffer_at_offset (); int main (void) { return libfdata_stream_read_buffer_at_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_read_buffer_at_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_write_buffer in -lfdata" >&5 printf %s "checking for libfdata_stream_write_buffer in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_write_buffer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_write_buffer (); int main (void) { return libfdata_stream_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_write_buffer=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_write_buffer" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_write_buffer" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_write_buffer" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_seek_offset in -lfdata" >&5 printf %s "checking for libfdata_stream_seek_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_seek_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_seek_offset (); int main (void) { return libfdata_stream_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_seek_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_seek_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_seek_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_seek_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_offset in -lfdata" >&5 printf %s "checking for libfdata_stream_get_offset in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_offset+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_offset (); int main (void) { return libfdata_stream_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_offset=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_offset=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_offset" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_offset" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_offset" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdata_stream_get_size in -lfdata" >&5 printf %s "checking for libfdata_stream_get_size in -lfdata... " >&6; } if test ${ac_cv_lib_fdata_libfdata_stream_get_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdata_stream_get_size (); int main (void) { return libfdata_stream_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdata_libfdata_stream_get_size=yes else $as_nop ac_cv_lib_fdata_libfdata_stream_get_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_stream_get_size" >&5 printf "%s\n" "$ac_cv_lib_fdata_libfdata_stream_get_size" >&6; } if test "x$ac_cv_lib_fdata_libfdata_stream_get_size" = xyes then : ac_cv_libfdata_dummy=yes else $as_nop ac_cv_libfdata=no fi ac_cv_libfdata_LIBADD="-lfdata" fi fi if test "x$ac_cv_libfdata" != xyes && test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xauto-detect && test "x$ac_cv_with_libfdata" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfdata in directory: $ac_cv_with_libfdata See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfdata" = xyes then : printf "%s\n" "#define HAVE_LIBFDATA 1" >>confdefs.h fi if test "x$ac_cv_libfdata" = xyes then : HAVE_LIBFDATA=1 else $as_nop HAVE_LIBFDATA=0 fi if test "x$ac_cv_libfdata" != xyes then : ac_cv_libfdata_CPPFLAGS="-I../libfdata -I\$(top_srcdir)/libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local printf "%s\n" "#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+y} then : withval=$with_libfdatetime; ac_cv_with_libfdatetime=$withval else $as_nop ac_cv_with_libfdatetime=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfdatetime+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfdatetime=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdatetime" >&5 printf "%s\n" "$ac_cv_with_libfdatetime" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfdatetime" = xno then : ac_cv_libfdatetime=no else $as_nop ac_cv_libfdatetime=check if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfdatetime See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime >= 20180910" >&5 printf %s "checking for libfdatetime >= 20180910... " >&6; } if test -n "$libfdatetime_CFLAGS"; then pkg_cv_libfdatetime_CFLAGS="$libfdatetime_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20180910") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_CFLAGS=`$PKG_CONFIG --cflags "libfdatetime >= 20180910" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20180910\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20180910") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_LIBS=`$PKG_CONFIG --libs "libfdatetime >= 20180910" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfdatetime >= 20180910" 2>&1` else libfdatetime_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfdatetime >= 20180910" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdatetime_PKG_ERRORS" >&5 ac_cv_libfdatetime=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfdatetime=check else libfdatetime_CFLAGS=$pkg_cv_libfdatetime_CFLAGS libfdatetime_LIBS=$pkg_cv_libfdatetime_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfdatetime" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfdatetime.h" "ac_cv_header_libfdatetime_h" "$ac_includes_default" if test "x$ac_cv_header_libfdatetime_h" = xyes then : printf "%s\n" "#define HAVE_LIBFDATETIME_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfdatetime_h" = xno then : ac_cv_libfdatetime=no else $as_nop ac_cv_libfdatetime=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_get_version in -lfdatetime" >&5 printf %s "checking for libfdatetime_get_version in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_get_version (); int main (void) { return libfdatetime_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_get_version=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_initialize (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_free (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_from_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_from_32bit (); int main (void) { return libfdatetime_fat_date_time_copy_from_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_32bit (); int main (void) { return libfdatetime_fat_date_time_copy_to_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop 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.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop 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.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop 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.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_initialize (); int main (void) { return libfdatetime_filetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_free (); int main (void) { return libfdatetime_filetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_filetime_free=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_from_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_from_64bit (); int main (void) { return libfdatetime_filetime_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_64bit (); int main (void) { return libfdatetime_filetime_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_add in -lfdatetime" >&5 printf %s "checking for libfdatetime_filetime_add in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_filetime_add+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_filetime_add (); int main (void) { return libfdatetime_filetime_add (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_filetime_add=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_filetime_add=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_initialize (); int main (void) { return libfdatetime_floatingtime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_free (); int main (void) { return libfdatetime_floatingtime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_from_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_from_64bit (); int main (void) { return libfdatetime_floatingtime_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_64bit (); int main (void) { return libfdatetime_floatingtime_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_floatingtime_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_initialize (); int main (void) { return libfdatetime_hfs_time_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_initialize" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_free (); int main (void) { return libfdatetime_hfs_time_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_free=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_free" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_from_byte_stream (); int main (void) { return libfdatetime_hfs_time_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_byte_stream" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_from_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_from_32bit (); int main (void) { return libfdatetime_hfs_time_copy_from_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_from_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_32bit (); int main (void) { return libfdatetime_hfs_time_copy_to_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf8_string (); int main (void) { return libfdatetime_hfs_time_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf8_string_with_index (); int main (void) { return libfdatetime_hfs_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf8_string_with_index" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf16_string (); int main (void) { return libfdatetime_hfs_time_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf16_string_with_index (); int main (void) { return libfdatetime_hfs_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf16_string_with_index" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf32_string (); int main (void) { return libfdatetime_hfs_time_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_hfs_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_hfs_time_copy_to_utf32_string_with_index (); int main (void) { return libfdatetime_hfs_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_hfs_time_copy_to_utf32_string_with_index" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_initialize (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_free (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_from_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_from_64bit (); int main (void) { return libfdatetime_nsf_timedate_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_64bit (); int main (void) { return libfdatetime_nsf_timedate_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_initialize (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_free (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_from_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_from_32bit (); int main (void) { return libfdatetime_posix_time_copy_from_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_32bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_32bit (); int main (void) { return libfdatetime_posix_time_copy_to_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_32bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_from_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_from_64bit (); int main (void) { return libfdatetime_posix_time_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_64bit in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_64bit (); int main (void) { return libfdatetime_posix_time_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&5 printf "%s\n" "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_64bit" = xyes then : ac_cv_libfdatetime_dummy=yes else $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_posix_time_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_initialize in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_initialize in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_initialize (); int main (void) { return libfdatetime_systemetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_free in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_free in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_free (); int main (void) { return libfdatetime_systemetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fdatetime_libfdatetime_systemetime_free=yes else $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 printf %s "checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if test ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfdatetime_systemetime_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfdatetime=no fi ac_cv_libfdatetime_LIBADD="-lfdatetime" fi fi if test "x$ac_cv_libfdatetime" != xyes && test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xauto-detect && test "x$ac_cv_with_libfdatetime" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfdatetime in directory: $ac_cv_with_libfdatetime See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfdatetime" = xyes then : printf "%s\n" "#define HAVE_LIBFDATETIME 1" >>confdefs.h fi if test "x$ac_cv_libfdatetime" = xyes then : HAVE_LIBFDATETIME=1 else $as_nop HAVE_LIBFDATETIME=0 fi if test "x$ac_cv_libfdatetime" != xyes then : ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime -I\$(top_srcdir)/libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local printf "%s\n" "#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+y} then : withval=$with_libfguid; ac_cv_with_libfguid=$withval else $as_nop ac_cv_with_libfguid=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfguid+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfguid=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfguid" >&5 printf "%s\n" "$ac_cv_with_libfguid" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfguid" = xno then : ac_cv_libfguid=no else $as_nop ac_cv_libfguid=check if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfguid See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid >= 20120426" >&5 printf %s "checking for libfguid >= 20120426... " >&6; } if test -n "$libfguid_CFLAGS"; then pkg_cv_libfguid_CFLAGS="$libfguid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? printf "%s\n" "$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` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfguid >= 20120426" 2>&1` else libfguid_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfguid >= 20120426" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfguid_PKG_ERRORS" >&5 ac_cv_libfguid=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfguid=check else libfguid_CFLAGS=$pkg_cv_libfguid_CFLAGS libfguid_LIBS=$pkg_cv_libfguid_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfguid" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfguid.h" "ac_cv_header_libfguid_h" "$ac_includes_default" if test "x$ac_cv_header_libfguid_h" = xyes then : printf "%s\n" "#define HAVE_LIBFGUID_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfguid_h" = xno then : ac_cv_libfguid=no else $as_nop ac_cv_libfguid=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_get_version in -lfguid" >&5 printf %s "checking for libfguid_get_version in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_get_version (); int main (void) { return libfguid_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fguid_libfguid_get_version=yes else $as_nop ac_cv_lib_fguid_libfguid_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_initialize in -lfguid" >&5 printf %s "checking for libfguid_identifier_initialize in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_initialize (); int main (void) { return libfguid_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fguid_libfguid_identifier_initialize=yes else $as_nop ac_cv_lib_fguid_libfguid_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_free in -lfguid" >&5 printf %s "checking for libfguid_identifier_free in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_free (); int main (void) { return libfguid_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fguid_libfguid_identifier_free=yes else $as_nop ac_cv_lib_fguid_libfguid_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_from_byte_stream in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_from_byte_stream in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_from_byte_stream (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_get_string_size in -lfguid" >&5 printf %s "checking for libfguid_identifier_get_string_size in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_get_string_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_get_string_size (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_get_string_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf8_string in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf8_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf16_string in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf16_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf32_string in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf32_string (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid" >&5 printf %s "checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid... " >&6; } if test ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfguid_identifier_copy_to_utf32_string_with_index (); int main (void) { 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 $as_nop ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfguid=no fi ac_cv_libfguid_LIBADD="-lfguid" fi fi if test "x$ac_cv_libfguid" != xyes && test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xauto-detect && test "x$ac_cv_with_libfguid" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfguid in directory: $ac_cv_with_libfguid See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfguid" = xyes then : printf "%s\n" "#define HAVE_LIBFGUID 1" >>confdefs.h fi if test "x$ac_cv_libfguid" = xyes then : HAVE_LIBFGUID=1 else $as_nop HAVE_LIBFGUID=0 fi if test "x$ac_cv_libfguid" != xyes then : ac_cv_libfguid_CPPFLAGS="-I../libfguid -I\$(top_srcdir)/libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local printf "%s\n" "#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+y} then : withval=$with_libfvalue; ac_cv_with_libfvalue=$withval else $as_nop ac_cv_with_libfvalue=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfvalue+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfvalue=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfvalue" >&5 printf "%s\n" "$ac_cv_with_libfvalue" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfvalue" = xno then : ac_cv_libfvalue=no else $as_nop ac_cv_libfvalue=check if test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfvalue See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue >= 20200711" >&5 printf %s "checking for libfvalue >= 20200711... " >&6; } if test -n "$libfvalue_CFLAGS"; then pkg_cv_libfvalue_CFLAGS="$libfvalue_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20200711\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20200711") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_CFLAGS=`$PKG_CONFIG --cflags "libfvalue >= 20200711" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20200711\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20200711") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_LIBS=`$PKG_CONFIG --libs "libfvalue >= 20200711" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfvalue >= 20200711" 2>&1` else libfvalue_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfvalue >= 20200711" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfvalue_PKG_ERRORS" >&5 ac_cv_libfvalue=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfvalue=check else libfvalue_CFLAGS=$pkg_cv_libfvalue_CFLAGS libfvalue_LIBS=$pkg_cv_libfvalue_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfvalue" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfvalue.h" "ac_cv_header_libfvalue_h" "$ac_includes_default" if test "x$ac_cv_header_libfvalue_h" = xyes then : printf "%s\n" "#define HAVE_LIBFVALUE_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfvalue_h" = xno then : ac_cv_libfvalue=no else $as_nop ac_cv_libfvalue=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_get_version in -lfvalue" >&5 printf %s "checking for libfvalue_get_version in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_get_version (); int main (void) { return libfvalue_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_get_version=yes else $as_nop ac_cv_lib_fvalue_libfvalue_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_initialize in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_initialize in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_initialize (); int main (void) { return libfvalue_data_handle_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_initialize=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_initialize" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_initialize" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_free in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_free in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_free (); int main (void) { return libfvalue_data_handle_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_free=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_free" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_free" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_clone in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_clone in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_clone (); int main (void) { return libfvalue_data_handle_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_clone=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_clone" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_clone" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_clone" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_clear in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_clear in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_clear+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_clear (); int main (void) { return libfvalue_data_handle_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_clear=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_clear=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_clear" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_clear" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_clear" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_data in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_get_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_get_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_get_data (); int main (void) { return libfvalue_data_handle_get_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_get_data=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_get_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_data" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_get_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_get_data" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_data in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_set_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_set_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_set_data (); int main (void) { return libfvalue_data_handle_set_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_set_data=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_set_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_data" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_set_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_set_data" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_data_flags in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_get_data_flags in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_get_data_flags (); int main (void) { return libfvalue_data_handle_get_data_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_get_data_flags" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_data_flags in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_set_data_flags in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_set_data_flags (); int main (void) { return libfvalue_data_handle_set_data_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_set_data_flags" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_number_of_value_entries in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_get_number_of_value_entries in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_get_number_of_value_entries (); int main (void) { return libfvalue_data_handle_get_number_of_value_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_get_number_of_value_entries" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_get_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_get_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_get_value_entry (); int main (void) { return libfvalue_data_handle_get_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_get_value_entry" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_set_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_set_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_set_value_entry (); int main (void) { return libfvalue_data_handle_set_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_set_value_entry" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_data_handle_append_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_data_handle_append_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_data_handle_append_value_entry (); int main (void) { return libfvalue_data_handle_append_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry=yes else $as_nop ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_data_handle_append_value_entry" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_string_size_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_string_size_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_string_size_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_string_size_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_string_size_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_string_size_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf8_string_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf8_string_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf8_string_with_index_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf8_string_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf8_string_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf8_string_with_index_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf16_string_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf16_string_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf16_string_with_index_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf16_string_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf16_string_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf16_string_with_index_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf32_string_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf32_string_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf32_string_with_index_copy_from_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf32_string_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf32_string_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue" >&5 printf %s "checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf32_string_with_index_copy_to_integer (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_split in -lfvalue" >&5 printf %s "checking for libfvalue_utf8_string_split in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf8_string_split+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf8_string_split (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf8_string_split=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_split" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_split in -lfvalue" >&5 printf %s "checking for libfvalue_utf16_string_split in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_utf16_string_split+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_utf16_string_split (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_utf16_string_split=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_split" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_free in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf8_string_free in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf8_string_free (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf8_string_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_string in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf8_string_get_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf8_string_get_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf8_string_get_number_of_segments (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf8_string_get_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_free in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf16_string_free in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf16_string_free (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf16_string_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_string in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf16_string_get_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf16_string_get_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf16_string_get_number_of_segments (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue" >&5 printf %s "checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_split_utf16_string_get_segment_by_index (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_initialize in -lfvalue" >&5 printf %s "checking for libfvalue_table_initialize in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_initialize (); int main (void) { return libfvalue_table_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_table_initialize=yes else $as_nop ac_cv_lib_fvalue_libfvalue_table_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_free in -lfvalue" >&5 printf %s "checking for libfvalue_table_free in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_free (); int main (void) { return libfvalue_table_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_table_free=yes else $as_nop ac_cv_lib_fvalue_libfvalue_table_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_resize in -lfvalue" >&5 printf %s "checking for libfvalue_table_resize in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_resize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_resize (); int main (void) { return libfvalue_table_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_table_resize=yes else $as_nop ac_cv_lib_fvalue_libfvalue_table_resize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_resize" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_table_resize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_resize" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_clone in -lfvalue" >&5 printf %s "checking for libfvalue_table_clone in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_clone (); int main (void) { return libfvalue_table_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_table_clone=yes else $as_nop ac_cv_lib_fvalue_libfvalue_table_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_clone" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_number_of_values in -lfvalue" >&5 printf %s "checking for libfvalue_table_get_number_of_values in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_get_number_of_values+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_get_number_of_values (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_get_number_of_values=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_index_by_identifier in -lfvalue" >&5 printf %s "checking for libfvalue_table_get_index_by_identifier in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_get_index_by_identifier (); int main (void) { return libfvalue_table_get_index_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier=yes else $as_nop ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_index_by_identifier" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_index in -lfvalue" >&5 printf %s "checking for libfvalue_table_get_value_by_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_get_value_by_index (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_identifier in -lfvalue" >&5 printf %s "checking for libfvalue_table_get_value_by_identifier in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_get_value_by_identifier (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value_by_index in -lfvalue" >&5 printf %s "checking for libfvalue_table_set_value_by_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_set_value_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_set_value_by_index (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_set_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value in -lfvalue" >&5 printf %s "checking for libfvalue_table_set_value in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_set_value+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_set_value (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_set_value=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue" >&5 printf %s "checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_table_copy_from_utf8_xml_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_initialize in -lfvalue" >&5 printf %s "checking for libfvalue_value_initialize in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_initialize (); int main (void) { return libfvalue_value_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_initialize=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_free in -lfvalue" >&5 printf %s "checking for libfvalue_value_free in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_free (); int main (void) { return libfvalue_value_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_free=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_free" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_clone in -lfvalue" >&5 printf %s "checking for libfvalue_value_clone in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_clone+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_clone (); int main (void) { return libfvalue_value_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_clone=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_clone=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_clone" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_clear in -lfvalue" >&5 printf %s "checking for libfvalue_value_clear in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_clear+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_clear (); int main (void) { return libfvalue_value_clear (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_clear=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_clear=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_clear" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_clear" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_clear" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_type in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_type in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_type+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_type (); int main (void) { return libfvalue_value_get_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_get_type=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_get_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_type" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_get_type" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_type" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_identifier in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_identifier in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_identifier (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_identifier" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_identifier in -lfvalue" >&5 printf %s "checking for libfvalue_value_set_identifier in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_set_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_set_identifier (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_set_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_identifier" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data_handle in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_data_handle in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_data_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_data_handle (); int main (void) { return libfvalue_value_get_data_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_get_data_handle=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_get_data_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data_handle" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_get_data_handle" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_data_handle" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_has_data in -lfvalue" >&5 printf %s "checking for libfvalue_value_has_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_has_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_has_data (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_has_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_has_data" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data_size in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_data_size in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_data_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_data_size (); int main (void) { return libfvalue_value_get_data_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_get_data_size=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_get_data_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data_size" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_get_data_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_data_size" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_data (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_data in -lfvalue" >&5 printf %s "checking for libfvalue_value_set_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_set_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_set_data (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_set_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_data" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_data in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_data in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_data+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_data (); int main (void) { return libfvalue_value_copy_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_data=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_data" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_data" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_format_flags in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_format_flags in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_format_flags+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_format_flags (); int main (void) { return libfvalue_value_get_format_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_get_format_flags=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_get_format_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_format_flags" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_get_format_flags" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_format_flags" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_format_flags in -lfvalue" >&5 printf %s "checking for libfvalue_value_set_format_flags in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_set_format_flags+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_set_format_flags (); int main (void) { return libfvalue_value_set_format_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_set_format_flags=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_set_format_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_format_flags" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_set_format_flags" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_format_flags" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_number_of_value_entries in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_number_of_value_entries in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_number_of_value_entries (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_value_entry (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_value_entry" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_value_set_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_set_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_set_value_entry (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_set_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_value_entry" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_append_value_entry in -lfvalue" >&5 printf %s "checking for libfvalue_value_append_value_entry in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_append_value_entry+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_append_value_entry (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_append_value_entry=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_append_value_entry" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_boolean in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_boolean in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_boolean (); int main (void) { return libfvalue_value_copy_from_boolean (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_boolean" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_boolean in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_boolean in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_boolean (); int main (void) { return libfvalue_value_copy_to_boolean (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_boolean" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_8bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_8bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_8bit (); int main (void) { return libfvalue_value_copy_from_8bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_8bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_8bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_8bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_8bit (); int main (void) { return libfvalue_value_copy_to_8bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_8bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_16bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_16bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_16bit (); int main (void) { return libfvalue_value_copy_from_16bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_16bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_16bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_16bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_16bit (); int main (void) { return libfvalue_value_copy_to_16bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_16bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_32bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_32bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_32bit (); int main (void) { return libfvalue_value_copy_from_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_32bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_32bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_32bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_32bit (); int main (void) { return libfvalue_value_copy_to_32bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_32bit" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_64bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_64bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_64bit (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_64bit in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_64bit in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_64bit (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_float in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_float in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_float+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_float (); int main (void) { return libfvalue_value_copy_from_float (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_float=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_float=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_float" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_float" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_float" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_float in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_float in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_float+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_float (); int main (void) { return libfvalue_value_copy_to_float (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_float=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_float=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_float" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_float" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_float" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_double in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_double in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_double+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_double (); int main (void) { return libfvalue_value_copy_from_double (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_double=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_double" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_double" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_double" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_double in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_double in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_double+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_double (); int main (void) { return libfvalue_value_copy_to_double (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_double=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_double" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_double" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_double" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf8_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_utf8_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf8_string_size in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_utf8_string_size in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_utf8_string_size (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf8_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf8_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf8_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf8_string_with_index in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf8_string_with_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf8_string_with_index (); int main (void) { return libfvalue_value_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string_with_index" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf16_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_utf16_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf16_string_size in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_utf16_string_size in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_utf16_string_size (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf16_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf16_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf16_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf16_string_with_index in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf16_string_with_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf16_string_with_index (); int main (void) { return libfvalue_value_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string_with_index" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf32_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_from_utf32_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_from_utf32_string (); int main (void) { return libfvalue_value_copy_from_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf32_string" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf32_string_size in -lfvalue" >&5 printf %s "checking for libfvalue_value_get_utf32_string_size in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_get_utf32_string_size (); int main (void) { return libfvalue_value_get_utf32_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_utf32_string_size" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf32_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf32_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf32_string (); int main (void) { return libfvalue_value_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf32_string_with_index in -lfvalue" >&5 printf %s "checking for libfvalue_value_copy_to_utf32_string_with_index in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_copy_to_utf32_string_with_index (); int main (void) { return libfvalue_value_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf32_string_with_index" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_read_from_file_stream in -lfvalue" >&5 printf %s "checking for libfvalue_value_read_from_file_stream in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_read_from_file_stream (); int main (void) { return libfvalue_value_read_from_file_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_read_from_file_stream" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_write_to_file_stream in -lfvalue" >&5 printf %s "checking for libfvalue_value_write_to_file_stream in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_write_to_file_stream (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_initialize in -lfvalue" >&5 printf %s "checking for libfvalue_value_type_initialize in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_type_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_type_initialize (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_type_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_initialize" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_initialize_with_data_handle in -lfvalue" >&5 printf %s "checking for libfvalue_value_type_initialize_with_data_handle in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_type_initialize_with_data_handle (); int main (void) { return libfvalue_value_type_initialize_with_data_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_initialize_with_data_handle" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_set_data_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_type_set_data_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_type_set_data_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_type_set_data_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_type_set_data_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_append_data_string in -lfvalue" >&5 printf %s "checking for libfvalue_value_type_append_data_string in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_type_append_data_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_type_append_data_string (); int main (void) { 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 $as_nop ac_cv_lib_fvalue_libfvalue_value_type_append_data_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfvalue=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_set_data_strings_array in -lfvalue" >&5 printf %s "checking for libfvalue_value_type_set_data_strings_array in -lfvalue... " >&6; } if test ${ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfvalue_value_type_set_data_strings_array (); int main (void) { return libfvalue_value_type_set_data_strings_array (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array=yes else $as_nop ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array" >&5 printf "%s\n" "$ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_set_data_strings_array" = xyes then : ac_cv_libfvalue_dummy=yes else $as_nop ac_cv_libfvalue=no fi ac_cv_libfvalue_LIBADD="-lfvalue" fi fi if test "x$ac_cv_libfvalue" != xyes && test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfvalue in directory: $ac_cv_with_libfvalue See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfvalue" = xyes then : printf "%s\n" "#define HAVE_LIBFVALUE 1" >>confdefs.h fi if test "x$ac_cv_libfvalue" = xyes then : HAVE_LIBFVALUE=1 else $as_nop HAVE_LIBFVALUE=0 fi if test "x$ac_cv_libfvalue" != xyes then : ac_cv_libfvalue_CPPFLAGS="-I../libfvalue -I\$(top_srcdir)/libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local printf "%s\n" "#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+y} then : withval=$with_libfwnt; ac_cv_with_libfwnt=$withval else $as_nop ac_cv_with_libfwnt=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfwnt+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfwnt=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfwnt" >&5 printf "%s\n" "$ac_cv_with_libfwnt" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfwnt" = xno then : ac_cv_libfwnt=no else $as_nop ac_cv_libfwnt=check if test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfwnt See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt >= 20191217" >&5 printf %s "checking for libfwnt >= 20191217... " >&6; } if test -n "$libfwnt_CFLAGS"; then pkg_cv_libfwnt_CFLAGS="$libfwnt_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20191217\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20191217") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_CFLAGS=`$PKG_CONFIG --cflags "libfwnt >= 20191217" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20191217\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20191217") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_LIBS=`$PKG_CONFIG --libs "libfwnt >= 20191217" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfwnt >= 20191217" 2>&1` else libfwnt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfwnt >= 20191217" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfwnt_PKG_ERRORS" >&5 ac_cv_libfwnt=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfwnt=check else libfwnt_CFLAGS=$pkg_cv_libfwnt_CFLAGS libfwnt_LIBS=$pkg_cv_libfwnt_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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" fi fi if test "x$ac_cv_libfwnt" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfwnt.h" "ac_cv_header_libfwnt_h" "$ac_includes_default" if test "x$ac_cv_header_libfwnt_h" = xyes then : printf "%s\n" "#define HAVE_LIBFWNT_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfwnt_h" = xno then : ac_cv_libfwnt=no else $as_nop ac_cv_libfwnt=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_get_version in -lfwnt" >&5 printf %s "checking for libfwnt_get_version in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_get_version+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_get_version (); int main (void) { return libfwnt_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_get_version=yes else $as_nop ac_cv_lib_fwnt_libfwnt_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_get_version" >&5 printf "%s\n" "$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 $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_initialize in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_initialize in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_initialize (); int main (void) { return libfwnt_security_descriptor_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_initialize" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_free in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_free in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_free (); int main (void) { return libfwnt_security_descriptor_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_free=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_free" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_free" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_free" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_copy_from_byte_stream in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_copy_from_byte_stream in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_copy_from_byte_stream (); int main (void) { return libfwnt_security_descriptor_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_copy_from_byte_stream" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_owner in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_get_owner in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_get_owner (); int main (void) { return libfwnt_security_descriptor_get_owner (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_owner" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_group in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_get_group in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_get_group (); int main (void) { return libfwnt_security_descriptor_get_group (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_group" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_discretionary_acl in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_get_discretionary_acl in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_get_discretionary_acl (); int main (void) { return libfwnt_security_descriptor_get_discretionary_acl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_discretionary_acl" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_descriptor_get_system_acl in -lfwnt" >&5 printf %s "checking for libfwnt_security_descriptor_get_system_acl in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_descriptor_get_system_acl (); int main (void) { return libfwnt_security_descriptor_get_system_acl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_descriptor_get_system_acl" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_initialize in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_initialize in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_initialize+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_initialize (); int main (void) { return libfwnt_security_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_initialize=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_initialize" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_initialize" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_initialize" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_free in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_free in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_free (); int main (void) { return libfwnt_security_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_free=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_free" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_free" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_free" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_from_byte_stream in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_from_byte_stream in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_from_byte_stream (); int main (void) { return libfwnt_security_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_from_byte_stream" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_get_string_size in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_get_string_size in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_get_string_size (); int main (void) { return libfwnt_security_identifier_get_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_get_string_size" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf8_string in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf8_string in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf8_string (); int main (void) { return libfwnt_security_identifier_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf8_string_with_index in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf8_string_with_index in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf8_string_with_index (); int main (void) { return libfwnt_security_identifier_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf8_string_with_index" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf16_string in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf16_string in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf16_string (); int main (void) { return libfwnt_security_identifier_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf16_string_with_index in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf16_string_with_index in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf16_string_with_index (); int main (void) { return libfwnt_security_identifier_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf16_string_with_index" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf32_string in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf32_string in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf32_string (); int main (void) { return libfwnt_security_identifier_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_security_identifier_copy_to_utf32_string_with_index in -lfwnt" >&5 printf %s "checking for libfwnt_security_identifier_copy_to_utf32_string_with_index in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_security_identifier_copy_to_utf32_string_with_index (); int main (void) { return libfwnt_security_identifier_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index=yes else $as_nop ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_security_identifier_copy_to_utf32_string_with_index" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_free in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_list_free in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_list_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_list_free (); int main (void) { return libfwnt_access_control_list_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_list_free=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_list_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_free" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_list_free" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_list_free" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_get_number_of_entries in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_list_get_number_of_entries in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_list_get_number_of_entries (); int main (void) { return libfwnt_access_control_list_get_number_of_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_list_get_number_of_entries" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_list_get_entry_by_index in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_list_get_entry_by_index in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_list_get_entry_by_index (); int main (void) { return libfwnt_access_control_list_get_entry_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_list_get_entry_by_index" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_free in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_entry_free in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_entry_free+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_entry_free (); int main (void) { return libfwnt_access_control_entry_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_entry_free=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_entry_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_free" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_entry_free" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_entry_free" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_type in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_entry_get_type in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_entry_get_type (); int main (void) { return libfwnt_access_control_entry_get_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_type" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_flags in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_entry_get_flags in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_entry_get_flags (); int main (void) { return libfwnt_access_control_entry_get_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_flags" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_access_mask in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_entry_get_access_mask in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_entry_get_access_mask (); int main (void) { return libfwnt_access_control_entry_get_access_mask (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_access_mask" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_access_control_entry_get_security_identifier in -lfwnt" >&5 printf %s "checking for libfwnt_access_control_entry_get_security_identifier in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_access_control_entry_get_security_identifier (); int main (void) { return libfwnt_access_control_entry_get_security_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier=yes else $as_nop ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_access_control_entry_get_security_identifier" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lznt1_decompress in -lfwnt" >&5 printf %s "checking for libfwnt_lznt1_decompress in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_lznt1_decompress+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_lznt1_decompress (); int main (void) { return libfwnt_lznt1_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_lznt1_decompress=yes else $as_nop ac_cv_lib_fwnt_libfwnt_lznt1_decompress=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lznt1_decompress" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_lznt1_decompress" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_lznt1_decompress" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzx_decompress in -lfwnt" >&5 printf %s "checking for libfwnt_lzx_decompress in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_lzx_decompress+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_lzx_decompress (); int main (void) { return libfwnt_lzx_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_lzx_decompress=yes else $as_nop ac_cv_lib_fwnt_libfwnt_lzx_decompress=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzx_decompress" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_lzx_decompress" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_lzx_decompress" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzxpress_decompress in -lfwnt" >&5 printf %s "checking for libfwnt_lzxpress_decompress in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_lzxpress_decompress+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_lzxpress_decompress (); int main (void) { return libfwnt_lzxpress_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_lzxpress_decompress=yes else $as_nop ac_cv_lib_fwnt_libfwnt_lzxpress_decompress=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzxpress_decompress" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_lzxpress_decompress" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_lzxpress_decompress" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzxpress_huffman_decompress in -lfwnt" >&5 printf %s "checking for libfwnt_lzxpress_huffman_decompress in -lfwnt... " >&6; } if test ${ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char libfwnt_lzxpress_huffman_decompress (); int main (void) { return libfwnt_lzxpress_huffman_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress=yes else $as_nop ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress" >&5 printf "%s\n" "$ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_decompress" = xyes then : ac_cv_libfwnt_dummy=yes else $as_nop ac_cv_libfwnt=no fi ac_cv_libfwnt_LIBADD="-lfwnt" fi fi if test "x$ac_cv_libfwnt" != xyes && test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xauto-detect && test "x$ac_cv_with_libfwnt" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfwnt in directory: $ac_cv_with_libfwnt See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfwnt" = xyes then : printf "%s\n" "#define HAVE_LIBFWNT 1" >>confdefs.h fi if test "x$ac_cv_libfwnt" = xyes then : HAVE_LIBFWNT=1 else $as_nop HAVE_LIBFWNT=0 fi if test "x$ac_cv_libfwnt" != xyes then : ac_cv_libfwnt_CPPFLAGS="-I../libfwnt -I\$(top_srcdir)/libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local printf "%s\n" "#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 ac_fn_c_check_func "$LINENO" "bindtextdomain" "ac_cv_func_bindtextdomain" if test "x$ac_cv_func_bindtextdomain" = xyes then : printf "%s\n" "#define HAVE_BINDTEXTDOMAIN 1" >>confdefs.h fi # Check whether --with-pyprefix was given. if test ${with_pyprefix+y} then : withval=$with_pyprefix; ac_cv_with_pyprefix=$withval else $as_nop ac_cv_with_pyprefix=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix" >&5 printf %s "checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix... " >&6; } if test ${ac_cv_with_pyprefix+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_pyprefix=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pyprefix" >&5 printf "%s\n" "$ac_cv_with_pyprefix" >&6; } # Check whether --enable-python was given. if test ${enable_python+y} then : enableval=$enable_python; ac_cv_enable_python=$enableval else $as_nop ac_cv_enable_python=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5 printf %s "checking whether to enable build Python bindings... " >&6; } if test ${ac_cv_enable_python+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_enable_python=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5 printf "%s\n" "$ac_cv_enable_python" >&6; } # Check whether --with-pythondir was given. if test ${with_pythondir+y} then : withval=$with_pythondir; ac_cv_with_pythondir=$withval else $as_nop ac_cv_with_pythondir=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5 printf %s "checking whether to use use to specify the Python directory (pythondir)... " >&6; } if test ${ac_cv_with_pythondir+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_pythondir=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pythondir" >&5 printf "%s\n" "$ac_cv_with_pythondir" >&6; } if test "x${ac_cv_enable_python}" != xno then : if test "x${PYTHON_VERSION}" != x then : ax_python_progs="python${PYTHON_VERSION}" else $as_nop ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5" fi for ac_prog in $ax_python_progs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PYTHON+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON="$ac_prog" printf "%s\n" "$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 PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 printf "%s\n" "$PYTHON" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PYTHON" && break done if test "x${PYTHON}" != x then : ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write('%d.%d' % (sys.version_info[0], sys.version_info[1]))" 2>/dev/null`; ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; PYTHON_PLATFORM=$ax_prog_python_platform else $as_nop as_fn_error $? "Unable to find python" "$LINENO" 5 fi PYTHON=$PYTHON if test "x${PYTHON_CONFIG}" = x && test "x${PYTHON_VERSION}" != x then : for ac_prog in python${PYTHON_VERSION}-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PYTHON_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$PYTHON_CONFIG"; then ac_cv_prog_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_CONFIG="$ac_prog" printf "%s\n" "$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 PYTHON_CONFIG=$ac_cv_prog_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 printf "%s\n" "$PYTHON_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PYTHON_CONFIG" && break done fi if test "x${PYTHON_CONFIG}" = x then : for ac_prog in python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PYTHON_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$PYTHON_CONFIG"; then ac_cv_prog_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_CONFIG="$ac_prog" printf "%s\n" "$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 PYTHON_CONFIG=$ac_cv_prog_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 printf "%s\n" "$PYTHON_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PYTHON_CONFIG" && break done fi if test "x${PYTHON_CONFIG}" = x then : as_fn_error $? "Unable to find python-config" "$LINENO" 5 fi PYTHON_CONFIG=$PYTHON_CONFIG if test "x${PYTHON_CONFIG}" != x then : PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2>/dev/null`; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 printf %s "checking for Python includes... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDES" >&5 printf "%s\n" "$PYTHON_INCLUDES" >&6; } PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python libraries" >&5 printf %s "checking for Python libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 printf "%s\n" "$PYTHON_LDFLAGS" >&6; } case $build in #( *-*-cygwin*) : PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined" ;; #( *-*-mingw*) : PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined" ;; #( *-*-msys*) : PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined" ;; #( *) : ;; #( *) : ;; esac BACKUP_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PYTHON_INCLUDES}" for ac_header in Python.h do : ac_fn_c_check_header_compile "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes then : printf "%s\n" "#define HAVE_PYTHON_H 1" >>confdefs.h ac_cv_header_python_h=yes else $as_nop ac_cv_header_python_h=no fi done CPPFLAGS="${BACKUP_CPPFLAGS}" fi if test "x${ac_cv_header_python_h}" != xyes then : ac_cv_enable_python=no else $as_nop ac_cv_enable_python=${ax_prog_python_version} PYTHON_CPPFLAGS=$PYTHON_INCLUDES PYTHON_LDFLAGS=$PYTHON_LDFLAGS if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno then : ax_python_prefix="\${prefix}" else $as_nop ax_python_prefix=`${PYTHON_CONFIG} --prefix 2>/dev/null` fi PYTHON_PREFIX=$ax_python_prefix if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno then : ax_python_exec_prefix="\${exec_prefix}" else $as_nop ax_python_exec_prefix=`${PYTHON_CONFIG} --exec-prefix 2>/dev/null` fi PYTHON_EXEC_PREFIX=$ax_python_exec_prefix ax_python_pythondir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; if test "x${ac_cv_with_pythondir}" = x || test "x${ac_cv_with_pythondir}" = xno then : if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno then : ax_python_pythondir="${ax_python_prefix}/${ax_python_pythondir_suffix}" else $as_nop ax_python_pythondir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null` fi else $as_nop ax_python_pythondir=$ac_cv_with_pythondir fi pythondir=$ax_python_pythondir ax_python_pyexecdir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; ax_python_library_dir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; if test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno then : ax_python_pyexecdir="${ax_python_exec_prefix}/${ax_python_pyexecdir_suffix}" else $as_nop ax_python_pyexecdir=$ax_python_library_dir fi pyexecdir=$ax_python_pyexecdir PYTHON_LIBRARY_DIR=$ax_python_pyexecdir_suffix PYTHON_PACKAGE_DIR=$ax_python_library_dir fi fi if test "x${ac_cv_enable_python}" != xno; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi if test "x${ac_cv_enable_python}" != xno; then HAVE_PYTHON_TESTS_TRUE= HAVE_PYTHON_TESTS_FALSE='#' else HAVE_PYTHON_TESTS_TRUE='#' HAVE_PYTHON_TESTS_FALSE= fi if test "x${ac_cv_enable_python}" != xno then : ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" if test "x$ac_cv_header_varargs_h" = xyes then : printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h fi if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 fi # Check whether --with-libfmapi was given. if test ${with_libfmapi+y} then : withval=$with_libfmapi; ac_cv_with_libfmapi=$withval else $as_nop ac_cv_with_libfmapi=auto-detect fi { printf "%s\n" "$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 printf %s "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 test ${ac_cv_with_libfmapi+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libfmapi=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfmapi" >&5 printf "%s\n" "$ac_cv_with_libfmapi" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libfmapi" = xno then : ac_cv_libfmapi=no else $as_nop ac_cv_libfmapi=check if test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xauto-detect && test "x$ac_cv_with_libfmapi" != xyes 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libfmapi See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi >= 20230404" >&5 printf %s "checking for libfmapi >= 20230404... " >&6; } if test -n "$libfmapi_CFLAGS"; then pkg_cv_libfmapi_CFLAGS="$libfmapi_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmapi >= 20230404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfmapi >= 20230404") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfmapi_CFLAGS=`$PKG_CONFIG --cflags "libfmapi >= 20230404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes 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" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmapi >= 20230404\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfmapi >= 20230404") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfmapi_LIBS=`$PKG_CONFIG --libs "libfmapi >= 20230404" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 --cflags --libs "libfmapi >= 20230404" 2>&1` else libfmapi_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfmapi >= 20230404" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfmapi_PKG_ERRORS" >&5 ac_cv_libfmapi=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libfmapi=check else libfmapi_CFLAGS=$pkg_cv_libfmapi_CFLAGS libfmapi_LIBS=$pkg_cv_libfmapi_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libfmapi=yes fi fi if test "x$ac_cv_libfmapi" = xyes then : ac_cv_libfmapi_CPPFLAGS="$pkg_cv_libfmapi_CFLAGS" ac_cv_libfmapi_LIBADD="$pkg_cv_libfmapi_LIBS" fi fi if test "x$ac_cv_libfmapi" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libfmapi.h" "ac_cv_header_libfmapi_h" "$ac_includes_default" if test "x$ac_cv_header_libfmapi_h" = xyes then : printf "%s\n" "#define HAVE_LIBFMAPI_H 1" >>confdefs.h fi if test "x$ac_cv_header_libfmapi_h" = xno then : ac_cv_libfmapi=no else $as_nop ac_cv_libfmapi=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_get_version in -lfmapi" >&5 printf %s "checking for libfmapi_get_version in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_get_version+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_get_version (); int main (void) { return libfmapi_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_get_version=yes else $as_nop ac_cv_lib_fmapi_libfmapi_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_get_version" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_get_version" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_get_version" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_entry_identifier_initialize in -lfmapi" >&5 printf %s "checking for libfmapi_entry_identifier_initialize in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_entry_identifier_initialize (); int main (void) { return libfmapi_entry_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize=yes else $as_nop ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_entry_identifier_initialize" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_entry_identifier_free in -lfmapi" >&5 printf %s "checking for libfmapi_entry_identifier_free in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_entry_identifier_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_entry_identifier_free (); int main (void) { return libfmapi_entry_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_entry_identifier_free=yes else $as_nop ac_cv_lib_fmapi_libfmapi_entry_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_entry_identifier_free" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_entry_identifier_free" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_entry_identifier_free" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_entry_identifier_copy_from_byte_stream in -lfmapi" >&5 printf %s "checking for libfmapi_entry_identifier_copy_from_byte_stream in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_entry_identifier_copy_from_byte_stream (); int main (void) { return libfmapi_entry_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream=yes else $as_nop ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_entry_identifier_copy_from_byte_stream" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_entry_identifier_get_service_provider_identifier in -lfmapi" >&5 printf %s "checking for libfmapi_entry_identifier_get_service_provider_identifier in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_entry_identifier_get_service_provider_identifier (); int main (void) { return libfmapi_entry_identifier_get_service_provider_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier=yes else $as_nop ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_entry_identifier_get_service_provider_identifier" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_initialize in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_initialize in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_initialize (); int main (void) { return libfmapi_one_off_entry_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_initialize" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_free in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_free in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_free (); int main (void) { return libfmapi_one_off_entry_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_free" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_copy_from_byte_stream in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_copy_from_byte_stream in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_copy_from_byte_stream (); int main (void) { return libfmapi_one_off_entry_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_copy_from_byte_stream" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_version in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_version in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_version (); int main (void) { return libfmapi_one_off_entry_identifier_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_version" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_flags in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_flags in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_flags (); int main (void) { return libfmapi_one_off_entry_identifier_get_flags (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_flags" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_display_name_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_display_name_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_display_name_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_display_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_display_name in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_display_name in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_display_name (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_display_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_display_name" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_display_name_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_display_name_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_display_name_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_display_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_display_name in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_display_name in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_display_name (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_display_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_display_name" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_address_type_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_address_type_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_address_type_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_address_type_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_address_type in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_address_type in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_address_type (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_address_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_address_type" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_address_type_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_address_type_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_address_type_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_address_type_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_address_type in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_address_type in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_address_type (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_address_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_address_type" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_email_address_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_email_address_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_email_address_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_email_address_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf8_email_address in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf8_email_address in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf8_email_address (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf8_email_address (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf8_email_address" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_email_address_size in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_email_address_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_email_address_size (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_email_address_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_one_off_entry_identifier_get_utf16_email_address in -lfmapi" >&5 printf %s "checking for libfmapi_one_off_entry_identifier_get_utf16_email_address in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_one_off_entry_identifier_get_utf16_email_address (); int main (void) { return libfmapi_one_off_entry_identifier_get_utf16_email_address (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address=yes else $as_nop ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_one_off_entry_identifier_get_utf16_email_address" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_class_identifier_public_strings in -lfmapi" >&5 printf %s "checking for libfmapi_class_identifier_public_strings in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_class_identifier_public_strings (); int main (void) { return libfmapi_class_identifier_public_strings (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings=yes else $as_nop ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_class_identifier_public_strings" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_lzfu_get_uncompressed_data_size in -lfmapi" >&5 printf %s "checking for libfmapi_lzfu_get_uncompressed_data_size in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_lzfu_get_uncompressed_data_size (); int main (void) { return libfmapi_lzfu_get_uncompressed_data_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size=yes else $as_nop ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_lzfu_get_uncompressed_data_size" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_lzfu_decompress in -lfmapi" >&5 printf %s "checking for libfmapi_lzfu_decompress in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_lzfu_decompress+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_lzfu_decompress (); int main (void) { return libfmapi_lzfu_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_lzfu_decompress=yes else $as_nop ac_cv_lib_fmapi_libfmapi_lzfu_decompress=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_lzfu_decompress" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_lzfu_decompress" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_lzfu_decompress" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi ac_cv_libfmapi_LIBADD="-lfmapi" fi fi if test "x$ac_cv_libfmapi" != xyes && test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xauto-detect && test "x$ac_cv_with_libfmapi" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libfmapi in directory: $ac_cv_with_libfmapi See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libfmapi" = xyes && test "x$ac_cv_enable_debug_output" != xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_property_identifier_get_identifier in -lfmapi" >&5 printf %s "checking for libfmapi_property_identifier_get_identifier in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_property_identifier_get_identifier (); int main (void) { return libfmapi_property_identifier_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier=yes else $as_nop ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_property_identifier_get_identifier" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_property_identifier_get_description in -lfmapi" >&5 printf %s "checking for libfmapi_property_identifier_get_description in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_property_identifier_get_description+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_property_identifier_get_description (); int main (void) { return libfmapi_property_identifier_get_description (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_property_identifier_get_description=yes else $as_nop ac_cv_lib_fmapi_libfmapi_property_identifier_get_description=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_property_identifier_get_description" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_property_identifier_get_description" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_property_identifier_get_description" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_value_type_get_identifier in -lfmapi" >&5 printf %s "checking for libfmapi_value_type_get_identifier in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_value_type_get_identifier+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_value_type_get_identifier (); int main (void) { return libfmapi_value_type_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_value_type_get_identifier=yes else $as_nop ac_cv_lib_fmapi_libfmapi_value_type_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_value_type_get_identifier" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_value_type_get_identifier" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_value_type_get_identifier" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfmapi_value_type_get_description in -lfmapi" >&5 printf %s "checking for libfmapi_value_type_get_description in -lfmapi... " >&6; } if test ${ac_cv_lib_fmapi_libfmapi_value_type_get_description+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lfmapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libfmapi_value_type_get_description (); int main (void) { return libfmapi_value_type_get_description (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_fmapi_libfmapi_value_type_get_description=yes else $as_nop ac_cv_lib_fmapi_libfmapi_value_type_get_description=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmapi_libfmapi_value_type_get_description" >&5 printf "%s\n" "$ac_cv_lib_fmapi_libfmapi_value_type_get_description" >&6; } if test "x$ac_cv_lib_fmapi_libfmapi_value_type_get_description" = xyes then : ac_cv_libfmapi_dummy=yes else $as_nop ac_cv_libfmapi=no fi fi if test "x$ac_cv_libfmapi" = xyes then : printf "%s\n" "#define HAVE_LIBFMAPI 1" >>confdefs.h fi if test "x$ac_cv_libfmapi" = xyes then : HAVE_LIBFMAPI=1 else $as_nop HAVE_LIBFMAPI=0 fi if test "x$ac_cv_libfmapi" != xyes then : ac_cv_libfmapi_CPPFLAGS="-I../libfmapi -I\$(top_srcdir)/libfmapi"; ac_cv_libfmapi_LIBADD="../libfmapi/libfmapi.la"; ac_cv_libfmapi=local printf "%s\n" "#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 # Check whether --with-libmapidb was given. if test ${with_libmapidb+y} then : withval=$with_libmapidb; ac_cv_with_libmapidb=$withval else $as_nop ac_cv_with_libmapidb=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version" >&5 printf %s "checking whether to use search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if test ${ac_cv_with_libmapidb+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_with_libmapidb=auto-detect fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libmapidb" >&5 printf "%s\n" "$ac_cv_with_libmapidb" >&6; } if test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libmapidb" = xno then : ac_cv_libmapidb=no else $as_nop ac_cv_libmapidb=check if test "x$ac_cv_with_libmapidb" != x && test "x$ac_cv_with_libmapidb" != xauto-detect && test "x$ac_cv_with_libmapidb" != xyes then : if test -d "$ac_cv_with_libmapidb" then : CFLAGS="$CFLAGS -I${ac_cv_with_libmapidb}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libmapidb}/lib" else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "no such directory: $ac_cv_with_libmapidb See \`config.log' for more details" "$LINENO" 5; } fi else $as_nop if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmapidb >= 20120425" >&5 printf %s "checking for libmapidb >= 20120425... " >&6; } if test -n "$libmapidb_CFLAGS"; then pkg_cv_libmapidb_CFLAGS="$libmapidb_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmapidb >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmapidb >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmapidb_CFLAGS=`$PKG_CONFIG --cflags "libmapidb >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libmapidb_LIBS"; then pkg_cv_libmapidb_LIBS="$libmapidb_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmapidb >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmapidb >= 20120425") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmapidb_LIBS=`$PKG_CONFIG --libs "libmapidb >= 20120425" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 libmapidb_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmapidb >= 20120425" 2>&1` else libmapidb_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmapidb >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libmapidb_PKG_ERRORS" >&5 ac_cv_libmapidb=check elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ac_cv_libmapidb=check else libmapidb_CFLAGS=$pkg_cv_libmapidb_CFLAGS libmapidb_LIBS=$pkg_cv_libmapidb_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ac_cv_libmapidb=yes fi fi if test "x$ac_cv_libmapidb" = xyes then : ac_cv_libmapidb_CPPFLAGS="$pkg_cv_libmapidb_CFLAGS" ac_cv_libmapidb_LIBADD="$pkg_cv_libmapidb_LIBS" fi fi if test "x$ac_cv_libmapidb" = xcheck then : ac_fn_c_check_header_compile "$LINENO" "libmapidb.h" "ac_cv_header_libmapidb_h" "$ac_includes_default" if test "x$ac_cv_header_libmapidb_h" = xyes then : printf "%s\n" "#define HAVE_LIBMAPIDB_H 1" >>confdefs.h fi if test "x$ac_cv_header_libmapidb_h" = xno then : ac_cv_libmapidb=no else $as_nop ac_cv_libmapidb=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmapidb_get_version in -lmapidb" >&5 printf %s "checking for libmapidb_get_version in -lmapidb... " >&6; } if test ${ac_cv_lib_mapidb_libmapidb_get_version+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmapidb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char libmapidb_get_version (); int main (void) { return libmapidb_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_mapidb_libmapidb_get_version=yes else $as_nop ac_cv_lib_mapidb_libmapidb_get_version=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mapidb_libmapidb_get_version" >&5 printf "%s\n" "$ac_cv_lib_mapidb_libmapidb_get_version" >&6; } if test "x$ac_cv_lib_mapidb_libmapidb_get_version" = xyes then : ac_cv_libmapidb_dummy=yes else $as_nop ac_cv_libmapidb=no fi ac_cv_libmapidb_LIBADD="-lmapidb" fi fi if test "x$ac_cv_libmapidb" != xyes && test "x$ac_cv_with_libmapidb" != x && test "x$ac_cv_with_libmapidb" != xauto-detect && test "x$ac_cv_with_libmapidb" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "unable to find supported libmapidb in directory: $ac_cv_with_libmapidb See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_libmapidb" = xyes then : printf "%s\n" "#define HAVE_LIBMAPIDB 1" >>confdefs.h fi if test "x$ac_cv_libmapidb" = xyes then : HAVE_LIBMAPIDB=1 else $as_nop HAVE_LIBMAPIDB=0 fi if test "x$ac_cv_libmapidb" != xyes then : ac_cv_libmapidb_CPPFLAGS="-I../libmapidb -I\$(top_srcdir)/libmapidb"; ac_cv_libmapidb_LIBADD="../libmapidb/libmapidb.la"; ac_cv_libmapidb=local printf "%s\n" "#define HAVE_LOCAL_LIBMAPIDB 1" >>confdefs.h HAVE_LOCAL_LIBMAPIDB=1 fi if test "x$ac_cv_libmapidb" = xlocal; then HAVE_LOCAL_LIBMAPIDB_TRUE= HAVE_LOCAL_LIBMAPIDB_FALSE='#' else HAVE_LOCAL_LIBMAPIDB_TRUE='#' HAVE_LOCAL_LIBMAPIDB_FALSE= fi if test "x$ac_cv_libmapidb_CPPFLAGS" != "x" then : LIBMAPIDB_CPPFLAGS=$ac_cv_libmapidb_CPPFLAGS fi if test "x$ac_cv_libmapidb_LIBADD" != "x" then : LIBMAPIDB_LIBADD=$ac_cv_libmapidb_LIBADD fi if test "x$ac_cv_libmapidb" = xyes then : ax_libmapidb_pc_libs_private=-lmapidb fi if test "x$ac_cv_libmapidb" = xyes then : ax_libmapidb_spec_requires=libmapidb ax_libmapidb_spec_build_requires=libmapidb-devel fi ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" if test "x$ac_cv_header_signal_h" = xyes then : printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default" if test "x$ac_cv_header_sys_signal_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "close" "ac_cv_func_close" if test "x$ac_cv_func_close" = xyes then : printf "%s\n" "#define HAVE_CLOSE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" if test "x$ac_cv_func_getopt" = xyes then : printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" if test "x$ac_cv_func_setvbuf" = xyes then : printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h fi if test "x$ac_cv_func_close" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" if test "x$ac_cv_header_varargs_h" = xyes then : printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h fi if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno then : case $host in #( *cygwin* | *mingw* | *msys*) : printf "%s\n" "#define HAVE_DLLMAIN 1" >>confdefs.h HAVE_DLLMAIN=1 LIBESEDB_DLL_EXPORT="-DLIBESEDB_DLL_EXPORT" LIBESEDB_DLL_IMPORT="-DLIBESEDB_DLL_IMPORT" ;; #( *) : ;; esac fi 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 : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fmemopen" "ac_cv_func_fmemopen" if test "x$ac_cv_func_fmemopen" = xyes then : printf "%s\n" "#define HAVE_FMEMOPEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" if test "x$ac_cv_func_getopt" = xyes then : printf "%s\n" "#define HAVE_GETOPT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" if test "x$ac_cv_func_mkstemp" = xyes then : printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" if test "x$ac_cv_func_setenv" = xyes then : printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" if test "x$ac_cv_func_tzset" = xyes then : printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "unlink" "ac_cv_func_unlink" if test "x$ac_cv_func_unlink" = xyes then : printf "%s\n" "#define HAVE_UNLINK 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 printf %s "checking for dlsym in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlsym+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlsym (); int main (void) { return dlsym (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlsym=yes else $as_nop ac_cv_lib_dl_dlsym=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; } if test "x$ac_cv_lib_dl_dlsym" = xyes then : printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi if test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes then : printf "%s\n" "#define HAVE_GNU_DL_DLSYM 1" >>confdefs.h fi if test "x${LIB_FUZZING_ENGINE}" != x; then HAVE_LIB_FUZZING_ENGINE_TRUE= HAVE_LIB_FUZZING_ENGINE_FALSE='#' else HAVE_LIB_FUZZING_ENGINE_TRUE='#' HAVE_LIB_FUZZING_ENGINE_FALSE= fi LIB_FUZZING_ENGINE="${LIB_FUZZING_ENGINE}" CFLAGS="$CFLAGS -Wall"; if test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = 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 then : libesedb_spec_requires=Requires: fi if test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes then : libesedb_spec_tools_build_requires=BuildRequires: fi DPKG_DATE=`date -R 2> /dev/null` SPEC_DATE=`date +"%a %b %e %Y" 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 libcerror/Makefile" ac_config_files="$ac_config_files libcthreads/Makefile" ac_config_files="$ac_config_files libcdata/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 libesedb/Makefile" ac_config_files="$ac_config_files pyesedb/Makefile" ac_config_files="$ac_config_files libfmapi/Makefile" ac_config_files="$ac_config_files libmapidb/Makefile" ac_config_files="$ac_config_files esedbtools/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 ossfuzz/Makefile" ac_config_files="$ac_config_files msvscpp/Makefile" ac_config_files="$ac_config_files include/libesedb.h" ac_config_files="$ac_config_files include/libesedb/definitions.h" ac_config_files="$ac_config_files include/libesedb/features.h" ac_config_files="$ac_config_files include/libesedb/types.h" ac_config_files="$ac_config_files libesedb/libesedb_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 libesedb/libesedb.rc" ac_config_files="$ac_config_files libesedb.pc" ac_config_files="$ac_config_files libesedb.spec" ac_config_files="$ac_config_files setup.cfg" 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$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+y} || &/ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$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=`printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } 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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" 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_LIBCTHREADS_TRUE}" && test -z "${HAVE_LOCAL_LIBCTHREADS_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCTHREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCDATA_TRUE}" && test -z "${HAVE_LOCAL_LIBCDATA_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCDATA\" 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_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_PYTHON_TESTS_TRUE}" && test -z "${HAVE_PYTHON_TESTS_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON_TESTS\" 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_LIBMAPIDB_TRUE}" && test -z "${HAVE_LOCAL_LIBMAPIDB_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBMAPIDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIB_FUZZING_ENGINE_TRUE}" && test -z "${HAVE_LIB_FUZZING_ENGINE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIB_FUZZING_ENGINE\" 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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$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 as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # 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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$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_nop 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_nop 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 || printf "%s\n" 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 # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. 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 # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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=`printf "%s\n" "$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 || printf "%s\n" 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 # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # 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 libesedb $as_me 20240420, which was generated by GNU Autoconf 2.71. 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 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ libesedb config.status 20240420 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 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 ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$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=`printf "%s\n" "$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 ) printf "%s\n" "$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 \printf "%s\n" "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 printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # 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' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_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"`' 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"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $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"`' FILECMD='`$ECHO "$FILECMD" | $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"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $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_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $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"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $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"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $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_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"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $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"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $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 \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ 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_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ 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_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 \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that 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' RM='$RM' ofile='$ofile' # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. 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" ;; "libcerror/Makefile") CONFIG_FILES="$CONFIG_FILES libcerror/Makefile" ;; "libcthreads/Makefile") CONFIG_FILES="$CONFIG_FILES libcthreads/Makefile" ;; "libcdata/Makefile") CONFIG_FILES="$CONFIG_FILES libcdata/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" ;; "libesedb/Makefile") CONFIG_FILES="$CONFIG_FILES libesedb/Makefile" ;; "pyesedb/Makefile") CONFIG_FILES="$CONFIG_FILES pyesedb/Makefile" ;; "libfmapi/Makefile") CONFIG_FILES="$CONFIG_FILES libfmapi/Makefile" ;; "libmapidb/Makefile") CONFIG_FILES="$CONFIG_FILES libmapidb/Makefile" ;; "esedbtools/Makefile") CONFIG_FILES="$CONFIG_FILES esedbtools/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" ;; "ossfuzz/Makefile") CONFIG_FILES="$CONFIG_FILES ossfuzz/Makefile" ;; "msvscpp/Makefile") CONFIG_FILES="$CONFIG_FILES msvscpp/Makefile" ;; "include/libesedb.h") CONFIG_FILES="$CONFIG_FILES include/libesedb.h" ;; "include/libesedb/definitions.h") CONFIG_FILES="$CONFIG_FILES include/libesedb/definitions.h" ;; "include/libesedb/features.h") CONFIG_FILES="$CONFIG_FILES include/libesedb/features.h" ;; "include/libesedb/types.h") CONFIG_FILES="$CONFIG_FILES include/libesedb/types.h" ;; "libesedb/libesedb_definitions.h") CONFIG_FILES="$CONFIG_FILES libesedb/libesedb_definitions.h" ;; "common/types.h") CONFIG_FILES="$CONFIG_FILES common/types.h" ;; "dpkg/changelog") CONFIG_FILES="$CONFIG_FILES dpkg/changelog" ;; "libesedb/libesedb.rc") CONFIG_FILES="$CONFIG_FILES libesedb/libesedb.rc" ;; "libesedb.pc") CONFIG_FILES="$CONFIG_FILES libesedb.pc" ;; "libesedb.spec") CONFIG_FILES="$CONFIG_FILES libesedb.spec" ;; "setup.cfg") CONFIG_FILES="$CONFIG_FILES setup.cfg" ;; "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+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || 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=`printf "%s\n" "$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 '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$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 || printf "%s\n" 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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$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"; } && { printf "%s\n" "$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 printf "%s\n" "$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 { printf "%s\n" "/* $configure_input */" >&1 \ && 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$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 printf "%s\n" "/* $configure_input */" >&1 \ && 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 || printf "%s\n" 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) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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 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 this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # 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 # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # 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 # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # 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 (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$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 into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # 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 # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # 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 where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # 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 # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # 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 # 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 # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # 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_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # 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_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # 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_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "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" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/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"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Building: libcerror support: $ac_cv_libcerror libcthreads support: $ac_cv_libcthreads libcdata support: $ac_cv_libcdata 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 libmapidb support: $ac_cv_libmapidb Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type esedbtools are build as static executables: $ac_cv_enable_static_executables Python (pyesedb) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&5 printf "%s\n" "$as_me: Building: libcerror support: $ac_cv_libcerror libcthreads support: $ac_cv_libcthreads libcdata support: $ac_cv_libcdata 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 libmapidb support: $ac_cv_libmapidb Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type esedbtools are build as static executables: $ac_cv_enable_static_executables Python (pyesedb) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&6;}; libesedb-20240420/compile0000755000175000017500000001635014610746265015756 0ustar00lordyestalordyesta#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libesedb-20240420/missing0000755000175000017500000001533614610746265016002 0ustar00lordyestalordyesta#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libesedb-20240420/libesedb/0000755000175000017500000000000014610746414016140 5ustar00lordyestalordyestalibesedb-20240420/libesedb/libesedb.rc0000644000175000017500000000212714610746302020235 0ustar00lordyestalordyesta#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 access the Extensible Storage Engine (ESE) Database File (EDB) format\0" VALUE "FileVersion", "20240420" "\0" VALUE "InternalName", "libesedb.dll\0" VALUE "LegalCopyright", "(C) 2009-2024, Joachim Metz \0" VALUE "OriginalFilename", "libesedb.dll\0" VALUE "ProductName", "libesedb\0" VALUE "ProductVersion", "20240420" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libesedb/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libesedb-20240420/libesedb/libesedb_definitions.h.in0000644000175000017500000001731514610727250023066 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_DEFINITIONS_H ) #define _LIBESEDB_INTERNAL_DEFINITIONS_H #include #include #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #define LIBESEDB_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBESEDB_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb */ #if !defined( HAVE_LOCAL_LIBESEDB ) #include /* The definitions in are copied here * for local use of libesedb */ #else #define LIBESEDB_VERSION @VERSION@ /* The version string */ #define LIBESEDB_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 LIBESEDB_ACCESS_FLAGS { LIBESEDB_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBESEDB_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE ) /* The file types */ enum LIBESEDB_FILE_TYPES { LIBESEDB_FILE_TYPE_DATABASE = 0, LIBESEDB_FILE_TYPE_STREAMING_FILE = 1 }; /* The get columns flags */ enum LIBESEDB_GET_COLUMN_FLAGS { LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01 }; /* The column types */ enum LIBESEDB_COLUMN_TYPES { LIBESEDB_COLUMN_TYPE_NULL = 0, LIBESEDB_COLUMN_TYPE_BOOLEAN = 1, LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4, LIBESEDB_COLUMN_TYPE_CURRENCY = 5, LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6, LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7, LIBESEDB_COLUMN_TYPE_DATE_TIME = 8, LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9, LIBESEDB_COLUMN_TYPE_TEXT = 10, LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11, LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12, LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14, LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15, LIBESEDB_COLUMN_TYPE_GUID = 16, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17 }; /* The value flags */ enum LIBESEDB_VALUE_FLAGS { LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01, LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02, LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04, LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08, LIBESEDB_VALUE_FLAG_0x10 = 0x10 }; #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #define LIBESEDB_FORMAT_REVISION_NEW_RECORD_FORMAT 0x0b #define LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER 0x11 /* The page flags */ enum LIBESEDB_PAGE_FLAGS { LIBESEDB_PAGE_FLAG_IS_ROOT = 0x00000001, LIBESEDB_PAGE_FLAG_IS_LEAF = 0x00000002, LIBESEDB_PAGE_FLAG_IS_PARENT = 0x00000004, LIBESEDB_PAGE_FLAG_IS_EMPTY = 0x00000008, LIBESEDB_PAGE_FLAG_IS_SPACE_TREE = 0x00000020, LIBESEDB_PAGE_FLAG_IS_INDEX = 0x00000040, LIBESEDB_PAGE_FLAG_IS_LONG_VALUE = 0x00000080, LIBESEDB_PAGE_FLAG_0x0400 = 0x00000400, LIBESEDB_PAGE_FLAG_0x0800 = 0x00000800, LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT = 0x00002000, LIBESEDB_PAGE_FLAG_IS_SCRUBBED = 0x00004000, LIBESEDB_PAGE_FLAG_0x8000 = 0x00008000, LIBESEDB_PAGE_FLAG_0x10000 = 0x00010000 }; /* The page tag flags */ enum LIBESEDB_PAGE_TAG_FLAGS { LIBESEDB_PAGE_TAG_FLAG_0x01 = 0x01, LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT = 0x02, LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE = 0x04 }; /* The catalog definitions types */ enum LIBESEDB_CATALOG_DEFINITION_TYPES { LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE = 1, LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN = 2, LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX = 3, LIBESEDB_CATALOG_DEFINITION_TYPE_LONG_VALUE = 4, LIBESEDB_CATALOG_DEFINITION_TYPE_CALLBACK = 5 }; /* Definitions of fixed FDP object identifiers */ #define LIBESEDB_FDP_OBJECT_IDENTIFIER_DATABASE 1 #define LIBESEDB_FDP_OBJECT_IDENTIFIER_CATALOG 2 #define LIBESEDB_FDP_OBJECT_IDENTIFIER_CATALOG_BACKUP 3 /* Definitions of fixed page numbers */ #define LIBESEDB_PAGE_NUMBER_DATABASE 1 #define LIBESEDB_PAGE_NUMBER_CATALOG 4 #define LIBESEDB_PAGE_NUMBER_CATALOG_BACKUP 24 /* Page key search related definitions */ enum LIBESEDB_PAGE_KEY_FLAGS { LIBESEDB_PAGE_KEY_FLAG_REVERSED_KEY = 0x01, LIBESEDB_PAGE_KEY_FLAG_TEST = 0x80 }; /* The key type definitions */ enum LIBESEDB_KEY_TYPES { LIBESEDB_KEY_TYPE_BRANCH = (uint8_t) 'b', LIBESEDB_KEY_TYPE_INDEX_VALUE = (uint8_t) 'I', LIBESEDB_KEY_TYPE_LEAF = (uint8_t) 'l', LIBESEDB_KEY_TYPE_LONG_VALUE = (uint8_t) 'L', LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT = (uint8_t) 'S' }; /* The tagged data type format definitions */ enum LIBESEDB_TAGGED_DATA_TYPES_FORMATS { LIBESEDB_TAGGED_DATA_TYPES_FORMAT_LINEAR, LIBESEDB_TAGGED_DATA_TYPES_FORMAT_INDEX, }; /* The record flags */ enum LIBESEDB_RECORD_FLAGS { LIBESEDB_RECORD_FLAG_IS_CORRUPTED = 0x01, }; /* The file attribute flags */ enum LIBESEDB_FILE_ATTRIBUTE_FLAGS { LIBESEDB_FILE_ATTRIBUTE_FLAG_READ_ONLY = 0x00000001, LIBESEDB_FILE_ATTRIBUTE_FLAG_HIDDEN = 0x00000002, LIBESEDB_FILE_ATTRIBUTE_FLAG_SYSTEM = 0x00000004, LIBESEDB_FILE_ATTRIBUTE_FLAG_DIRECTORY = 0x00000010, LIBESEDB_FILE_ATTRIBUTE_FLAG_ARCHIVE = 0x00000020, LIBESEDB_FILE_ATTRIBUTE_FLAG_DEVICE = 0x00000040, LIBESEDB_FILE_ATTRIBUTE_FLAG_NORMAL = 0x00000080, LIBESEDB_FILE_ATTRIBUTE_FLAG_TEMPORARY = 0x00000100, LIBESEDB_FILE_ATTRIBUTE_FLAG_SPARSE_FILE = 0x00000200, LIBESEDB_FILE_ATTRIBUTE_FLAG_REPARSE_POINT = 0x00000400, LIBESEDB_FILE_ATTRIBUTE_FLAG_COMPRESSED = 0x00000800, LIBESEDB_FILE_ATTRIBUTE_FLAG_OFFLINE = 0x00001000, LIBESEDB_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED = 0x00002000, LIBESEDB_FILE_ATTRIBUTE_FLAG_ENCRYPTED = 0x00004000, LIBESEDB_FILE_ATTRIBUTE_FLAG_VIRTUAL = 0x00010000 }; /* Flag to indicate the page tree node is virtual */ #define LIBESEDB_PAGE_TREE_NODE_FLAG_IS_VIRTUAL LIBFDATA_RANGE_FLAG_USER_DEFINED_1 /* The maximum number of cache entries definitions */ #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_PAGES ( 8 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_INDEX_VALUES ( 32 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_LONG_VALUES ( 128 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_LONG_VALUES_DATA 8 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_TABLE_VALUES ( 32 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_TREE_VALUES ( 128 * 1024 ) - 3 #define LIBESEDB_VALUE_DATA_FLAG_HAS_TAG_DATA_TYPE_FLAGS LIBFVALUE_VALUE_DATA_FLAG_USER_DEFINED_1 #define LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES 256 #define LIBESEDB_MAXIMUM_NUMBER_OF_LEAF_PAGES 16 * 1024 #define LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH 256 #endif /* !defined( _LIBESEDB_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libesedb/libesedb_data_segment.c0000644000175000017500000002151214610727250022566 0ustar00lordyestalordyesta/* * Data segment functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_data_segment.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfdata.h" #include "libesedb_unused.h" /* Creates a data segment * Make sure the value data_segment is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_data_segment_initialize( libesedb_data_segment_t **data_segment, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_data_segment_initialize"; if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segment.", function ); return( -1 ); } if( *data_segment != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data segment value already set.", function ); return( -1 ); } if( data_size > (size_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum allocation size.", function ); return( -1 ); } *data_segment = memory_allocate_structure( libesedb_data_segment_t ); if( *data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data segment.", function ); goto on_error; } if( memory_set( *data_segment, 0, sizeof( libesedb_data_segment_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data segment.", function ); memory_free( *data_segment ); *data_segment = NULL; return( -1 ); } if( data_size > 0 ) { ( *data_segment )->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( ( *data_segment )->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } ( *data_segment )->data_size = data_size; } return( 1 ); on_error: if( *data_segment != NULL ) { memory_free( *data_segment ); *data_segment = NULL; } return( -1 ); } /* Frees a data segment * Returns 1 if successful or -1 on error */ int libesedb_data_segment_free( libesedb_data_segment_t **data_segment, libcerror_error_t **error ) { static char *function = "libesedb_data_segment_free"; if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segment.", function ); return( -1 ); } if( *data_segment != NULL ) { if( ( *data_segment )->data != NULL ) { memory_free( ( *data_segment )->data ); } memory_free( *data_segment ); *data_segment = NULL; } return( 1 ); } /* Retrieves the data size * Returns 1 if successful or -1 on error */ int libesedb_data_segment_get_data_size( libesedb_data_segment_t *data_segment, size_t *data_size, libcerror_error_t **error ) { static char *function = "libesedb_data_segment_get_data_size"; if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segment.", 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_size = data_segment->data_size; return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libesedb_data_segment_get_data( libesedb_data_segment_t *data_segment, uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_data_segment_get_data"; if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segment.", 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( data_size < data_segment->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: data size value too small.", function ); return( -1 ); } if( memory_copy( data, data_segment->data, data_segment->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 ); } /* Reads a data segment * Callback for the data segments list * Returns 1 if successful or -1 on error */ int libesedb_data_segment_read_element_data( intptr_t *data_handle LIBESEDB_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfdata_cache_t *cache, int element_file_index LIBESEDB_ATTRIBUTE_UNUSED, off64_t element_offset, size64_t element_size, uint32_t element_flags LIBESEDB_ATTRIBUTE_UNUSED, uint8_t read_flags LIBESEDB_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libesedb_data_segment_t *data_segment = NULL; static char *function = "libesedb_data_segment_read_element_data"; ssize_t read_count = 0; LIBESEDB_UNREFERENCED_PARAMETER( data_handle ) LIBESEDB_UNREFERENCED_PARAMETER( element_file_index ) LIBESEDB_UNREFERENCED_PARAMETER( element_flags ) LIBESEDB_UNREFERENCED_PARAMETER( read_flags ) if( element_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element size value out of bounds.", function ); return( -1 ); } if( libesedb_data_segment_initialize( &data_segment, (size_t) element_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data segment.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading data segment at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, element_offset, element_offset ); } #endif read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, data_segment->data, data_segment->data_size, element_offset, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data segment at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, element_offset, element_offset ); goto on_error; } if( libfdata_list_element_set_element_value( element, (intptr_t *) file_io_handle, cache, (intptr_t *) data_segment, (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_data_segment_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 data segment as element value.", function ); goto on_error; } return( 1 ); on_error: if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } return( -1 ); } libesedb-20240420/libesedb/esedb_file_header.h0000644000175000017500000001626014610727250021704 0ustar00lordyestalordyesta/* * The file header definition of an Extensible Storage Engine (ESE) Database File (EDB) * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_FILE_HEADER_H ) #define _ESEDB_FILE_HEADER_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct esedb_file_header esedb_file_header_t; struct esedb_file_header { /* The checksum * A XOR-32 checksum calcalted over the bytes * from offset 8 to 4096 * with an initial value of 0x89abcdef * Consists of 4 bytes */ uint8_t checksum[ 4 ]; /* The file signature * Consists of 4 bytes * Consists of: 0xef 0xcd 0xab 0x89 */ uint8_t signature[ 4 ]; /* The file format version * Consists of 4 bytes */ uint8_t format_version[ 4 ]; /* The file type * Consists of 4 bytes */ uint8_t file_type[ 4 ]; /* The database time * Consists of 8 bytes * Contains a database time structure */ uint8_t database_time[ 8 ]; /* The database signature * Consists of 28 bytes * Contains a log signature structure */ uint8_t database_signature[ 28 ]; /* The database state * Consists of 4 bytes */ uint8_t database_state[ 4 ]; /* The consistent position * Consists of 8 bytes * Contains a log position structure */ uint8_t consistent_postition[ 8 ]; /* The consistent date and time * Consists of 8 bytes * Contains a log time structure */ uint8_t consistent_time[ 8 ]; /* The attach date and time * Consists of 8 bytes * Contains a log time structure */ uint8_t attach_time[ 8 ]; /* The attach position * Consists of 8 bytes * Contains a log position structure */ uint8_t attach_postition[ 8 ]; /* The detach date and time * Consists of 8 bytes * Contains a log time structure */ uint8_t detach_time[ 8 ]; /* The detach position * Consists of 8 bytes * Contains a log position structure */ uint8_t detach_postition[ 8 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* The log signature * Consists of 28 bytes * Contains a log signature structure */ uint8_t log_signature[ 28 ]; /* Previous full backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t previous_full_backup[ 24 ]; /* Previous incremental backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t previous_incremental_backup[ 24 ]; /* Current full backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t current_full_backup[ 24 ]; /* Shadowing disabled * Consists of 4 bytes */ uint8_t shadowing_disabled[ 4 ]; /* Last object identifier * Consists of 4 bytes */ uint8_t last_object_identifier[ 4 ]; /* Index update major version * Consists of 4 bytes */ uint8_t index_update_major_version[ 4 ]; /* Index update minor version * Consists of 4 bytes */ uint8_t index_update_minor_version[ 4 ]; /* Index update build number * Consists of 4 bytes */ uint8_t index_update_build_number[ 4 ]; /* Index update service pack number * Consists of 4 bytes */ uint8_t index_update_service_pack_number[ 4 ]; /* The file format revision * Consists of 4 bytes */ uint8_t format_revision[ 4 ]; /* The page size * Consists of 4 bytes */ uint8_t page_size[ 4 ]; /* The repair count * Consists of 4 bytes */ uint8_t repair_count[ 4 ]; /* The repair date and time * Consists of 8 bytes * Contains a log time structure */ uint8_t repair_time[ 8 ]; /* Unknown * Consists of 28 bytes */ uint8_t unknown2[ 28 ]; /* The scrub database time * Consists of 8 bytes * Contains a database time structure */ uint8_t scrub_database_time[ 8 ]; /* The scrub date and time * Consists of 8 bytes * Contains a log time structure */ uint8_t scrub_time[ 8 ]; /* The required log * Consists of 8 bytes */ uint8_t required_log[ 8 ]; /* Upgrade Exchange 5.5 format * Consists of 4 bytes */ uint8_t upgrade_exchange5_format[ 4 ]; /* Upgrade free pages * Consists of 4 bytes */ uint8_t upgrade_free_pages[ 4 ]; /* Upgrade space map pages * Consists of 4 bytes */ uint8_t upgrade_space_map_pages[ 4 ]; /* Current shadow volume backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t current_shadow_volume_backup[ 24 ]; /* The file format version on creation * Consists of 4 bytes */ uint8_t creation_format_version[ 4 ]; /* The file format revision on creation * Consists of 4 bytes */ uint8_t creation_format_revision[ 4 ]; /* Unknown * Consists of 16 bytes */ uint8_t unknown3[ 16 ]; /* The old repair count * Consists of 4 bytes */ uint8_t old_repair_count[ 4 ]; /* The ECC fix success count * Consists of 4 bytes */ uint8_t ecc_fix_success_count[ 4 ]; /* The last ECC fix success rate and time * Consists of 8 bytes * Contains a log time structure */ uint8_t ecc_fix_success_time[ 8 ]; /* The old ECC fix success count * Consists of 4 bytes */ uint8_t old_ecc_fix_success_count[ 4 ]; /* The ECC fix error count * Consists of 4 bytes */ uint8_t ecc_fix_error_count[ 4 ]; /* The last ECC fix error rate and time * Consists of 8 bytes * Contains a log time structure */ uint8_t ecc_fix_error_time[ 8 ]; /* The old ECC fix error count * Consists of 4 bytes */ uint8_t old_ecc_fix_error_count[ 4 ]; /* The bad checksum error count * Consists of 4 bytes */ uint8_t bad_checksum_error_count[ 4 ]; /* The last bad checksum error rate and time * Consists of 8 bytes * Contains a log time structure */ uint8_t bad_checksum_error_time[ 8 ]; /* The old bad checksum error count * Consists of 4 bytes */ uint8_t old_bad_checksum_error_count[ 4 ]; /* The committed log * Consists of 4 bytes */ uint8_t committed_log[ 4 ]; /* Previous shadow volume backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t previous_shadow_volume_backup[ 24 ]; /* Previous differential backup * Consists of 24 bytes * Contains a backup information structure */ uint8_t previous_differential_backup[ 24 ]; /* Unknown * Consists of 40 bytes */ uint8_t unknown4[ 40 ]; /* NLS major version * Consists of 4 bytes */ uint8_t nls_major_version[ 4 ]; /* NLS minor version * Consists of 4 bytes */ uint8_t nls_minor_version[ 4 ]; /* Unknown * Consists of 148 bytes */ uint8_t unknown5[ 148 ]; /* Unknown flags * Consists of 4 bytes */ uint8_t unknown_flags[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_FILE_HEADER_H ) */ libesedb-20240420/libesedb/libesedb_root_page_header.h0000644000175000017500000000346214610727250023433 0ustar00lordyestalordyesta/* * Root page header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_ROOT_PAGE_HEADER_H ) #define _LIBESEDB_ROOT_PAGE_HEADER_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_root_page_header libesedb_root_page_header_t; struct libesedb_root_page_header { /* The extent space */ uint32_t extent_space; /* The space tree number */ uint32_t space_tree_page_number; /* The initial number of pages */ uint32_t initial_number_of_pages; }; int libesedb_root_page_header_initialize( libesedb_root_page_header_t **root_page_header, libcerror_error_t **error ); int libesedb_root_page_header_free( libesedb_root_page_header_t **root_page_header, libcerror_error_t **error ); int libesedb_root_page_header_read_data( libesedb_root_page_header_t *root_page_header, const uint8_t *data, size_t data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_ROOT_PAGE_HEADER_H ) */ libesedb-20240420/libesedb/libesedb_error.h0000644000175000017500000000340314610727250021270 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_ERROR_H ) #define _LIBESEDB_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBESEDB ) #include #endif #include "libesedb_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBESEDB ) LIBESEDB_EXTERN \ void libesedb_error_free( libesedb_error_t **error ); LIBESEDB_EXTERN \ int libesedb_error_fprint( libesedb_error_t *error, FILE *stream ); LIBESEDB_EXTERN \ int libesedb_error_sprint( libesedb_error_t *error, char *string, size_t size ); LIBESEDB_EXTERN \ int libesedb_error_backtrace_fprint( libesedb_error_t *error, FILE *stream ); LIBESEDB_EXTERN \ int libesedb_error_backtrace_sprint( libesedb_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_INTERNAL_ERROR_H ) */ libesedb-20240420/libesedb/libesedb_libcdata.h0000644000175000017500000000301414610727250021700 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBCDATA_H ) #define _LIBESEDB_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBESEDB_LIBCDATA_H ) */ libesedb-20240420/libesedb/libesedb_column_type.c0000644000175000017500000000570314610727250022475 0ustar00lordyestalordyesta/* * Column type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_column_type.h" #if defined( HAVE_DEBUG_OUTPUT ) libesedb_column_type_t libesedb_column_types[ ] = { { 0x0000, "JET_coltypNil", "Invalid" }, { 0x0001, "JET_coltypBit", "Boolean" }, { 0x0002, "JET_coltypUnsignedByte", "Integer 8-bit unsigned" }, { 0x0003, "JET_coltypShort", "Integer 16-bit signed" }, { 0x0004, "JET_coltypLong", "Integer 32-bit signed" }, { 0x0005, "JET_coltypCurrency", "Currency (64-bit)" }, { 0x0006, "JET_coltypIEEESingle", "Floating point single precision (32-bit)" }, { 0x0007, "JET_coltypIEEEDouble", "Floating point double precision (64-bit)" }, { 0x0008, "JET_coltypDateTime", "Application Time (64-bit)" }, { 0x0009, "JET_coltypBinary", "Binary data" }, { 0x000a, "JET_coltypText", "Text (extended ASCII or Unicode string)" }, { 0x000b, "JET_coltypLongBinary", "Large binary data" }, { 0x000c, "JET_coltypLongText", "Large text (extended ASCII or Unicode string)" }, { 0x000d, "JET_coltypSLV", "Super long value" }, { 0x000e, "JET_coltypUnsignedLong", "Integer 32-bit unsigned" }, { 0x000f, "JET_coltypLongLong", "Integer 64-bit signed" }, { 0x0010, "JET_coltypGUID", "GUID (128-bit)" }, { 0x0011, "JET_coltypUnsignedShort", "Integer 16-bit unsigned" }, { (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the column type identifier */ const char *libesedb_column_type_get_identifier( uint32_t column_type ) { int iterator = 0; while( ( libesedb_column_types[ iterator ] ).column_type != (uint32_t) -1 ) { if( ( libesedb_column_types[ iterator ] ).column_type == column_type ) { break; } iterator++; } return( ( libesedb_column_types[ iterator ] ).identifier ); } /* Retrieves a string containing the column type description */ const char *libesedb_column_type_get_description( uint32_t column_type ) { int iterator = 0; while( ( libesedb_column_types[ iterator ] ).column_type != (uint32_t) -1 ) { if( ( libesedb_column_types[ iterator ] ).column_type == column_type ) { break; } iterator++; } return( ( libesedb_column_types[ iterator ] ).description ); } #endif libesedb-20240420/libesedb/libesedb_lcid.h0000644000175000017500000000302114610727250021046 0ustar00lordyestalordyesta/* * LCID functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LCID_H ) #define _LIBESEDB_LCID_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libesedb_lcid_language_tag libesedb_lcid_language_tag_t; struct libesedb_lcid_language_tag { /* The LCID language tag value */ uint16_t lcid_language_tag; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libesedb_lcid_language_tag_get_identifier( uint16_t lcid_language_tag ); const char *libesedb_lcid_language_tag_get_description( uint16_t lcid_language_tag ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_LCID_H ) */ libesedb-20240420/libesedb/libesedb_libcerror.h0000644000175000017500000000263614610727250022131 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBCERROR_H ) #define _LIBESEDB_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBESEDB_LIBCERROR_H ) */ libesedb-20240420/libesedb/libesedb_file_header.c0000644000175000017500000004560314610727250022371 0ustar00lordyestalordyesta/* * File header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_checksum.h" #include "libesedb_debug.h" #include "libesedb_file_header.h" #include "libesedb_io_handle.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "esedb_file_header.h" /* Creates file header * Make sure the value file_header is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_file_header_initialize( libesedb_file_header_t **file_header, libcerror_error_t **error ) { static char *function = "libesedb_file_header_initialize"; if( file_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file header.", function ); return( -1 ); } if( *file_header != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file header value already set.", function ); return( -1 ); } *file_header = memory_allocate_structure( libesedb_file_header_t ); 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; } if( memory_set( *file_header, 0, sizeof( libesedb_file_header_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file header.", function ); goto on_error; } return( 1 ); on_error: if( *file_header != NULL ) { memory_free( *file_header ); *file_header = NULL; } return( -1 ); } /* Frees file header * Returns 1 if successful or -1 on error */ int libesedb_file_header_free( libesedb_file_header_t **file_header, libcerror_error_t **error ) { static char *function = "libesedb_file_header_free"; if( file_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file header.", function ); return( -1 ); } if( *file_header != NULL ) { memory_free( *file_header ); *file_header = NULL; } return( 1 ); } /* Reads the file header data * Returns 1 if successful or -1 on error */ int libesedb_file_header_read_data( libesedb_file_header_t *file_header, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_file_header_read_data"; uint32_t calculated_xor32_checksum = 0; uint32_t stored_xor32_checksum = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( file_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file header.", 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 < sizeof( esedb_file_header_t ) ) { 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( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file header:\n", function ); libcnotify_print_data( data, sizeof( esedb_file_header_t ), LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( memory_compare( ( (esedb_file_header_t *) data )->signature, esedb_file_signature, 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file signature.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->checksum, stored_xor32_checksum ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->format_version, file_header->format_version ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->file_type, file_header->file_type ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->database_state, file_header->database_state ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->format_revision, file_header->format_revision ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->page_size, file_header->page_size ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->creation_format_version, file_header->creation_format_version ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->creation_format_revision, file_header->creation_format_revision ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: checksum\t\t\t\t: 0x%08" PRIx32 "\n", function, stored_xor32_checksum ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->signature, value_32bit ); libcnotify_printf( "%s: signature\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: format version\t\t\t\t: 0x%08" PRIx32 "\n", function, file_header->format_version ); libcnotify_printf( "%s: file type\t\t\t\t: %" PRIu32 " (", function, file_header->file_type ); libesedb_debug_print_file_type( file_header->file_type ); libcnotify_printf( ")\n" ); libcnotify_printf( "%s: database time:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->database_time, 8, 0 ); libcnotify_printf( "%s: database signature:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->database_signature, 28, 0 ); libcnotify_printf( "%s: database state\t\t\t\t: %" PRIu32 " ", function, file_header->database_state ); libesedb_debug_print_database_state( file_header->database_state ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: consistent position:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->consistent_postition, 8, 0 ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->consistent_time, 8, "consistent time", "\t\t\t\t", NULL ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->attach_time, 8, "attach time", "\t\t\t\t", NULL ); libcnotify_printf( "%s: attach position:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->attach_postition, 8, 0 ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->detach_time, 8, "detach time", "\t\t\t\t", NULL ); libcnotify_printf( "%s: detach position:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->detach_postition, 8, 0 ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "%s: log signature:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->log_signature, 28, 0 ); libcnotify_printf( "%s: previous full backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->previous_full_backup, 24, 0 ); libcnotify_printf( "%s: previous incremental backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->previous_incremental_backup, 24, 0 ); libcnotify_printf( "%s: current full backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->current_full_backup, 24, 0 ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->shadowing_disabled, value_32bit ); libcnotify_printf( "%s: shadowing disabled\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->last_object_identifier, value_32bit ); libcnotify_printf( "%s: last object identifier\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->index_update_major_version, value_32bit ); libcnotify_printf( "%s: index update major version\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->index_update_minor_version, value_32bit ); libcnotify_printf( "%s: index update minor version\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->index_update_build_number, value_32bit ); libcnotify_printf( "%s: index update build number\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->index_update_service_pack_number, value_32bit ); libcnotify_printf( "%s: index update service pack number\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: format revision\t\t\t\t: %" PRIu32 " (0x%08" PRIx32 ")\n", function, file_header->format_revision, file_header->format_revision ); libcnotify_printf( "%s: page size\t\t\t\t: %" PRIu32 "\n", function, file_header->page_size ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->repair_count, value_32bit ); libcnotify_printf( "%s: repair count\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->repair_time, 8, "repair time", "\t\t\t\t", NULL ); libcnotify_printf( "%s: unknown2:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->unknown2, 28, 0 ); libcnotify_printf( "%s: scrub database time:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->scrub_database_time, 8, 0 ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->scrub_time, 8, "scrub time", "\t\t\t\t", NULL ); libcnotify_printf( "%s: required log:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->required_log, 8, 0 ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->upgrade_exchange5_format, value_32bit ); libcnotify_printf( "%s: upgrade Exchange 5.5 format\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->upgrade_free_pages, value_32bit ); libcnotify_printf( "%s: upgrade free pages\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->upgrade_space_map_pages, value_32bit ); libcnotify_printf( "%s: upgrade space map pages\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: current shadow volume backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->current_shadow_volume_backup, 24, 0 ); libcnotify_printf( "%s: creation format version\t\t\t: 0x%08" PRIx32 "\n", function, file_header->creation_format_version ); libcnotify_printf( "%s: creation format revision\t\t: %" PRIu32 " (0x%08" PRIx32 ")\n", function, file_header->creation_format_revision, file_header->creation_format_revision ); libcnotify_printf( "%s: unknown3:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->unknown3, 16, 0 ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->old_repair_count, value_32bit ); libcnotify_printf( "%s: old repair count\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->ecc_fix_success_count, value_32bit ); libcnotify_printf( "%s: ECC fix success count\t\t\t: %" PRIu32 "\n", function, value_32bit ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->ecc_fix_success_time, 8, "ECC fix success time", "\t\t\t", NULL ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->old_ecc_fix_success_count, value_32bit ); libcnotify_printf( "%s: old ECC fix success count\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->ecc_fix_error_count, value_32bit ); libcnotify_printf( "%s: ECC fix error count\t\t\t: %" PRIu32 "\n", function, value_32bit ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->ecc_fix_error_time, 8, "ECC fix error time", "\t\t\t", NULL ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->old_ecc_fix_error_count, value_32bit ); libcnotify_printf( "%s: old ECC fix error count\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->bad_checksum_error_count, value_32bit ); libcnotify_printf( "%s: bad checksum error count\t\t: %" PRIu32 "\n", function, value_32bit ); libesedb_debug_print_log_time( ( (esedb_file_header_t *) data )->bad_checksum_error_time, 8, "bad checksum error time", "\t\t\t", NULL ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->old_bad_checksum_error_count, value_32bit ); libcnotify_printf( "%s: old bad checksum error count\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: committed log:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->committed_log, 4, 0 ); libcnotify_printf( "%s: previous shadow volume backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->previous_shadow_volume_backup, 24, 0 ); libcnotify_printf( "%s: previous differential backup:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->previous_differential_backup, 24, 0 ); libcnotify_printf( "%s: unknown4:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->unknown4, 40, 0 ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->nls_major_version, value_32bit ); libcnotify_printf( "%s: NLS major version\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->nls_minor_version, value_32bit ); libcnotify_printf( "%s: NLS minor version\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); libcnotify_printf( "%s: unknown5:\n", function ); libcnotify_print_data( ( (esedb_file_header_t *) data )->unknown5, 148, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); byte_stream_copy_to_uint32_little_endian( ( (esedb_file_header_t *) data )->unknown_flags, value_32bit ); libcnotify_printf( "%s: unknown flags\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libesedb_checksum_calculate_little_endian_xor32( &calculated_xor32_checksum, &( data[ 4 ] ), data_size - 4, 0x89abcdef, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to calculate XOR-32 checksum.", function ); return( -1 ); } if( ( file_header->database_state != 2 ) && ( stored_xor32_checksum != calculated_xor32_checksum ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in file header checksum ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).", function, stored_xor32_checksum, calculated_xor32_checksum ); return( -1 ); } /* TODO add more values to internal structures */ return( 1 ); } /* Reads the file header * Returns 1 if successful or -1 on error */ int libesedb_file_header_read_file_io_handle( libesedb_file_header_t *file_header, libbfio_handle_t *file_io_handle, off64_t file_offset, libcerror_error_t **error ) { uint8_t file_header_data[ sizeof( esedb_file_header_t ) ]; static char *function = "libesedb_file_header_read_file_io_handle"; ssize_t read_count = 0; if( file_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading file header at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, file_offset, file_offset ); } #endif read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, file_header_data, sizeof( esedb_file_header_t ), file_offset, error ); if( read_count != (ssize_t) sizeof( esedb_file_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, file_offset, file_offset ); return( -1 ); } if( libesedb_file_header_read_data( file_header, file_header_data, sizeof( esedb_file_header_t ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_space_tree_value.h0000644000175000017500000000325514610727250023452 0ustar00lordyestalordyesta/* * Space tree value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_SPACE_TREE_VALUE_H ) #define _LIBESEDB_SPACE_TREE_VALUE_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_space_tree_value libesedb_space_tree_value_t; struct libesedb_space_tree_value { /* The number of pages */ uint32_t number_of_pages; }; int libesedb_space_tree_value_initialize( libesedb_space_tree_value_t **space_tree_value, libcerror_error_t **error ); int libesedb_space_tree_value_free( libesedb_space_tree_value_t **space_tree_value, libcerror_error_t **error ); int libesedb_space_tree_value_read_data( libesedb_space_tree_value_t *space_tree_value, const uint8_t *data, size_t data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_SPACE_TREE_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_io_handle.h0000644000175000017500000000543014610727250022063 0ustar00lordyestalordyesta/* * Input/Output (IO) handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_IO_HANDLE_H ) #define _LIBESEDB_IO_HANDLE_H #include #include #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif extern const uint8_t esedb_file_signature[ 4 ]; typedef struct libesedb_io_handle libesedb_io_handle_t; struct libesedb_io_handle { /* The file type */ uint32_t file_type; /* The format version */ uint32_t format_version; /* The format revision number */ uint32_t format_revision; /* The creation format version */ uint32_t creation_format_version; /* The creation format revision number */ uint32_t creation_format_revision; /* The file size */ size64_t file_size; /* The pages data offset */ off64_t pages_data_offset; /* The pages data size */ size64_t pages_data_size; /* The page size */ uint32_t page_size; /* The last page number */ uint32_t last_page_number; /* The codepage of the ASCII strings */ int ascii_codepage; /* Value to indicate if abort was signalled */ int abort; }; int libesedb_io_handle_initialize( libesedb_io_handle_t **io_handle, libcerror_error_t **error ); int libesedb_io_handle_free( libesedb_io_handle_t **io_handle, libcerror_error_t **error ); int libesedb_io_handle_clear( libesedb_io_handle_t *io_handle, libcerror_error_t **error ); int libesedb_io_handle_set_pages_data_range( libesedb_io_handle_t *io_handle, size64_t file_size, libcerror_error_t **error ); int libesedb_io_handle_read_page( libesedb_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_IO_HANDLE_H ) */ libesedb-20240420/libesedb/libesedb_leaf_page_descriptor.c0000644000175000017500000001070214610727250024273 0ustar00lordyestalordyesta/* * Leaf page descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_leaf_page_descriptor.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" /* Creates a page value * Make sure the value leaf_page_descriptor is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_leaf_page_descriptor_initialize( libesedb_leaf_page_descriptor_t **leaf_page_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_leaf_page_descriptor_initialize"; if( leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page value.", function ); return( -1 ); } if( *leaf_page_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page value value already set.", function ); return( -1 ); } *leaf_page_descriptor = memory_allocate_structure( libesedb_leaf_page_descriptor_t ); if( *leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page value.", function ); goto on_error; } if( memory_set( *leaf_page_descriptor, 0, sizeof( libesedb_leaf_page_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page value.", function ); goto on_error; } return( 1 ); on_error: if( *leaf_page_descriptor != NULL ) { memory_free( *leaf_page_descriptor ); *leaf_page_descriptor = NULL; } return( -1 ); } /* Frees a page value * Returns 1 if successful or -1 on error */ int libesedb_leaf_page_descriptor_free( libesedb_leaf_page_descriptor_t **leaf_page_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_leaf_page_descriptor_free"; if( leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page value.", function ); return( -1 ); } if( *leaf_page_descriptor != NULL ) { /* The data is referenced and freed elsewhere */ memory_free( *leaf_page_descriptor ); *leaf_page_descriptor = NULL; } return( 1 ); } /* Compares 2 leaf page descriptors by file reference * Returns LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error */ int libesedb_leaf_page_descriptor_compare( libesedb_leaf_page_descriptor_t *first_leaf_page_descriptor, libesedb_leaf_page_descriptor_t *second_leaf_page_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_leaf_page_descriptor_compare"; if( first_leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first leaf page descriptor.", function ); return( -1 ); } if( second_leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second leaf page descriptor.", function ); return( -1 ); } if( first_leaf_page_descriptor->last_leaf_value_index < second_leaf_page_descriptor->first_leaf_value_index ) { return( LIBCDATA_COMPARE_LESS ); } else if( first_leaf_page_descriptor->first_leaf_value_index > second_leaf_page_descriptor->last_leaf_value_index ) { return( LIBCDATA_COMPARE_GREATER ); } return( LIBCDATA_COMPARE_EQUAL ); } libesedb-20240420/libesedb/libesedb_i18n.c0000644000175000017500000000326314610727250020715 0ustar00lordyestalordyesta/* * Internationalization (i18n) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_LIBINTL_H ) && defined( ENABLE_NLS ) #include #endif #include "libesedb_i18n.h" #include "libesedb_libcerror.h" static int libesedb_i18n_initialized = 0; /* Initializes library internationalization functions */ int libesedb_i18n_initialize( libcerror_error_t **error ) { static char *function = "libesedb_i18n_initialize"; if( libesedb_i18n_initialized == 0 ) { #if defined( HAVE_BINDTEXTDOMAIN ) && defined( LOCALEDIR ) if( bindtextdomain( "libesedb", LOCALEDIR ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to bind text domain.", function ); return( -1 ); } #endif /* defined( HAVE_BINDTEXTDOMAIN ) && defined( LOCALEDIR ) */ libesedb_i18n_initialized = 1; } return( 1 ); } libesedb-20240420/libesedb/libesedb_multi_value.c0000644000175000017500000012122714610727250022465 0ustar00lordyestalordyesta/* * Multi value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_compression.h" #include "libesedb_definitions.h" #include "libesedb_libcerror.h" #include "libesedb_libfvalue.h" #include "libesedb_multi_value.h" #include "libesedb_types.h" /* Creates a multi value * Make sure the value multi_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_multi_value_initialize( libesedb_multi_value_t **multi_value, libesedb_catalog_definition_t *column_catalog_definition, libfvalue_value_t *record_value, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_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 ); } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column catalog definition.", function ); return( -1 ); } if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } internal_multi_value = memory_allocate_structure( libesedb_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 internal multi value.", function ); goto on_error; } if( memory_set( internal_multi_value, 0, sizeof( libesedb_internal_multi_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear internal multi value.", function ); goto on_error; } internal_multi_value->column_catalog_definition = column_catalog_definition; internal_multi_value->record_value = record_value; *multi_value = (libesedb_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 * Returns 1 if successful or -1 on error */ int libesedb_multi_value_free( libesedb_multi_value_t **multi_value, libcerror_error_t **error ) { static char *function = "libesedb_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 ) { /* The column_catalog_definition and record_value references are freed elsewhere */ memory_free( *multi_value ); *multi_value = NULL; } return( 1 ); } /* Retrieves the column type * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_column_type( libesedb_multi_value_t *multi_value, uint32_t *column_type, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_column_type"; 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of values of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_number_of_values( libesedb_multi_value_t *multi_value, int *number_of_values, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_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 = (libesedb_internal_multi_value_t *) multi_value; if( libfvalue_value_get_number_of_value_entries( internal_multi_value->record_value, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of value entries.", function ); } return( 1 ); } /* TODO deprecate */ /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *column_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value"; int encoding = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_index, value_data, value_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry data: %d.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the value data size of the specific value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *value_data_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_data_size"; size_t value_data_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 = (libesedb_internal_multi_value_t *) multi_value; if( libfvalue_value_get_entry( internal_multi_value->record_value, multi_value_index, &value_data_offset, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry data: %d size.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the value data of the specific value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_data"; int encoding = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libfvalue_value_copy_entry_data( internal_multi_value->record_value, multi_value_index, value_data, value_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry data: %d.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 8-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_8bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_8bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_8bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_8bit( internal_multi_value->record_value, multi_value_index, value_8bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 8-bit value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 16-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_16bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *value_16bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_16bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_16bit( internal_multi_value->record_value, multi_value_index, value_16bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 16-bit value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_32bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_32bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_32bit( internal_multi_value->record_value, multi_value_index, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 32-bit value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_64bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_64bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_64bit( internal_multi_value->record_value, multi_value_index, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 64-bit value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 32-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_floating_point_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, float *value_32bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_floating_point_32bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_FLOAT_32BIT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_float( internal_multi_value->record_value, multi_value_index, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 32-bit floating point value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 64-bit floating point value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_floating_point_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, double *value_64bit, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_floating_point_64bit"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_copy_to_double( internal_multi_value->record_value, multi_value_index, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 64-bit floating point value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the 64-bit filetime value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_filetime( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_filetime, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libesedb_multi_value_get_value_filetime"; uint32_t column_type = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_DATE_TIME ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } /* Copy the filetime to a 64-bit value */ if( libfvalue_value_copy_to_64bit( internal_multi_value->record_value, multi_value_index, value_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to 64-bit value.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string 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 libesedb_multi_value_get_value_utf8_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *entry_data = NULL; static char *function = "libesedb_multi_value_get_value_utf8_string_size"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_data_flags( internal_multi_value->record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data flags.", function ); return( -1 ); } if( ( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) && ( multi_value_index == 0 ) ) { if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_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 record value entry: %d data.", function, multi_value_index ); return( -1 ); } result = libesedb_compression_get_utf8_string_size( entry_data, entry_data_size, utf8_string_size, error ); } else { result = libfvalue_value_get_utf8_string_size( internal_multi_value->record_value, multi_value_index, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve UTF-8 string size: %d.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 encoded 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 libesedb_multi_value_get_value_utf8_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *entry_data = NULL; static char *function = "libesedb_multi_value_get_value_utf8_string"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_data_flags( internal_multi_value->record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data flags.", function ); return( -1 ); } if( ( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) && ( multi_value_index == 0 ) ) { if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_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 record value entry: %d data.", function, multi_value_index ); return( -1 ); } result = libesedb_compression_copy_to_utf8_string( entry_data, entry_data_size, utf8_string, utf8_string_size, error ); } else { result = libfvalue_value_copy_to_utf8_string( internal_multi_value->record_value, multi_value_index, utf8_string, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to UTF-8 string.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string 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 libesedb_multi_value_get_value_utf16_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *entry_data = NULL; static char *function = "libesedb_multi_value_get_value_utf16_string_size"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_data_flags( internal_multi_value->record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data flags.", function ); return( -1 ); } if( ( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) && ( multi_value_index == 0 ) ) { if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_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 record value entry: %d data.", function, multi_value_index ); return( -1 ); } result = libesedb_compression_get_utf16_string_size( entry_data, entry_data_size, utf16_string_size, error ); } else { result = libfvalue_value_get_utf16_string_size( internal_multi_value->record_value, multi_value_index, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve UTF-16 string size: %d.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 encoded 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 libesedb_multi_value_get_value_utf16_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *entry_data = NULL; static char *function = "libesedb_multi_value_get_value_utf16_string"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_data_flags( internal_multi_value->record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data flags.", function ); return( -1 ); } if( ( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) && ( multi_value_index == 0 ) ) { if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_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 record value entry: %d data.", function, multi_value_index ); return( -1 ); } result = libesedb_compression_copy_to_utf16_string( entry_data, entry_data_size, utf16_string, utf16_string_size, error ); } else { result = libfvalue_value_copy_to_utf16_string( internal_multi_value->record_value, multi_value_index, utf16_string, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value entry: %d to UTF-16 string.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* 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 libesedb_multi_value_get_value_binary_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *binary_data_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *value_entry_data = NULL; static char *function = "libesedb_multi_value_get_value_binary_data_size"; uint32_t column_type = 0; int encoding = 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 = (libesedb_internal_multi_value_t *) multi_value; if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_index, &value_entry_data, binary_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry data: %d.", function, multi_value_index ); return( -1 ); } return( 1 ); } /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libesedb_multi_value_get_value_binary_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ) { libesedb_internal_multi_value_t *internal_multi_value = NULL; uint8_t *value_entry_data = NULL; static char *function = "libesedb_multi_value_get_value_binary_data"; size_t value_entry_data_size = 0; uint32_t column_type = 0; int encoding = 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 = (libesedb_internal_multi_value_t *) multi_value; 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 > (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 ); } if( libesedb_catalog_definition_get_column_type( internal_multi_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libfvalue_value_get_entry_data( internal_multi_value->record_value, multi_value_index, &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 retrive value entry data: %d.", function, multi_value_index ); return( -1 ); } if( binary_data_size < value_entry_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: binary data too small.", function ); return( -1 ); } if( memory_copy( binary_data, value_entry_data, value_entry_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy binary data.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_block_descriptor.h0000644000175000017500000000276414610727250023500 0ustar00lordyestalordyesta/* * Block descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_BLOCK_DESCRIPTOR_H ) #define _LIBESEDB_BLOCK_DESCRIPTOR_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_block_descriptor libesedb_block_descriptor_t; struct libesedb_block_descriptor { /* The page number */ uint32_t page_number; }; int libesedb_block_descriptor_initialize( libesedb_block_descriptor_t **block_descriptor, libcerror_error_t **error ); int libesedb_block_descriptor_free( libesedb_block_descriptor_t **block_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_BLOCK_DESCRIPTOR_H ) */ libesedb-20240420/libesedb/libesedb_notify.c0000644000175000017500000000530214610727250021442 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_notify.h" #if !defined( HAVE_LOCAL_LIBESEDB ) /* Sets the verbose notification */ void libesedb_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libesedb_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libesedb_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 libesedb_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libesedb_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 libesedb_notify_stream_close( libcerror_error_t **error ) { static char *function = "libesedb_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 /* !defined( HAVE_LOCAL_LIBESEDB ) */ libesedb-20240420/libesedb/libesedb_block_tree.h0000644000175000017500000000445314610727250022256 0ustar00lordyestalordyesta/* * Block tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_BLOCK_TREE_H ) #define _LIBESEDB_BLOCK_TREE_H #include #include #include "libesedb_block_descriptor.h" #include "libesedb_block_tree_node.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_block_tree libesedb_block_tree_t; struct libesedb_block_tree { /* The block tree root node */ libesedb_block_tree_node_t *root_node; /* The leaf value size */ size64_t leaf_value_size; }; int libesedb_block_tree_initialize( libesedb_block_tree_t **block_tree, size64_t size, size64_t leaf_value_size, libcerror_error_t **error ); int libesedb_block_tree_free( libesedb_block_tree_t **block_tree, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libesedb_block_tree_get_block_descriptor_by_offset( libesedb_block_tree_t *block_tree, off64_t offset, libesedb_block_descriptor_t **block_descriptor, off64_t *block_offset, libcerror_error_t **error ); int libesedb_block_tree_insert_block_descriptor_by_offset( libesedb_block_tree_t *block_tree, off64_t offset, libesedb_block_descriptor_t *block_descriptor, int *leaf_value_index, libesedb_block_tree_node_t **leaf_block_tree_node, libesedb_block_descriptor_t **existing_block_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_BLOCK_TREE_H ) */ libesedb-20240420/libesedb/libesedb_codepage.h0000644000175000017500000000606414610727640021717 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_CODEPAGE_H ) #define _LIBESEDB_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb * The definitions in are copied here * for local use of libesedb */ #if !defined( HAVE_LOCAL_LIBESEDB ) #include #else /* The codepage definitions */ enum LIBESEDB_CODEPAGES { LIBESEDB_CODEPAGE_ASCII = 20127, LIBESEDB_CODEPAGE_ISO_8859_1 = 28591, LIBESEDB_CODEPAGE_ISO_8859_2 = 28592, LIBESEDB_CODEPAGE_ISO_8859_3 = 28593, LIBESEDB_CODEPAGE_ISO_8859_4 = 28594, LIBESEDB_CODEPAGE_ISO_8859_5 = 28595, LIBESEDB_CODEPAGE_ISO_8859_6 = 28596, LIBESEDB_CODEPAGE_ISO_8859_7 = 28597, LIBESEDB_CODEPAGE_ISO_8859_8 = 28598, LIBESEDB_CODEPAGE_ISO_8859_9 = 28599, LIBESEDB_CODEPAGE_ISO_8859_10 = 28600, LIBESEDB_CODEPAGE_ISO_8859_11 = 28601, LIBESEDB_CODEPAGE_ISO_8859_13 = 28603, LIBESEDB_CODEPAGE_ISO_8859_14 = 28604, LIBESEDB_CODEPAGE_ISO_8859_15 = 28605, LIBESEDB_CODEPAGE_ISO_8859_16 = 28606, LIBESEDB_CODEPAGE_KOI8_R = 20866, LIBESEDB_CODEPAGE_KOI8_U = 21866, LIBESEDB_CODEPAGE_WINDOWS_874 = 874, LIBESEDB_CODEPAGE_WINDOWS_932 = 932, LIBESEDB_CODEPAGE_WINDOWS_936 = 936, LIBESEDB_CODEPAGE_WINDOWS_949 = 949, LIBESEDB_CODEPAGE_WINDOWS_950 = 950, LIBESEDB_CODEPAGE_WINDOWS_1250 = 1250, LIBESEDB_CODEPAGE_WINDOWS_1251 = 1251, LIBESEDB_CODEPAGE_WINDOWS_1252 = 1252, LIBESEDB_CODEPAGE_WINDOWS_1253 = 1253, LIBESEDB_CODEPAGE_WINDOWS_1254 = 1254, LIBESEDB_CODEPAGE_WINDOWS_1255 = 1255, LIBESEDB_CODEPAGE_WINDOWS_1256 = 1256, LIBESEDB_CODEPAGE_WINDOWS_1257 = 1257, LIBESEDB_CODEPAGE_WINDOWS_1258 = 1258 }; #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libesedb_codepage libesedb_codepage_t; struct libesedb_codepage { /* The codepage */ uint32_t codepage; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libesedb_codepage_get_identifier( uint32_t codepage ); const char *libesedb_codepage_get_description( uint32_t codepage ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_INTERNAL_CODEPAGE_H ) */ libesedb-20240420/libesedb/libesedb_table.h0000644000175000017500000001171314610727250021231 0ustar00lordyestalordyesta/* * Table functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_TABLE_H ) #define _LIBESEDB_TABLE_H #include #include #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_table_definition.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_table libesedb_internal_table_t; struct libesedb_internal_table { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The IO handle */ libesedb_io_handle_t *io_handle; /* The table definition */ libesedb_table_definition_t *table_definition; /* The template table definition */ libesedb_table_definition_t *template_table_definition; /* The pages vector */ libfdata_vector_t *pages_vector; /* The pages cache */ libfcache_cache_t *pages_cache; /* The long values pages vector */ libfdata_vector_t *long_values_pages_vector; /* The long values pages cache */ libfcache_cache_t *long_values_pages_cache; /* The table page tree */ libesedb_page_tree_t *table_page_tree; /* The long values page tree */ libesedb_page_tree_t *long_values_page_tree; }; int libesedb_table_initialize( libesedb_table_t **table, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_free( libesedb_table_t **table, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_identifier( libesedb_table_t *table, uint32_t *identifier, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name_size( libesedb_table_t *table, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf8_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name_size( libesedb_table_t *table, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf16_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name_size( libesedb_table_t *table, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf8_template_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name_size( libesedb_table_t *table, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_utf16_template_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_number_of_columns( libesedb_table_t *table, int *number_of_columns, uint8_t flags, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_column( libesedb_table_t *table, int column_entry, libesedb_column_t **column, uint8_t flags, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_number_of_indexes( libesedb_table_t *table, int *number_of_indexes, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_index( libesedb_table_t *table, int index_entry, libesedb_index_t **index, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_number_of_records( libesedb_table_t *table, int *number_of_records, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_table_get_record( libesedb_table_t *table, int record_entry, libesedb_record_t **record, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_TABLE_H ) */ libesedb-20240420/libesedb/libesedb_definitions.h0000644000175000017500000001731314610746302022456 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_DEFINITIONS_H ) #define _LIBESEDB_INTERNAL_DEFINITIONS_H #include #include #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #define LIBESEDB_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBESEDB_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb */ #if !defined( HAVE_LOCAL_LIBESEDB ) #include /* The definitions in are copied here * for local use of libesedb */ #else #define LIBESEDB_VERSION 20240420 /* The version string */ #define LIBESEDB_VERSION_STRING "20240420" /* 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 LIBESEDB_ACCESS_FLAGS { LIBESEDB_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBESEDB_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE ) /* The file types */ enum LIBESEDB_FILE_TYPES { LIBESEDB_FILE_TYPE_DATABASE = 0, LIBESEDB_FILE_TYPE_STREAMING_FILE = 1 }; /* The get columns flags */ enum LIBESEDB_GET_COLUMN_FLAGS { LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01 }; /* The column types */ enum LIBESEDB_COLUMN_TYPES { LIBESEDB_COLUMN_TYPE_NULL = 0, LIBESEDB_COLUMN_TYPE_BOOLEAN = 1, LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4, LIBESEDB_COLUMN_TYPE_CURRENCY = 5, LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6, LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7, LIBESEDB_COLUMN_TYPE_DATE_TIME = 8, LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9, LIBESEDB_COLUMN_TYPE_TEXT = 10, LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11, LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12, LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13, LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14, LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15, LIBESEDB_COLUMN_TYPE_GUID = 16, LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17 }; /* The value flags */ enum LIBESEDB_VALUE_FLAGS { LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01, LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02, LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04, LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08, LIBESEDB_VALUE_FLAG_0x10 = 0x10 }; #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #define LIBESEDB_FORMAT_REVISION_NEW_RECORD_FORMAT 0x0b #define LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER 0x11 /* The page flags */ enum LIBESEDB_PAGE_FLAGS { LIBESEDB_PAGE_FLAG_IS_ROOT = 0x00000001, LIBESEDB_PAGE_FLAG_IS_LEAF = 0x00000002, LIBESEDB_PAGE_FLAG_IS_PARENT = 0x00000004, LIBESEDB_PAGE_FLAG_IS_EMPTY = 0x00000008, LIBESEDB_PAGE_FLAG_IS_SPACE_TREE = 0x00000020, LIBESEDB_PAGE_FLAG_IS_INDEX = 0x00000040, LIBESEDB_PAGE_FLAG_IS_LONG_VALUE = 0x00000080, LIBESEDB_PAGE_FLAG_0x0400 = 0x00000400, LIBESEDB_PAGE_FLAG_0x0800 = 0x00000800, LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT = 0x00002000, LIBESEDB_PAGE_FLAG_IS_SCRUBBED = 0x00004000, LIBESEDB_PAGE_FLAG_0x8000 = 0x00008000, LIBESEDB_PAGE_FLAG_0x10000 = 0x00010000 }; /* The page tag flags */ enum LIBESEDB_PAGE_TAG_FLAGS { LIBESEDB_PAGE_TAG_FLAG_0x01 = 0x01, LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT = 0x02, LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE = 0x04 }; /* The catalog definitions types */ enum LIBESEDB_CATALOG_DEFINITION_TYPES { LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE = 1, LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN = 2, LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX = 3, LIBESEDB_CATALOG_DEFINITION_TYPE_LONG_VALUE = 4, LIBESEDB_CATALOG_DEFINITION_TYPE_CALLBACK = 5 }; /* Definitions of fixed FDP object identifiers */ #define LIBESEDB_FDP_OBJECT_IDENTIFIER_DATABASE 1 #define LIBESEDB_FDP_OBJECT_IDENTIFIER_CATALOG 2 #define LIBESEDB_FDP_OBJECT_IDENTIFIER_CATALOG_BACKUP 3 /* Definitions of fixed page numbers */ #define LIBESEDB_PAGE_NUMBER_DATABASE 1 #define LIBESEDB_PAGE_NUMBER_CATALOG 4 #define LIBESEDB_PAGE_NUMBER_CATALOG_BACKUP 24 /* Page key search related definitions */ enum LIBESEDB_PAGE_KEY_FLAGS { LIBESEDB_PAGE_KEY_FLAG_REVERSED_KEY = 0x01, LIBESEDB_PAGE_KEY_FLAG_TEST = 0x80 }; /* The key type definitions */ enum LIBESEDB_KEY_TYPES { LIBESEDB_KEY_TYPE_BRANCH = (uint8_t) 'b', LIBESEDB_KEY_TYPE_INDEX_VALUE = (uint8_t) 'I', LIBESEDB_KEY_TYPE_LEAF = (uint8_t) 'l', LIBESEDB_KEY_TYPE_LONG_VALUE = (uint8_t) 'L', LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT = (uint8_t) 'S' }; /* The tagged data type format definitions */ enum LIBESEDB_TAGGED_DATA_TYPES_FORMATS { LIBESEDB_TAGGED_DATA_TYPES_FORMAT_LINEAR, LIBESEDB_TAGGED_DATA_TYPES_FORMAT_INDEX, }; /* The record flags */ enum LIBESEDB_RECORD_FLAGS { LIBESEDB_RECORD_FLAG_IS_CORRUPTED = 0x01, }; /* The file attribute flags */ enum LIBESEDB_FILE_ATTRIBUTE_FLAGS { LIBESEDB_FILE_ATTRIBUTE_FLAG_READ_ONLY = 0x00000001, LIBESEDB_FILE_ATTRIBUTE_FLAG_HIDDEN = 0x00000002, LIBESEDB_FILE_ATTRIBUTE_FLAG_SYSTEM = 0x00000004, LIBESEDB_FILE_ATTRIBUTE_FLAG_DIRECTORY = 0x00000010, LIBESEDB_FILE_ATTRIBUTE_FLAG_ARCHIVE = 0x00000020, LIBESEDB_FILE_ATTRIBUTE_FLAG_DEVICE = 0x00000040, LIBESEDB_FILE_ATTRIBUTE_FLAG_NORMAL = 0x00000080, LIBESEDB_FILE_ATTRIBUTE_FLAG_TEMPORARY = 0x00000100, LIBESEDB_FILE_ATTRIBUTE_FLAG_SPARSE_FILE = 0x00000200, LIBESEDB_FILE_ATTRIBUTE_FLAG_REPARSE_POINT = 0x00000400, LIBESEDB_FILE_ATTRIBUTE_FLAG_COMPRESSED = 0x00000800, LIBESEDB_FILE_ATTRIBUTE_FLAG_OFFLINE = 0x00001000, LIBESEDB_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED = 0x00002000, LIBESEDB_FILE_ATTRIBUTE_FLAG_ENCRYPTED = 0x00004000, LIBESEDB_FILE_ATTRIBUTE_FLAG_VIRTUAL = 0x00010000 }; /* Flag to indicate the page tree node is virtual */ #define LIBESEDB_PAGE_TREE_NODE_FLAG_IS_VIRTUAL LIBFDATA_RANGE_FLAG_USER_DEFINED_1 /* The maximum number of cache entries definitions */ #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_PAGES ( 8 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_INDEX_VALUES ( 32 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_LONG_VALUES ( 128 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_LONG_VALUES_DATA 8 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_TABLE_VALUES ( 32 * 1024 ) - 3 #define LIBESEDB_MAXIMUM_CACHE_ENTRIES_TREE_VALUES ( 128 * 1024 ) - 3 #define LIBESEDB_VALUE_DATA_FLAG_HAS_TAG_DATA_TYPE_FLAGS LIBFVALUE_VALUE_DATA_FLAG_USER_DEFINED_1 #define LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES 256 #define LIBESEDB_MAXIMUM_NUMBER_OF_LEAF_PAGES 16 * 1024 #define LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH 256 #endif /* !defined( _LIBESEDB_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libesedb/libesedb_block_tree.c0000644000175000017500000002620514610727250022250 0ustar00lordyestalordyesta/* * Block tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_block_descriptor.h" #include "libesedb_block_tree.h" #include "libesedb_block_tree_node.h" #include "libesedb_definitions.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_unused.h" /* Creates a block tree * Make sure the value block_tree is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_block_tree_initialize( libesedb_block_tree_t **block_tree, size64_t size, size64_t leaf_value_size, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_initialize"; if( block_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree.", function ); return( -1 ); } if( *block_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid block tree value already set.", function ); return( -1 ); } *block_tree = memory_allocate_structure( libesedb_block_tree_t ); if( *block_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block tree.", function ); goto on_error; } if( memory_set( *block_tree, 0, sizeof( libesedb_block_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block tree.", function ); memory_free( *block_tree ); *block_tree = NULL; return( -1 ); } if( libesedb_block_tree_node_initialize( &( ( *block_tree )->root_node ), 0, size, leaf_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root node.", function ); goto on_error; } ( *block_tree )->leaf_value_size = leaf_value_size; return( 1 ); on_error: if( *block_tree != NULL ) { memory_free( *block_tree ); *block_tree = NULL; } return( -1 ); } /* Frees a block tree * Returns 1 if successful or -1 on error */ int libesedb_block_tree_free( libesedb_block_tree_t **block_tree, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libesedb_block_tree_free"; int result = 1; if( block_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree.", function ); return( -1 ); } if( *block_tree != NULL ) { if( ( *block_tree )->root_node != NULL ) { if( libesedb_block_tree_node_free( &( ( *block_tree )->root_node ), value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root node.", function ); result = -1; } } memory_free( *block_tree ); *block_tree = NULL; } return( result ); } /* Retrieves the block descriptor for a specific offset * Returns 1 if successful, 0 if not available or -1 on error */ int libesedb_block_tree_get_block_descriptor_by_offset( libesedb_block_tree_t *block_tree, off64_t offset, libesedb_block_descriptor_t **block_descriptor, off64_t *block_offset, libcerror_error_t **error ) { libesedb_block_descriptor_t *safe_block_descriptor = NULL; libesedb_block_tree_node_t *block_tree_node = NULL; static char *function = "libesedb_block_tree_get_block_descriptor_by_offset"; off64_t safe_block_offset = 0; if( block_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree.", function ); return( -1 ); } if( block_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block descriptor.", function ); return( -1 ); } if( block_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block offset.", function ); return( -1 ); } block_tree_node = block_tree->root_node; while( block_tree_node->is_leaf_node == 0 ) { if( libesedb_block_tree_node_get_sub_node_at_offset( block_tree_node, offset, &block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } if( block_tree_node == NULL ) { return( 0 ); } } if( libesedb_block_tree_node_get_leaf_value_at_offset( block_tree_node, offset, &safe_block_descriptor, &safe_block_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); return( -1 ); } *block_descriptor = safe_block_descriptor; *block_offset = safe_block_offset; if( safe_block_descriptor == NULL ) { return( 0 ); } return( 1 ); } /* Inserts the block descriptor for a specific offset * Returns 1 if successful, 0 if already set or -1 on error */ int libesedb_block_tree_insert_block_descriptor_by_offset( libesedb_block_tree_t *block_tree, off64_t offset, libesedb_block_descriptor_t *block_descriptor, int *leaf_value_index, libesedb_block_tree_node_t **leaf_block_tree_node, libesedb_block_descriptor_t **existing_block_descriptor, libcerror_error_t **error ) { libesedb_block_descriptor_t *safe_block_descriptor = NULL; libesedb_block_tree_node_t *block_tree_node = NULL; libesedb_block_tree_node_t *safe_block_tree_node = NULL; libesedb_block_tree_node_t *sub_block_tree_node = NULL; static char *function = "libesedb_block_tree_insert_block_descriptor_by_offset"; off64_t block_offset = 0; off64_t sub_node_index = 0; off64_t sub_node_offset = 0; if( block_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree.", function ); return( -1 ); } if( leaf_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf value index.", function ); return( -1 ); } if( leaf_block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf block tree node.", function ); return( -1 ); } if( existing_block_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing block descriptor.", function ); return( -1 ); } safe_block_tree_node = block_tree->root_node; while( safe_block_tree_node->is_leaf_node == 0 ) { if( libesedb_block_tree_node_get_sub_node_at_offset( safe_block_tree_node, offset, &block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); goto on_error; } if( block_tree_node == NULL ) { sub_node_offset = offset - safe_block_tree_node->start_offset; sub_node_index = sub_node_offset / safe_block_tree_node->sub_node_size; sub_node_offset = safe_block_tree_node->start_offset + ( sub_node_index * safe_block_tree_node->sub_node_size ); if( libesedb_block_tree_node_initialize( &sub_block_tree_node, sub_node_offset, safe_block_tree_node->sub_node_size, block_tree->leaf_value_size, 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( libesedb_block_tree_node_set_sub_node_at_offset( safe_block_tree_node, offset, sub_block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set sub node at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); goto on_error; } block_tree_node = sub_block_tree_node; sub_block_tree_node = NULL; } safe_block_tree_node = block_tree_node; } *leaf_block_tree_node = safe_block_tree_node; if( libesedb_block_tree_node_get_leaf_value_at_offset( safe_block_tree_node, offset, &safe_block_descriptor, &block_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); goto on_error; } if( safe_block_descriptor != NULL ) { *existing_block_descriptor = safe_block_descriptor; return( 0 ); } if( libesedb_block_tree_node_set_leaf_value_at_offset( safe_block_tree_node, offset, block_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf value at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, offset, offset ); goto on_error; } *leaf_value_index = (int) ( offset / block_tree->leaf_value_size ); return( 1 ); on_error: if( sub_block_tree_node != NULL ) { libesedb_block_tree_node_free( &sub_block_tree_node, NULL, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_support.h0000644000175000017500000000370114610727250021654 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_SUPPORT_H ) #define _LIBESEDB_SUPPORT_H #include #include #include "libesedb_extern.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBESEDB ) LIBESEDB_EXTERN \ const char *libesedb_get_version( void ); LIBESEDB_EXTERN \ int libesedb_get_access_flags_read( void ); LIBESEDB_EXTERN \ int libesedb_get_codepage( int *codepage, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ LIBESEDB_EXTERN \ int libesedb_check_file_signature( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBESEDB_EXTERN \ int libesedb_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ); #endif LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *bfio_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_SUPPORT_H ) */ libesedb-20240420/libesedb/libesedb_catalog.h0000644000175000017500000000704714610727250021561 0ustar00lordyestalordyesta/* * Catalog functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_CATALOG_H ) #define _LIBESEDB_CATALOG_H #include #include #include "libesedb_block_tree.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_table_definition.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_catalog libesedb_catalog_t; struct libesedb_catalog { /* The page tree */ libesedb_page_tree_t *page_tree; /* The page block tree */ libesedb_block_tree_t *page_block_tree; /* The table definition array */ libcdata_array_t *table_definition_array; }; int libesedb_catalog_initialize( libesedb_catalog_t **catalog, libesedb_io_handle_t *io_handle, uint32_t root_page_number, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ); int libesedb_catalog_free( libesedb_catalog_t **catalog, libcerror_error_t **error ); int libesedb_catalog_read_value_data( libesedb_catalog_t *catalog, const uint8_t *data, size_t data_size, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_catalog_read_values_from_leaf_page( libesedb_catalog_t *catalog, libesedb_page_t *page, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_catalog_read_file_io_handle( libesedb_catalog_t *catalog, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libesedb_catalog_get_number_of_table_definitions( libesedb_catalog_t *catalog, int *number_of_table_definitions, libcerror_error_t **error ); int libesedb_catalog_get_table_definition_by_index( libesedb_catalog_t *catalog, int table_definition_index, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_catalog_get_table_definition_by_name( libesedb_catalog_t *catalog, const uint8_t *table_name, size_t table_name_size, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_catalog_get_table_definition_by_utf8_name( libesedb_catalog_t *catalog, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_catalog_get_table_definition_by_utf16_name( libesedb_catalog_t *catalog, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_definition_t **table_definition, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_CATALOG_H ) */ libesedb-20240420/libesedb/libesedb_codepage.c0000644000175000017500000000655214610727250021711 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_codepage.h" #if defined( HAVE_DEBUG_OUTPUT ) libesedb_codepage_t libesedb_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", "16-bit Unicode Transformation Format (UTF-16) or ASCII" }, { 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 *libesedb_codepage_get_identifier( uint32_t codepage ) { int iterator = 0; while( ( libesedb_codepages[ iterator ] ).codepage != (uint32_t) -1 ) { if( ( libesedb_codepages[ iterator ] ).codepage == codepage ) { break; } iterator++; } return( ( libesedb_codepages[ iterator ] ).identifier ); } /* Retrieves a string containing the codepage description */ const char *libesedb_codepage_get_description( uint32_t codepage ) { int iterator = 0; while( ( libesedb_codepages[ iterator ] ).codepage != (uint32_t) -1 ) { if( ( libesedb_codepages[ iterator ] ).codepage == codepage ) { break; } iterator++; } return( ( libesedb_codepages[ iterator ] ).description ); } #endif libesedb-20240420/libesedb/libesedb_file.h0000644000175000017500000001073614610727250021065 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_FILE_H ) #define _LIBESEDB_FILE_H #include #include #include "libesedb_catalog.h" #include "libesedb_database.h" #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_file libesedb_internal_file_t; struct libesedb_internal_file { /* The IO handle */ libesedb_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; /* Value to indicate if the file IO handle was opened inside the library */ uint8_t file_io_handle_opened_in_library; /* The pages vector */ libfdata_vector_t *pages_vector; /* The pages cache */ libfcache_cache_t *pages_cache; /* The database */ libesedb_database_t *database; /* The catalog */ libesedb_catalog_t *catalog; /* The backup catalog */ libesedb_catalog_t *backup_catalog; }; LIBESEDB_EXTERN \ int libesedb_file_initialize( libesedb_file_t **file, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_free( libesedb_file_t **file, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_signal_abort( libesedb_file_t *file, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_open( libesedb_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBESEDB_EXTERN \ int libesedb_file_open_wide( libesedb_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_close( libesedb_file_t *file, libcerror_error_t **error ); int libesedb_file_open_read( libesedb_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_type( libesedb_file_t *file, uint32_t *type, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_creation_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_page_size( libesedb_file_t *file, uint32_t *page_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_number_of_tables( libesedb_file_t *file, int *number_of_tables, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_table( libesedb_file_t *file, int table_entry, libesedb_table_t **table, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf8_name( libesedb_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_t **table, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_get_table_by_utf16_name( libesedb_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_t **table, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_FILE_H ) */ libesedb-20240420/libesedb/libesedb_page.c0000644000175000017500000011312114610727250021045 0ustar00lordyestalordyesta/* * Page functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_checksum.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_page.h" #include "libesedb_page_header.h" #include "libesedb_page_value.h" #include "esedb_page.h" /* Creates a page * Make sure the value page is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_initialize( libesedb_page_t **page, libcerror_error_t **error ) { static char *function = "libesedb_page_initialize"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( *page != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page value already set.", function ); return( -1 ); } *page = memory_allocate_structure( libesedb_page_t ); if( *page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page.", function ); goto on_error; } if( memory_set( *page, 0, sizeof( libesedb_page_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page.", function ); memory_free( *page ); *page = NULL; return( -1 ); } if( libesedb_page_header_initialize( &( ( *page )->header ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create header.", function ); goto on_error; } if( libcdata_array_initialize( &( ( *page )->values_array ), 0, 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; } return( 1 ); on_error: if( *page != NULL ) { if( ( *page )->header != NULL ) { libesedb_page_header_free( &( ( *page )->header ), NULL ); } memory_free( *page ); *page = NULL; } return( -1 ); } /* Frees a page * Returns 1 if successful or -1 on error */ int libesedb_page_free( libesedb_page_t **page, libcerror_error_t **error ) { static char *function = "libesedb_page_free"; int result = 1; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( *page != NULL ) { if( libesedb_page_header_free( &( ( *page )->header ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free header.", function ); result = -1; } if( libcdata_array_free( &( ( *page )->values_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_page_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free values array.", function ); result = -1; } if( ( *page )->data != NULL ) { memory_free( ( *page )->data ); } memory_free( *page ); *page = NULL; } return( result ); } /* Calculates the page checksums * Returns 1 if successful, 0 if page is empty or -1 on error */ int libesedb_page_calculate_checksums( libesedb_page_t *page, libesedb_io_handle_t *io_handle, const uint8_t *page_data, size_t page_data_size, uint32_t *ecc32_checksum, uint32_t *xor32_checksum, libcerror_error_t **error ) { static char *function = "libesedb_page_calculate_checksums"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( page_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page data.", function ); return( -1 ); } if( ( page_data_size < 4 ) || ( page_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page data size value out of bounds.", 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 ); } /* TODO for now don't bother calculating checksums for uninitialized pages */ if( ( page_data[ 0 ] == 0 ) && ( page_data[ 1 ] == 0 ) && ( page_data[ 2 ] == 0 ) && ( page_data[ 3 ] == 0 ) ) { return( 0 ); } if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) { /* TODO calculate checksum */ } else if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_NEW_RECORD_FORMAT ) && ( ( page->header->flags & LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT ) != 0 ) ) { if( libesedb_checksum_calculate_little_endian_ecc32( ecc32_checksum, xor32_checksum, page_data, page_data_size, 8, page->page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to calculate ECC-32 and XOR-32 checksum.", function ); return( -1 ); } } else { if( libesedb_checksum_calculate_little_endian_xor32( xor32_checksum, &( page_data[ 4 ] ), page_data_size - 4, 0x89abcdef, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to calculate XOR-32 checksum.", function ); return( -1 ); } } return( 1 ); } /* Reads the page tags * Returns 1 if successful or -1 on error */ int libesedb_page_read_tags( libesedb_page_t *page, libesedb_io_handle_t *io_handle, const uint8_t *page_data, size_t page_data_size, uint16_t number_of_page_tags, libcerror_error_t **error ) { libesedb_page_value_t *page_value = NULL; const uint8_t *page_tags_data = NULL; static char *function = "libesedb_page_read_tags"; size_t page_tags_data_size = 0; uint16_t page_tag_offset = 0; uint16_t page_tag_size = 0; uint16_t page_tags_index = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", 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( page_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page data.", function ); return( -1 ); } if( ( page_data_size < 2 ) || ( page_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page data size value out of bounds.", function ); return( -1 ); } page_tags_data_size = 4 * number_of_page_tags; if( page_tags_data_size > page_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of page tags value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page tags:\n", function ); libcnotify_print_data( &( page_data[ page_data_size - page_tags_data_size ] ), page_tags_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( libcdata_array_resize( page->values_array, number_of_page_tags, (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_page_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize page values array.", function ); goto on_error; } /* Read the page tags back to front */ page_tags_data = &( page_data[ page_data_size - 2 ] ); for( page_tags_index = 0; page_tags_index < number_of_page_tags; page_tags_index++ ) { if( libesedb_page_value_initialize( &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page value.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( page_tags_data, page_tag_offset ); page_tags_data -= 2; byte_stream_copy_to_uint16_little_endian( page_tags_data, page_tag_size ); page_tags_data -= 2; if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) { page_value->flags = 0; page_value->offset = page_tag_offset & 0x7fff; page_value->size = page_tag_size & 0x7fff;; } else { page_value->flags = page_tag_offset >> 13; page_value->offset = page_tag_offset & 0x1fff; page_value->size = page_tag_size & 0x1fff; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page tag: %03" PRIu16 " offset\t\t\t\t: %" PRIu16 " (0x%04" PRIx16 ")\n", function, page_tags_index, page_value->offset, page_tag_offset ); libcnotify_printf( "%s: page tag: %03" PRIu16 " size\t\t\t\t: %" PRIu16 " (0x%04" PRIx16 ")\n", function, page_tags_index, page_value->size, page_tag_size ); if( ( io_handle->format_revision < LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size < 16384 ) ) { libcnotify_printf( "%s: page tag: %03" PRIu16 " flags\t\t\t\t: 0x%02" PRIx8 "", function, page_tags_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libcdata_array_set_entry_by_index( page->values_array, (int) page_tags_index, (intptr_t *) page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set page value: %" PRIu16 ".", function, page_tags_index ); goto on_error; } page_value = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: if( page_value != NULL ) { libesedb_page_value_free( &page_value, NULL ); } libcdata_array_empty( page->values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_page_value_free, NULL ); return( -1 ); } /* Reads the page values * Returns 1 if successful or -1 on error */ int libesedb_page_read_values( libesedb_page_t *page, libesedb_io_handle_t *io_handle, uint8_t *page_data, size_t page_data_size, size_t page_values_data_offset, libcerror_error_t **error ) { libesedb_page_value_t *page_value = NULL; uint8_t *page_values_data = NULL; static char *function = "libesedb_page_read_values"; size_t page_tags_data_size = 0; size_t page_values_data_size = 0; uint16_t number_of_page_tags = 0; uint16_t page_tags_index = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( page_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page data.", function ); return( -1 ); } if( page_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page data size value out of bounds.", 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( (size_t) page_values_data_offset >= page_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page values data offset value out of bounds.", function ); return( -1 ); } number_of_page_tags = page->header->available_page_tag; if( number_of_page_tags == 0 ) { return( 1 ); } if( libesedb_page_read_tags( page, io_handle, page_data, page_data_size, number_of_page_tags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tags.", function ); goto on_error; } /* The offsets in the page tags are relative after the page header */ page_values_data = &( page_data[ page_values_data_offset ] ); page_values_data_size = page_data_size - page_values_data_offset; page_tags_data_size = 4 * number_of_page_tags; if( page_values_data_size < page_tags_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page values data size value out of bounds.", function ); goto on_error; } page_values_data_size -= page_tags_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page values data:\n", function ); libcnotify_print_data( page_values_data, page_values_data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif for( page_tags_index = 0; page_tags_index < number_of_page_tags; page_tags_index++ ) { if( libcdata_array_get_entry_by_index( page->values_array, page_tags_index, (intptr_t **) &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_tags_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page value.", function ); goto on_error; } if( page_value->offset >= page_values_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: unsupported page tags value offset value out of bounds.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " offset: % 5" PRIu16 ", size: % 5" PRIu16 " (page value data size: %" PRIu16 ")\n", function, page_tags_index, page_value->offset, page_value->size, page_values_data_size ); } #endif goto on_error; } if( (size_t) page_value->size > ( page_values_data_size - page_value->offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: unsupported page tags value size value out of bounds.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " offset: % 5" PRIu16 ", size: % 5" PRIu16 " (page value data size: %" PRIu16 ")\n", function, page_tags_index, page_value->offset, page_value->size, page_values_data_size ); } #endif goto on_error; } if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) { if( page_value->size >= 2 ) { /* The page tags flags are stored in the upper byte of the first 16-bit value */ page_value->flags = page_values_data[ page_value->offset + 1 ] >> 5; page_values_data[ page_value->offset + 1 ] &= 0x1f; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " offset: % 5" PRIu16 ", size: % 5" PRIu16 ", flags: 0x%02" PRIx8 "", function, page_tags_index, page_value->offset, page_value->size, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif page_value->data = &( page_values_data[ page_value->offset ] ); page_value->offset += page_values_data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %" PRIu16 " data:\n", function, page_tags_index ); libcnotify_print_data( page_value->data, page_value->size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: libcdata_array_empty( page->values_array, (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_page_value_free, NULL ); return( -1 ); } /* Reads a page and its values * Returns 1 if successful or -1 on error */ int libesedb_page_read_file_io_handle( libesedb_page_t *page, libesedb_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, libcerror_error_t **error ) { static char *function = "libesedb_page_read_file_io_handle"; ssize_t read_count = 0; uint32_t calculated_ecc32_checksum = 0; uint32_t calculated_xor32_checksum = 0; int result = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( page->data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page data 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 ); } page->page_number = (uint32_t) ( ( file_offset - io_handle->page_size ) / io_handle->page_size ); page->offset = file_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: current page number\t\t\t: %" PRIu32 "\n", function, page->page_number ); libcnotify_printf( "\n" ); } #endif page->data = (uint8_t *) memory_allocate( (size_t) io_handle->page_size ); if( page->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page data.", function ); goto on_error; } page->data_size = (size_t) io_handle->page_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading page: %" PRIu32 " at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, page->page_number, page->offset, page->offset ); } #endif read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, page->data, page->data_size, page->offset, error ); if( read_count != (ssize_t) page->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page: %" PRIu32 " data at offset: %" PRIi64 " (0x%08" PRIx64 ").", function, page->page_number, page->offset, page->offset ); goto on_error; } if( libesedb_page_header_read_data( page->header, io_handle, page->data, page->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page header.", function ); goto on_error; } result = libesedb_page_calculate_checksums( page, io_handle, page->data, page->data_size, &calculated_ecc32_checksum, &calculated_xor32_checksum, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to calculate page checksums.", function ); goto on_error; } else if( result != 0 ) { if( page->header->xor32_checksum != calculated_xor32_checksum ) { #ifdef TODO libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CRC_MISMATCH, "%s: mismatch in page XOR-32 checksum ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).", function, page->header->xor32_checksum, calculated_xor32_checksum ); goto on_error; #else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in page XOR-32 checksum ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).\n", function, page->header->xor32_checksum, calculated_xor32_checksum ); } #endif } if( page->header->ecc32_checksum != calculated_ecc32_checksum ) { #ifdef TODO libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CRC_MISMATCH, "%s: mismatch in page ECC-32 checksum ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).", function, page->header->ecc32_checksum, calculated_ecc32_checksum ); goto on_error; #else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in page ECC-32 checksum ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).\n", function, page->header->ecc32_checksum, calculated_ecc32_checksum ); } #endif } } if( libesedb_page_read_values( page, io_handle, page->data, page->data_size, page->header->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page values.", function ); goto on_error; } return( 1 ); on_error: if( page->data != NULL ) { memory_free( page->data ); page->data = NULL; } return( -1 ); } /* Checks if the page is valid root page * Returns 1 if successful or -1 on error */ int libesedb_page_validate_root_page( libesedb_page_t *page, libcerror_error_t **error ) { static char *function = "libesedb_page_validate_root_page"; uint32_t page_flags = 0; uint32_t required_page_flags = 0; uint32_t supported_page_flags = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_flags( page->header, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags from header.", function ); return( -1 ); } required_page_flags = LIBESEDB_PAGE_FLAG_IS_ROOT; if( ( page_flags & required_page_flags ) != required_page_flags ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing required page flags: 0x%08" PRIx32 ".", function, page_flags ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_EMPTY ) != 0 ) { return( 1 ); } supported_page_flags = required_page_flags | LIBESEDB_PAGE_FLAG_IS_LEAF | LIBESEDB_PAGE_FLAG_IS_PARENT | LIBESEDB_PAGE_FLAG_IS_INDEX | LIBESEDB_PAGE_FLAG_IS_SPACE_TREE | LIBESEDB_PAGE_FLAG_IS_LONG_VALUE | LIBESEDB_PAGE_FLAG_0x0400 | LIBESEDB_PAGE_FLAG_0x0800 | LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT | LIBESEDB_PAGE_FLAG_IS_SCRUBBED | LIBESEDB_PAGE_FLAG_0x8000 | LIBESEDB_PAGE_FLAG_0x10000; if( ( page_flags & ~( supported_page_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page flags: 0x%08" PRIx32 ".", function, page_flags ); return( -1 ); } return( 1 ); } /* Checks if the page is valid space tree page * Returns 1 if successful or -1 on error */ int libesedb_page_validate_space_tree_page( libesedb_page_t *page, libcerror_error_t **error ) { static char *function = "libesedb_page_validate_space_tree_page"; uint32_t next_page_number = 0; uint32_t page_flags = 0; uint32_t previous_page_number = 0; uint32_t required_page_flags = 0; uint32_t supported_page_flags = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_flags( page->header, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags from header.", function ); return( -1 ); } required_page_flags = LIBESEDB_PAGE_FLAG_IS_SPACE_TREE; if( ( page_flags & required_page_flags ) != required_page_flags ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing required page flags: 0x%08" PRIx32 ".", function, page_flags ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_EMPTY ) != 0 ) { return( 1 ); } supported_page_flags = required_page_flags | LIBESEDB_PAGE_FLAG_IS_ROOT | LIBESEDB_PAGE_FLAG_IS_LEAF | LIBESEDB_PAGE_FLAG_IS_PARENT | LIBESEDB_PAGE_FLAG_IS_INDEX | LIBESEDB_PAGE_FLAG_IS_LONG_VALUE | LIBESEDB_PAGE_FLAG_0x0400 | LIBESEDB_PAGE_FLAG_0x0800 | LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT | LIBESEDB_PAGE_FLAG_IS_SCRUBBED | LIBESEDB_PAGE_FLAG_0x8000 | LIBESEDB_PAGE_FLAG_0x10000; if( ( page_flags & ~( supported_page_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page flags: 0x%08" PRIx32 ".", function, page_flags ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) == 0 ) { if( libesedb_page_header_get_previous_page_number( page->header, &previous_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous page number.", function ); return( -1 ); } if( previous_page_number != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported previous page number: %" PRIu32 ".", function, previous_page_number ); return( -1 ); } if( libesedb_page_header_get_next_page_number( page->header, &next_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number.", function ); return( -1 ); } if( next_page_number != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported next page number: %" PRIu32 ".", function, next_page_number ); return( -1 ); } } return( 1 ); } /* Checks if the page is valid (regular) page * Returns 1 if successful or -1 on error */ int libesedb_page_validate_page( libesedb_page_t *page, libcerror_error_t **error ) { static char *function = "libesedb_page_validate_page"; uint32_t next_page_number = 0; uint32_t page_flags = 0; uint32_t previous_page_number = 0; uint32_t supported_page_flags = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_flags( page->header, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags from header.", function ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_EMPTY ) != 0 ) { return( 1 ); } supported_page_flags = LIBESEDB_PAGE_FLAG_IS_ROOT | LIBESEDB_PAGE_FLAG_IS_LEAF | LIBESEDB_PAGE_FLAG_IS_PARENT | LIBESEDB_PAGE_FLAG_IS_INDEX | LIBESEDB_PAGE_FLAG_IS_LONG_VALUE | LIBESEDB_PAGE_FLAG_0x0400 | LIBESEDB_PAGE_FLAG_0x0800 | LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT | LIBESEDB_PAGE_FLAG_IS_SCRUBBED | LIBESEDB_PAGE_FLAG_0x8000 | LIBESEDB_PAGE_FLAG_0x10000; if( ( page_flags & ~( supported_page_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page flags: 0x%08" PRIx32 ".", function, page_flags ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) == 0 ) { if( libesedb_page_header_get_previous_page_number( page->header, &previous_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous page number.", function ); return( -1 ); } if( previous_page_number != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported previous page number: %" PRIu32 ".", function, previous_page_number ); return( -1 ); } if( libesedb_page_header_get_next_page_number( page->header, &next_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number.", function ); return( -1 ); } if( next_page_number != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported next page number: %" PRIu32 ".", function, next_page_number ); return( -1 ); } } return( 1 ); } /* Retrieves the previous page number * Returns 1 if successful or -1 on error */ int libesedb_page_get_previous_page_number( libesedb_page_t *page, uint32_t *previous_page_number, libcerror_error_t **error ) { static char *function = "libesedb_page_get_previous_page_number"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_previous_page_number( page->header, previous_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous page number from header.", function ); return( -1 ); } return( 1 ); } /* Retrieves the next page number * Returns 1 if successful or -1 on error */ int libesedb_page_get_next_page_number( libesedb_page_t *page, uint32_t *next_page_number, libcerror_error_t **error ) { static char *function = "libesedb_page_get_next_page_number"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_next_page_number( page->header, next_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number from header.", function ); return( -1 ); } return( 1 ); } /* Retrieves the father data page object identifier * Returns 1 if successful or -1 on error */ int libesedb_page_get_father_data_page_object_identifier( libesedb_page_t *page, uint32_t *father_data_page_object_identifier, libcerror_error_t **error ) { static char *function = "libesedb_page_get_father_data_page_object_identifier"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_father_data_page_object_identifier( page->header, father_data_page_object_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve father data page object identifier from header.", function ); return( -1 ); } return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libesedb_page_get_flags( libesedb_page_t *page, uint32_t *flags, libcerror_error_t **error ) { static char *function = "libesedb_page_get_flags"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libesedb_page_header_get_flags( page->header, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve flags from header.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of page values * Returns 1 if successful or -1 on error */ int libesedb_page_get_number_of_values( libesedb_page_t *page, uint16_t *number_of_values, libcerror_error_t **error ) { static char *function = "libesedb_page_get_number_of_values"; int page_number_of_values = 0; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } 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( libcdata_array_get_number_of_entries( page->values_array, &page_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 ); } if( page_number_of_values > (int) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of page values value exceeds maximum.", function ); return( -1 ); } *number_of_values = (uint16_t) page_number_of_values; return( 1 ); } /* Retrieves the page value at the index * Returns 1 if successful or -1 on error */ int libesedb_page_get_value_by_index( libesedb_page_t *page, uint16_t value_index, libesedb_page_value_t **page_value, libcerror_error_t **error ) { static char *function = "libesedb_page_get_value_by_index"; if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( page->values_array, (int) value_index, (intptr_t **) page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, value_index ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_table_definition.c0000644000175000017500000004246414610727250023443 0ustar00lordyestalordyesta/* * Table definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_definitions.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_table_definition.h" /* Creates a table definition * Make sure the value table_definition is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_table_definition_initialize( libesedb_table_definition_t **table_definition, libesedb_catalog_definition_t *table_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_initialize"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( *table_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table definition value already set.", function ); return( -1 ); } if( table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table catalog definition.", function ); return( -1 ); } if( table_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported catalog definition type: %" PRIu16 ".", function, table_catalog_definition->type ); return( -1 ); } *table_definition = memory_allocate_structure( libesedb_table_definition_t ); if( *table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table definition.", function ); goto on_error; } if( memory_set( *table_definition, 0, sizeof( libesedb_table_definition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table definition.", function ); memory_free( *table_definition ); *table_definition = NULL; return( -1 ); } if( libcdata_array_initialize( &( ( *table_definition )->column_catalog_definition_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column catalog definition array.", function ); goto on_error; } if( libcdata_array_initialize( &( ( *table_definition )->index_catalog_definition_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index catalog definition array.", function ); goto on_error; } ( *table_definition )->table_catalog_definition = table_catalog_definition; return( 1 ); on_error: if( *table_definition != NULL ) { if( ( *table_definition )->column_catalog_definition_array != NULL ) { libcdata_array_free( &( ( *table_definition )->column_catalog_definition_array ), NULL, NULL ); } memory_free( *table_definition ); *table_definition = NULL; } return( -1 ); } /* Frees a table definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_free( libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_free"; int result = 1; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( *table_definition != NULL ) { if( ( *table_definition )->table_catalog_definition != NULL ) { if( libesedb_catalog_definition_free( &( ( *table_definition )->table_catalog_definition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table catalog definition.", function ); result = -1; } } if( ( *table_definition )->long_value_catalog_definition != NULL ) { if( libesedb_catalog_definition_free( &( ( *table_definition )->long_value_catalog_definition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long value catalog definition.", function ); result = -1; } } if( ( *table_definition )->callback_catalog_definition != NULL ) { if( libesedb_catalog_definition_free( &( ( *table_definition )->callback_catalog_definition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free callback catalog definition.", function ); result = -1; } } if( libcdata_array_free( &( ( *table_definition )->column_catalog_definition_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_catalog_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column catalog definition array.", function ); result = -1; } if( libcdata_array_free( &( ( *table_definition )->index_catalog_definition_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_catalog_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index catalog definition array.", function ); result = -1; } memory_free( *table_definition ); *table_definition = NULL; } return( result ); } /* Sets a long value catalog definition to the table definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_set_long_value_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *long_value_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_set_long_value_catalog_definition"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( table_definition->long_value_catalog_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table definition - long value catalog definition already set.", function ); return( -1 ); } if( long_value_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value catalog definition.", function ); return( -1 ); } if( long_value_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_LONG_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported catalog definition type: %" PRIu16 ".", function, long_value_catalog_definition->type ); return( -1 ); } table_definition->long_value_catalog_definition = long_value_catalog_definition; return( 1 ); } /* Sets a callback catalog definition to the table definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_set_callback_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *callback_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_set_callback_catalog_definition"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( table_definition->callback_catalog_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table definition - callback catalog definition already set.", function ); return( -1 ); } if( callback_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid callback catalog definition.", function ); return( -1 ); } if( callback_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_CALLBACK ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported catalog definition type: %" PRIu16 ".", function, callback_catalog_definition->type ); return( -1 ); } table_definition->callback_catalog_definition = callback_catalog_definition; return( 1 ); } /* Retrieves the number of column catalog definitions * Returns 1 if successful or -1 on error */ int libesedb_table_definition_get_number_of_column_catalog_definitions( libesedb_table_definition_t *table_definition, int *number_of_definitions, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_get_number_of_column_catalog_definitions"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( table_definition->column_catalog_definition_array, number_of_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from column catalog definition array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific column catalog definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_get_column_catalog_definition_by_index( libesedb_table_definition_t *table_definition, int definition_index, libesedb_catalog_definition_t **column_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_get_column_catalog_definition_by_index"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( table_definition->column_catalog_definition_array, definition_index, (intptr_t **) column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from column catalog definition array.", function, definition_index ); return( -1 ); } return( 1 ); } /* Appends a column catalog definition to the table definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_append_column_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *column_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_append_column_catalog_definition"; int entry_index = 0; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column catalog definition.", function ); return( -1 ); } if( column_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported catalog definition type: %" PRIu16 ".", function, column_catalog_definition->type ); return( -1 ); } if( libcdata_array_append_entry( table_definition->column_catalog_definition_array, &entry_index, (intptr_t *) column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append column catalog definition to array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of index catalog definitions * Returns 1 if successful or -1 on error */ int libesedb_table_definition_get_number_of_index_catalog_definitions( libesedb_table_definition_t *table_definition, int *number_of_definitions, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_get_number_of_index_catalog_definitions"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( table_definition->index_catalog_definition_array, number_of_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from index catalog definition array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific index catalog definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_get_index_catalog_definition_by_index( libesedb_table_definition_t *table_definition, int definition_index, libesedb_catalog_definition_t **index_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_get_index_catalog_definition_by_index"; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( table_definition->index_catalog_definition_array, definition_index, (intptr_t **) index_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from index catalog definition array.", function, definition_index ); return( -1 ); } return( 1 ); } /* Appends an index catalog definition to the table definition * Returns 1 if successful or -1 on error */ int libesedb_table_definition_append_index_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *index_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_table_definition_append_index_catalog_definition"; int entry_index = 0; if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( index_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index catalog definition.", function ); return( -1 ); } if( index_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported catalog definition type: %" PRIu16 ".", function, index_catalog_definition->type ); return( -1 ); } if( libcdata_array_append_entry( table_definition->index_catalog_definition_array, &entry_index, (intptr_t *) index_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append index catalog definition to array.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_page_tree.h0000644000175000017500000001311114610727250022067 0ustar00lordyestalordyesta/* * Page tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_TREE_H ) #define _LIBESEDB_PAGE_TREE_H #include #include #include "libesedb_block_tree.h" #include "libesedb_data_definition.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_page_tree_key.h" #include "libesedb_page_tree_value.h" #include "libesedb_page_value.h" #include "libesedb_root_page_header.h" #include "libesedb_table_definition.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page_tree libesedb_page_tree_t; struct libesedb_page_tree { /* The IO handle */ libesedb_io_handle_t *io_handle; /* The page block tree */ libesedb_block_tree_t *page_block_tree; /* The object identifier */ uint32_t object_identifier; /* The root page number */ uint32_t root_page_number; /* The table definition */ libesedb_table_definition_t *table_definition; /* The template table definition */ libesedb_table_definition_t *template_table_definition; /* The pages vector */ libfdata_vector_t *pages_vector; /* The pages cache */ libfcache_cache_t *pages_cache; /* The root page header */ libesedb_root_page_header_t *root_page_header; /* The leaf page descriptors tree */ libcdata_btree_t *leaf_page_descriptors_tree; /* The number of leaf values */ int number_of_leaf_values; }; int libesedb_page_tree_initialize( libesedb_page_tree_t **page_tree, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint32_t object_identifier, uint32_t root_page_number, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcerror_error_t **error ); int libesedb_page_tree_free( libesedb_page_tree_t **page_tree, libcerror_error_t **error ); int libesedb_page_tree_check_if_page_block_first_read( libesedb_page_tree_t *page_tree, libesedb_block_tree_t *page_block_tree, uint32_t page_number, off64_t page_offset, libcerror_error_t **error ); int libesedb_page_tree_read_root_page_header( libesedb_page_tree_t *page_tree, libesedb_page_t *root_page, libcerror_error_t **error ); int libesedb_page_tree_read_space_trees( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libesedb_page_tree_get_key( libesedb_page_tree_t *page_tree, libesedb_page_tree_value_t *page_tree_value, libesedb_page_t *page, uint32_t page_flags, uint16_t page_value_index, libesedb_page_tree_key_t **key, libcerror_error_t **error ); int libesedb_page_tree_get_first_leaf_page_number_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, uint32_t *leaf_page_number, int recursion_depth, libcerror_error_t **error ); int libesedb_page_tree_get_get_first_leaf_page_number( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, uint32_t *leaf_page_number, libcerror_error_t **error ); int libesedb_page_tree_get_number_of_leaf_values_from_leaf_page( libesedb_page_tree_t *page_tree, libesedb_page_t *page, int *number_of_leaf_values, libcerror_error_t **error ); int libesedb_page_tree_get_number_of_leaf_values( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, int *number_of_leaf_values, libcerror_error_t **error ); int libesedb_page_tree_get_leaf_value_by_index_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, int leaf_value_index, libesedb_data_definition_t **data_definition, int *current_leaf_value_index, int recursion_depth, libcerror_error_t **error ); int libesedb_page_tree_get_leaf_value_by_index( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, int leaf_value_index, libesedb_data_definition_t **data_definition, libcerror_error_t **error ); int libesedb_page_tree_get_leaf_value_by_key_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, libesedb_page_tree_key_t *leaf_value_key, libesedb_data_definition_t **data_definition, int recursion_depth, libcerror_error_t **error ); int libesedb_page_tree_get_leaf_value_by_key( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_tree_key_t *leaf_value_key, libesedb_data_definition_t **data_definition, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_TREE_H ) */ libesedb-20240420/libesedb/libesedb_page_tree_key.c0000644000175000017500000003713414610727250022745 0ustar00lordyestalordyesta/* * Page tree key functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_definitions.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree_key.h" /* Creates a page tree key * Make sure the value page_tree_key is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_tree_key_initialize( libesedb_page_tree_key_t **page_tree_key, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_key_initialize"; if( page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree key.", function ); return( -1 ); } if( *page_tree_key != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page tree key value already set.", function ); return( -1 ); } *page_tree_key = memory_allocate_structure( libesedb_page_tree_key_t ); if( *page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page tree key.", function ); goto on_error; } if( memory_set( ( *page_tree_key ), 0, sizeof( libesedb_page_tree_key_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page tree key.", function ); goto on_error; } return( 1 ); on_error: if( *page_tree_key != NULL ) { memory_free( *page_tree_key ); *page_tree_key = NULL; } return( -1 ); } /* Frees a page tree key * Returns 1 if successful or -1 on error */ int libesedb_page_tree_key_free( libesedb_page_tree_key_t **page_tree_key, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_key_free"; if( page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree key.", function ); return( -1 ); } if( *page_tree_key != NULL ) { if( ( *page_tree_key )->data != NULL ) { memory_free( ( *page_tree_key )->data ); } memory_free( *page_tree_key ); *page_tree_key = NULL; } return( 1 ); } /* Sets data * Returns 1 if successful or -1 on error */ int libesedb_page_tree_key_set_data( libesedb_page_tree_key_t *page_tree_key, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_key_set_data"; if( page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree key.", function ); return( -1 ); } if( page_tree_key->data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page tree key - data already set.", 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) MEMORY_MAXIMUM_ALLOCATION_SIZE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum allocation size.", function ); return( -1 ); } if( data_size > 0 ) { page_tree_key->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( page_tree_key->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( page_tree_key->data, data, sizeof( uint8_t ) * 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; } page_tree_key->data_size = data_size; } return( 1 ); on_error: if( page_tree_key->data != NULL ) { memory_free( page_tree_key->data ); page_tree_key->data = NULL; } page_tree_key->data_size = 0; return( -1 ); } /* Append data * Returns 1 if successful or -1 on error */ int libesedb_page_tree_key_append_data( libesedb_page_tree_key_t *page_tree_key, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libesedb_page_tree_key_append_data"; if( page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree key.", 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: invalid data size value exceeds maximum.", function ); return( -1 ); } if( data_size > 0 ) { reallocation = memory_reallocate( page_tree_key->data, sizeof( uint8_t ) * ( page_tree_key->data_size + data_size ) ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize data.", function ); return( -1 ); } page_tree_key->data = (uint8_t *) reallocation; if( memory_copy( &( page_tree_key->data[ page_tree_key->data_size ] ), data, sizeof( uint8_t ) * data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); return( -1 ); } page_tree_key->data_size += data_size; } return( 1 ); } /* Compares two page tree keys * Returns LIBFDATA_COMPARE_LESS, LIBFDATA_COMPARE_EQUAL, LIBFDATA_COMPARE_GREATER, * LIBFDATA_COMPARE_GREATER_EQUAL if successful or -1 on error */ int libesedb_page_tree_key_compare( libesedb_page_tree_key_t *first_page_tree_key, libesedb_page_tree_key_t *second_page_tree_key, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_key_compare"; size_t compare_data_size = 0; size_t first_page_tree_key_data_index = 0; size_t second_page_tree_key_data_index = 0; int16_t compare_result = -1; uint8_t first_page_tree_key_data = 0; int result = -1; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t *page_tree_key_data = NULL; size_t page_tree_key_data_size = 0; uint8_t is_flexible_match = 0; #endif if( first_page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first page tree key.", function ); return( -1 ); } if( first_page_tree_key->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid first page tree key - missing data.", function ); return( -1 ); } if( ( first_page_tree_key->type != LIBESEDB_KEY_TYPE_INDEX_VALUE ) && ( first_page_tree_key->type != LIBESEDB_KEY_TYPE_LONG_VALUE ) && ( first_page_tree_key->type != LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported first page tree key type.", function ); return( -1 ); } if( second_page_tree_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second page tree key.", function ); return( -1 ); } if( ( second_page_tree_key->type != LIBESEDB_KEY_TYPE_BRANCH ) && ( second_page_tree_key->type != LIBESEDB_KEY_TYPE_LEAF ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported second page tree key type.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: first page tree key\t\t\t: ", function ); page_tree_key_data = first_page_tree_key->data; page_tree_key_data_size = first_page_tree_key->data_size; while( page_tree_key_data_size > 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%02" PRIx8 " ", *page_tree_key_data ); } page_tree_key_data++; page_tree_key_data_size--; } libcnotify_printf( "\n" ); libcnotify_printf( "%s: first page tree key type\t\t: ", function ); switch( first_page_tree_key->type ) { case LIBESEDB_KEY_TYPE_INDEX_VALUE: libcnotify_printf( "index value" ); break; case LIBESEDB_KEY_TYPE_LONG_VALUE: libcnotify_printf( "long value" ); break; case LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT: libcnotify_printf( "long value segment" ); break; default: libcnotify_printf( "unknown" ); break; } libcnotify_printf( "\n" ); libcnotify_printf( "%s: second page tree key\t\t\t: ", function ); page_tree_key_data = second_page_tree_key->data; page_tree_key_data_size = second_page_tree_key->data_size; while( page_tree_key_data_size > 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%02" PRIx8 " ", *page_tree_key_data ); } page_tree_key_data++; page_tree_key_data_size--; } libcnotify_printf( "\n" ); libcnotify_printf( "%s: second page tree key type\t\t: ", function ); switch( second_page_tree_key->type ) { case LIBESEDB_KEY_TYPE_BRANCH: libcnotify_printf( "branch" ); break; case LIBESEDB_KEY_TYPE_LEAF: libcnotify_printf( "leaf" ); break; default: libcnotify_printf( "unknown" ); break; } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* Check if the page tree key is empty, therefore has no upper bound * and thus the first page tree key will be greater than the second page tree key */ if( second_page_tree_key->data_size > 0 ) { if( second_page_tree_key->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid second page tree key - missing data.", function ); return( -1 ); } if( first_page_tree_key->data_size <= second_page_tree_key->data_size ) { compare_data_size = first_page_tree_key->data_size; } else { compare_data_size = second_page_tree_key->data_size; } #if defined( HAVE_DEBUG_OUTPUT ) is_flexible_match = 0; #endif /* The long value page_tree_key is stored reversed */ if( first_page_tree_key->type == LIBESEDB_KEY_TYPE_LONG_VALUE ) { first_page_tree_key_data_index = first_page_tree_key->data_size - 1; } else { first_page_tree_key_data_index = 0; } for( second_page_tree_key_data_index = 0; second_page_tree_key_data_index < compare_data_size; second_page_tree_key_data_index++ ) { first_page_tree_key_data = first_page_tree_key->data[ first_page_tree_key_data_index ]; if( ( first_page_tree_key->type == LIBESEDB_KEY_TYPE_INDEX_VALUE ) && ( second_page_tree_key->type == LIBESEDB_KEY_TYPE_LEAF ) ) { /* TODO does not hold for branch page_tree_keys in Win XP search database */ if( ( first_page_tree_key_data_index == 1 ) && ( ( first_page_tree_key_data & 0x80 ) != 0 ) && ( ( first_page_tree_key_data & 0x7f ) == second_page_tree_key->data[ second_page_tree_key_data_index ] ) ) { first_page_tree_key_data &= 0x7f; #if defined( HAVE_DEBUG_OUTPUT ) is_flexible_match = 1; #endif } } compare_result = (int16_t) first_page_tree_key_data - (int16_t) second_page_tree_key->data[ second_page_tree_key_data_index ]; if( compare_result != 0 ) { break; } if( first_page_tree_key->type == LIBESEDB_KEY_TYPE_LONG_VALUE ) { first_page_tree_key_data_index--; } else { first_page_tree_key_data_index++; } } } if( compare_result > 0 ) { result = LIBFDATA_COMPARE_GREATER; } else if( second_page_tree_key->type == LIBESEDB_KEY_TYPE_BRANCH ) { if( first_page_tree_key->type == LIBESEDB_KEY_TYPE_INDEX_VALUE ) { /* If the page_tree_key exactly matches the branch page_tree_key, * the leaf value is in the next branch node */ if( compare_result == 0 ) { result = LIBFDATA_COMPARE_GREATER; } else { result = LIBFDATA_COMPARE_EQUAL; } } else if( ( first_page_tree_key->type == LIBESEDB_KEY_TYPE_LONG_VALUE ) || ( first_page_tree_key->type == LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT ) ) { /* If the page_tree_key matches the branch page_tree_key but is longer, * the leaf value is in the next branch node */ if( ( compare_result == 0 ) && ( first_page_tree_key->data_size > second_page_tree_key->data_size ) ) { result = LIBFDATA_COMPARE_GREATER; } else { result = LIBFDATA_COMPARE_LESS_EQUAL; } } else { /* TODO make sure this works */ result = LIBFDATA_COMPARE_EQUAL; } } else if( second_page_tree_key->type == LIBESEDB_KEY_TYPE_LEAF ) { if( compare_result < 0 ) { result = LIBFDATA_COMPARE_LESS; } else if( first_page_tree_key->data_size < second_page_tree_key->data_size ) { result = LIBFDATA_COMPARE_LESS; } else if( first_page_tree_key->data_size > second_page_tree_key->data_size ) { result = LIBFDATA_COMPARE_GREATER; } else { result = LIBFDATA_COMPARE_EQUAL; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: result\t\t\t\t\t: ", function ); switch( result ) { case LIBFDATA_COMPARE_EQUAL: libcnotify_printf( "equal" ); break; case LIBFDATA_COMPARE_GREATER: libcnotify_printf( "greater" ); break; case LIBFDATA_COMPARE_GREATER_EQUAL: libcnotify_printf( "greater equal" ); break; case LIBFDATA_COMPARE_LESS: libcnotify_printf( "less" ); break; case LIBFDATA_COMPARE_LESS_EQUAL: libcnotify_printf( "less equal" ); break; default: libcnotify_printf( "unknown" ); break; } if( is_flexible_match != 0 ) { libcnotify_printf( " (is flexible match)" ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( result ); } libesedb-20240420/libesedb/libesedb_page_tree.c0000644000175000017500000023221614610727250022073 0ustar00lordyestalordyesta/* * Page tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_block_descriptor.h" #include "libesedb_block_tree.h" #include "libesedb_block_tree_node.h" #include "libesedb_data_definition.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_leaf_page_descriptor.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_page_tree.h" #include "libesedb_page_tree_key.h" #include "libesedb_page_tree_value.h" #include "libesedb_root_page_header.h" #include "libesedb_space_tree.h" #include "libesedb_table_definition.h" #include "libesedb_unused.h" #include "esedb_page_values.h" /* Creates a page tree * Make sure the value page_tree is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_tree_initialize( libesedb_page_tree_t **page_tree, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint32_t object_identifier, uint32_t root_page_number, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_initialize"; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( *page_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page tree 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 ); } #if ( SIZEOF_INT <= 4 ) if( ( root_page_number < 1 ) || ( root_page_number > (uint32_t) INT_MAX ) ) #else if( ( root_page_number < 1 ) || ( (int) root_page_number > INT_MAX ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid root page number value out of bounds.", function ); return( -1 ); } *page_tree = memory_allocate_structure( libesedb_page_tree_t ); if( *page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page tree.", function ); goto on_error; } if( memory_set( *page_tree, 0, sizeof( libesedb_page_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page tree.", function ); memory_free( *page_tree ); *page_tree = NULL; return( -1 ); } if( libesedb_block_tree_initialize( &( ( *page_tree )->page_block_tree ), io_handle->file_size, io_handle->page_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page block tree.", function ); goto on_error; } if( libcdata_btree_initialize( &( ( *page_tree )->leaf_page_descriptors_tree ), 257, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create leaf page descriptors B-tree.", function ); goto on_error; } ( *page_tree )->io_handle = io_handle; ( *page_tree )->pages_vector = pages_vector; ( *page_tree )->pages_cache = pages_cache; ( *page_tree )->object_identifier = object_identifier; ( *page_tree )->root_page_number = root_page_number; ( *page_tree )->table_definition = table_definition; ( *page_tree )->template_table_definition = template_table_definition; ( *page_tree )->number_of_leaf_values = -1; return( 1 ); on_error: if( *page_tree != NULL ) { if( ( *page_tree )->page_block_tree != NULL ) { libesedb_block_tree_free( &( ( *page_tree )->page_block_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_block_descriptor_free, NULL ); } memory_free( *page_tree ); *page_tree = NULL; } return( -1 ); } /* Frees a page tree * Returns 1 if successful or -1 on error */ int libesedb_page_tree_free( libesedb_page_tree_t **page_tree, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_free"; int result = 1; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( *page_tree != NULL ) { /* The io_handle, pages_vector, pages_cache, table_definition and template_table_definition references * are freed elsewhere */ if( ( *page_tree )->root_page_header != NULL ) { if( libesedb_root_page_header_free( &( ( *page_tree )->root_page_header ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root page header.", function ); result = -1; } } if( libcdata_btree_free( &( ( *page_tree )->leaf_page_descriptors_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_leaf_page_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free leaf page descriptors B-tree.", function ); result = -1; } if( libesedb_block_tree_free( &( ( *page_tree )->page_block_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_block_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page block tree.", function ); result = -1; } memory_free( *page_tree ); *page_tree = NULL; } return( result ); } /* Checks if this is the first time the page block is being read * Returns 1 if successful or -1 on error */ int libesedb_page_tree_check_if_page_block_first_read( libesedb_page_tree_t *page_tree, libesedb_block_tree_t *page_block_tree, uint32_t page_number, off64_t page_offset, libcerror_error_t **error ) { libesedb_block_descriptor_t *existing_block_descriptor = NULL; libesedb_block_descriptor_t *new_block_descriptor = NULL; libesedb_block_tree_node_t *leaf_block_tree_node = NULL; static char *function = "libesedb_page_tree_check_if_page_block_first_read"; int leaf_value_index = 0; int result = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( libesedb_block_descriptor_initialize( &new_block_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create block descriptor.", function ); goto on_error; } new_block_descriptor->page_number = page_number; result = libesedb_block_tree_insert_block_descriptor_by_offset( page_block_tree, page_offset, new_block_descriptor, &leaf_value_index, &leaf_block_tree_node, &existing_block_descriptor, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert block descriptor in page block tree.", function ); goto on_error; } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page number: %" PRIu32 " value already exists.", function, page_number ); goto on_error; } new_block_descriptor = NULL; return( 1 ); on_error: if( new_block_descriptor != NULL ) { libesedb_block_descriptor_free( &new_block_descriptor, NULL ); } return( -1 ); } /* Reads the root page header * Returns 1 if successful or -1 on error */ int libesedb_page_tree_read_root_page_header( libesedb_page_tree_t *page_tree, libesedb_page_t *root_page, libcerror_error_t **error ) { libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_page_tree_read_root_page_header"; uint16_t number_of_page_values = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( libesedb_page_get_number_of_values( root_page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } if( number_of_page_values > 0 ) { if( libesedb_page_get_value_by_index( root_page, 0, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root page value: 0.", function ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value.", function ); goto on_error; } if( libesedb_root_page_header_initialize( &( page_tree->root_page_header ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root page header.", function ); goto on_error; } if( libesedb_root_page_header_read_data( page_tree->root_page_header, page_value->data, (size_t) page_value->size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root page header.", function ); goto on_error; } } return( 1 ); on_error: if( page_tree->root_page_header != NULL ) { libesedb_root_page_header_free( &( page_tree->root_page_header ), NULL ); } return( -1 ); } /* Reads the space page trees * Returns 1 if successful or -1 on error */ int libesedb_page_tree_read_space_trees( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libesedb_space_tree_t *space_tree = NULL; static char *function = "libesedb_page_tree_read_space_trees"; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree->root_page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page tree - missing root page heder.", function ); return( -1 ); } /* Read the space tree pages */ if( page_tree->root_page_header->extent_space > 0 ) { if( page_tree->root_page_header->space_tree_page_number >= 0xff000000UL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported space tree page number.", function, page_tree->root_page_header->space_tree_page_number ); goto on_error; } if( page_tree->root_page_header->space_tree_page_number > 0 ) { /* Read the owned pages space tree page */ if( libesedb_space_tree_initialize( &space_tree, page_tree->io_handle, page_tree->object_identifier, page_tree->root_page_header->space_tree_page_number, page_tree->pages_vector, page_tree->pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create owned pages space tree.", function ); goto on_error; } if( libesedb_space_tree_read_file_io_handle( space_tree, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read owned pages space tree.", function ); goto on_error; } if( libesedb_space_tree_free( &space_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free space tree.", function ); goto on_error; } /* Read the available pages space tree page */ if( libesedb_space_tree_initialize( &space_tree, page_tree->io_handle, page_tree->object_identifier, page_tree->root_page_header->space_tree_page_number + 1, page_tree->pages_vector, page_tree->pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create available pages space tree.", function ); goto on_error; } if( libesedb_space_tree_read_file_io_handle( space_tree, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read available pages space tree.", function ); goto on_error; } if( libesedb_space_tree_free( &space_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free space tree.", function ); goto on_error; } } } return( 1 ); on_error: if( space_tree != NULL ) { libesedb_space_tree_free( &space_tree, NULL ); } return( -1 ); } /* Retrieves the page tree key of a specific page value * This function creates a key * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_key( libesedb_page_tree_t *page_tree, libesedb_page_tree_value_t *page_tree_value, libesedb_page_t *page, uint32_t page_flags, uint16_t page_value_index, libesedb_page_tree_key_t **key, libcerror_error_t **error ) { libesedb_page_tree_key_t *safe_key = NULL; libesedb_page_value_t *header_page_value = NULL; static char *function = "libesedb_page_tree_get_key"; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t *page_key_data = NULL; size_t page_key_size = 0; #endif if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree value.", function ); return( -1 ); } if( key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid key.", function ); return( -1 ); } if( libesedb_page_tree_key_initialize( &safe_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); goto on_error; } if( page_tree_value->common_key_size > 0 ) { if( libesedb_page_get_value_by_index( page, 0, &header_page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: 0.", function ); goto on_error; } if( header_page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: 0.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: 000 page tag flags\t\t: 0x%02" PRIx8 "", function, header_page_value->flags ); libesedb_debug_print_page_tag_flags( header_page_value->flags ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: page value: 000 data:\n", function ); libcnotify_print_data( header_page_value->data, (size_t) header_page_value->size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( page_tree_value->common_key_size > header_page_value->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: common key size exceeds header page value size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " common key value\t\t: ", function, page_value_index ); page_key_data = header_page_value->data; page_key_size = page_tree_value->common_key_size; while( page_key_size > 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%02" PRIx8 " ", *page_key_data ); } page_key_data++; page_key_size--; } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libesedb_page_tree_key_set_data( safe_key, header_page_value->data, (size_t) page_tree_value->common_key_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set common key data in key.", function ); goto on_error; } } if( libesedb_page_tree_key_append_data( safe_key, page_tree_value->local_key, (size_t) page_tree_value->local_key_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to append local key data to key.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " key value\t\t\t: ", function, page_value_index ); page_key_data = safe_key->data; page_key_size = safe_key->data_size; while( page_key_size > 0 ) { libcnotify_printf( "%02" PRIx8 " ", *page_key_data ); page_key_data++; page_key_size--; } libcnotify_printf( "\n\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { safe_key->type = LIBESEDB_KEY_TYPE_LEAF; } else { safe_key->type = LIBESEDB_KEY_TYPE_BRANCH; } *key = safe_key; return( 1 ); on_error: if( safe_key != NULL ) { libesedb_page_tree_key_free( &safe_key, NULL ); } return( -1 ); } /* Determines the first leaf page number from a page * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_first_leaf_page_number_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, uint32_t *leaf_page_number, int recursion_depth, libcerror_error_t **error ) { libesedb_page_t *child_page = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_page_tree_get_first_leaf_page_number_from_page"; uint32_t child_page_number = 0; uint32_t page_flags = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libesedb_page_tree_key_t *page_value_key = NULL; #endif if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page tree - missing IO handle.", function ); return( -1 ); } if( leaf_page_number == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf page number.", function ); return( -1 ); } if( ( recursion_depth < 0 ) || ( recursion_depth > LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid recursion depth value out of bounds.", function ); return( -1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { *leaf_page_number = page->page_number; return( 1 ); } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { /* TODO are defunct data definition of any value recovering */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " data:\n", function, page_value_index ); libcnotify_print_data( page_value->data, (size_t) page_value->size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif continue; } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libesedb_page_tree_get_key( page_tree, page_tree_value, page, page_flags, page_value_index, &page_value_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key of page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( libesedb_page_tree_key_free( &page_value_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page value key.", function ); goto on_error; } #endif if( page_tree_value->data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page tree value: %" PRIu16 " data size value out of bounds.", function, page_value_index ); goto on_error; } byte_stream_copy_to_uint32_little_endian( page_tree_value->data, child_page_number ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " child page number\t: %" PRIu32 "", function, page_value_index, child_page_number ); if( child_page_number == 0 ) { libcnotify_printf( " (invalid page number)\n" ); } else if( child_page_number > page_tree->io_handle->last_page_number ) { libcnotify_printf( " (exceeds last page number: %" PRIu32 ")\n", page_tree->io_handle->last_page_number ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif #if ( SIZEOF_INT <= 4 ) if( ( child_page_number < 1 ) || ( child_page_number > (uint32_t) INT_MAX ) ) #else if( ( child_page_number < 1 ) || ( (int) child_page_number > INT_MAX ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid child page number value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( page_tree_value->data_size > 4 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " trailing data:\n", function, page_value_index ); libcnotify_print_data( &( page_tree_value->data[ 4 ] ), page_tree_value->data_size - 4, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } #endif if( ( child_page_number > 0 ) && ( child_page_number <= page_tree->io_handle->last_page_number ) ) { if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) page_tree->pages_cache, (int) child_page_number - 1, (intptr_t **) &child_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, child_page_number ); goto on_error; } if( libesedb_page_validate_page( child_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page.", function ); goto on_error; } if( libesedb_page_tree_get_first_leaf_page_number_from_page( page_tree, file_io_handle, child_page, leaf_page_number, recursion_depth + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf page number from page: %" PRIu32 ".", function, child_page_number ); goto on_error; } } if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } break; } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( page_value_key != NULL ) { libesedb_page_tree_key_free( &page_value_key, NULL ); } #endif if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } return( -1 ); } /* Determines the first leaf page number * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_get_first_leaf_page_number( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, uint32_t *leaf_page_number, libcerror_error_t **error ) { libesedb_page_t *page = NULL; static char *function = "libesedb_page_tree_get_get_first_leaf_page_number"; off64_t page_offset = 0; uint32_t last_leaf_page_number = 0; uint32_t page_flags = 0; uint32_t safe_leaf_page_number = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page tree - missing IO handle.", function ); return( -1 ); } if( leaf_page_number == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf page number.", function ); return( -1 ); } if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) page_tree->pages_cache, (int) page_tree->root_page_number - 1, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, page_tree->root_page_number ); return( -1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); return( -1 ); } /* Seen in temp.edb where is root flag is not set */ if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_ROOT ) != 0 ) { if( libesedb_page_validate_root_page( page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported root page.", function ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) && defined( TODO ) if( page_tree->root_page_header == NULL ) { if( libesedb_page_tree_read_root_page_header( page_tree, page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root page header.", function ); return( -1 ); } if( libesedb_page_tree_read_space_trees( page_tree, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read space trees.", function ); return( -1 ); } } #endif if( libesedb_page_tree_get_first_leaf_page_number_from_page( page_tree, file_io_handle, page, &safe_leaf_page_number, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf page number from page: %" PRIu32 ".", function, page_tree->root_page_number ); return( -1 ); } while( safe_leaf_page_number != 0 ) { page_offset = ( safe_leaf_page_number + 1 ) * page_tree->io_handle->page_size; if( libesedb_page_tree_check_if_page_block_first_read( page_tree, page_tree->page_block_tree, safe_leaf_page_number, page_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to check if first read of page number: %" PRIu32 ".", function, safe_leaf_page_number ); return( -1 ); } #if ( SIZEOF_INT <= 4 ) if( safe_leaf_page_number > (uint32_t) INT_MAX ) #else if( safe_leaf_page_number > (unsigned int) INT_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf page number value out of bounds.", function ); return( -1 ); } last_leaf_page_number = safe_leaf_page_number; if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) page_tree->pages_cache, (int) safe_leaf_page_number - 1, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, safe_leaf_page_number ); return( -1 ); } if( libesedb_page_get_previous_page_number( page, &safe_leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous page number from page: %" PRIu32 ".", function, safe_leaf_page_number ); return( -1 ); } } *leaf_page_number = last_leaf_page_number; return( 1 ); } /* Determines the number of leaf values from a page * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_number_of_leaf_values_from_leaf_page( libesedb_page_tree_t *page_tree, libesedb_page_t *page, int *number_of_leaf_values, libcerror_error_t **error ) { libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_page_tree_get_number_of_leaf_values_from_leaf_page"; uint32_t page_flags = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; int safe_number_of_leaf_values = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( number_of_leaf_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf values.", function ); return( -1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); return( -1 ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page - not a leaf page.", function ); return( -1 ); } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); return( -1 ); } safe_number_of_leaf_values = *number_of_leaf_values; for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); return( -1 ); } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { /* TODO are defunct data definition of any value recovering */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " data:\n", function, page_value_index ); libcnotify_print_data( page_value->data, (size_t) page_value->size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif continue; } if( safe_number_of_leaf_values == INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of leaf values value out of bounds.", function ); return( -1 ); } safe_number_of_leaf_values++; } *number_of_leaf_values = safe_number_of_leaf_values; return( 1 ); } /* Determines the number of leaf values * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_number_of_leaf_values( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, int *number_of_leaf_values, libcerror_error_t **error ) { libcdata_tree_node_t *upper_node = NULL; libesedb_leaf_page_descriptor_t *existing_leaf_page_descriptor = NULL; libesedb_leaf_page_descriptor_t *leaf_page_descriptor = NULL; libesedb_page_t *page = NULL; static char *function = "libesedb_page_tree_get_number_of_leaf_values"; uint32_t leaf_page_number = 0; int number_of_leaf_pages = 0; int safe_number_of_leaf_values = 0; int value_index = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( number_of_leaf_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf values.", function ); return( -1 ); } if( page_tree->number_of_leaf_values == -1 ) { page_tree->number_of_leaf_values = 0; if( libesedb_page_tree_get_get_first_leaf_page_number( page_tree, file_io_handle, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf page number from page tree.", function ); goto on_error; } while( leaf_page_number != 0 ) { if( number_of_leaf_pages > LIBESEDB_MAXIMUM_NUMBER_OF_LEAF_PAGES ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of leaf pages value exceeds maximum.", function ); goto on_error; } #if ( SIZEOF_INT <= 4 ) if( leaf_page_number > (uint32_t) INT_MAX ) #else if( leaf_page_number > (unsigned int) INT_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf page number value out of bounds.", function ); goto on_error; } if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) page_tree->pages_cache, (int) leaf_page_number - 1, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, leaf_page_number ); goto on_error; } if( libesedb_page_tree_get_number_of_leaf_values_from_leaf_page( page_tree, page, &safe_number_of_leaf_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine number of leaf values from page: %" PRIu32 ".", function, leaf_page_number ); goto on_error; } if( libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create leaf page descriptor.", function ); goto on_error; } leaf_page_descriptor->page_number = page->page_number; leaf_page_descriptor->first_leaf_value_index = page_tree->number_of_leaf_values; leaf_page_descriptor->last_leaf_value_index = safe_number_of_leaf_values - 1; if( libcdata_btree_insert_value( page_tree->leaf_page_descriptors_tree, &value_index, (intptr_t *) leaf_page_descriptor, (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libesedb_leaf_page_descriptor_compare, &upper_node, (intptr_t **) &existing_leaf_page_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable insert leaf page descriptor into tree.", function ); goto on_error; } leaf_page_descriptor = NULL; if( libesedb_page_get_next_page_number( page, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number from page: %" PRIu32 ".", function, leaf_page_number ); goto on_error; } page_tree->number_of_leaf_values = safe_number_of_leaf_values; number_of_leaf_pages++; } } *number_of_leaf_values = page_tree->number_of_leaf_values; return( 1 ); on_error: if( leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, NULL ); } return( -1 ); } /* Retrieves a specific leaf value * This function creates a new data definition * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_leaf_value_by_index_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, int leaf_value_index, libesedb_data_definition_t **data_definition, int *current_leaf_value_index, int recursion_depth, libcerror_error_t **error ) { libesedb_page_t *child_page = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; libfcache_cache_t *child_page_cache = NULL; static char *function = "libesedb_page_tree_get_leaf_value_by_index_from_page"; uint32_t child_page_number = 0; uint32_t page_flags = 0; uint16_t data_offset = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page tree - missing IO handle.", function ); return( -1 ); } if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( current_leaf_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current leaf value index.", function ); return( -1 ); } if( ( recursion_depth < 0 ) || ( recursion_depth > LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid recursion depth value out of bounds.", function ); return( -1 ); } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } if( number_of_page_values == 0 ) { return( 1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } /* Use a local cache to prevent cache invalidation of the page * when reading child pages. */ if( libfcache_cache_initialize( &child_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create child page cache.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { continue; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { if( *current_leaf_value_index == INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid current leaf value index value out of bounds.", function ); goto on_error; } if( *current_leaf_value_index < leaf_value_index ) { *current_leaf_value_index += 1; continue; } } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { if( libesedb_data_definition_initialize( data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data definition.", function ); goto on_error; } data_offset = page_value->offset + 2 + page_tree_value->local_key_size; if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE ) != 0 ) { data_offset += 2; } ( *data_definition )->page_value_index = page_value_index; ( *data_definition )->page_offset = page->offset - ( 2 * page_tree->io_handle->page_size ); ( *data_definition )->page_number = page->page_number; ( *data_definition )->data_offset = data_offset; ( *data_definition )->data_size = page_tree_value->data_size; *current_leaf_value_index += 1; } else { if( page_tree_value->data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page tree value: %" PRIu16 " data size value out of bounds.", function, page_value_index ); goto on_error; } byte_stream_copy_to_uint32_little_endian( page_tree_value->data, child_page_number ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " child page number\t: %" PRIu32 "", function, page_value_index, child_page_number ); if( child_page_number == 0 ) { libcnotify_printf( " (invalid page number)\n" ); } else if( child_page_number > page_tree->io_handle->last_page_number ) { libcnotify_printf( " (exceeds last page number: %" PRIu32 ")\n", page_tree->io_handle->last_page_number ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif #if ( SIZEOF_INT <= 4 ) if( ( child_page_number < 1 ) || ( child_page_number > (uint32_t) INT_MAX ) ) #else if( ( child_page_number < 1 ) || ( (int) child_page_number > INT_MAX ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid child page number value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( page_tree_value->data_size > 4 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " trailing data:\n", function, page_value_index ); libcnotify_print_data( &( page_tree_value->data[ 4 ] ), page_tree_value->data_size - 4, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } #endif if( ( child_page_number > 0 ) && ( child_page_number <= page_tree->io_handle->last_page_number ) ) { if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) child_page_cache, (int) child_page_number - 1, (intptr_t **) &child_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, child_page_number ); goto on_error; } if( libesedb_page_validate_page( child_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page.", function ); goto on_error; } if( libesedb_page_tree_get_leaf_value_by_index_from_page( page_tree, file_io_handle, child_page, leaf_value_index, data_definition, current_leaf_value_index, recursion_depth + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %d from page: %" PRIu32 ".", function, leaf_value_index, child_page_number ); goto on_error; } } } if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } if( *current_leaf_value_index > leaf_value_index ) { break; } } if( libfcache_cache_free( &child_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free child page cache.", function ); goto on_error; } return( 1 ); on_error: if( *data_definition != NULL ) { libesedb_data_definition_free( data_definition, NULL ); } if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } if( child_page_cache != NULL ) { libfcache_cache_free( &child_page_cache, NULL ); } return( -1 ); } /* Retrieves a specific leaf value * This function creates a new data definition * Returns 1 if successful or -1 on error */ int libesedb_page_tree_get_leaf_value_by_index( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, int leaf_value_index, libesedb_data_definition_t **data_definition, libcerror_error_t **error ) { libcdata_tree_node_t *upper_node = NULL; libesedb_leaf_page_descriptor_t *existing_leaf_page_descriptor = NULL; libesedb_leaf_page_descriptor_t *leaf_page_descriptor = NULL; libesedb_page_t *base_page = NULL; libfcache_cache_t *base_page_cache = NULL; static char *function = "libesedb_page_tree_get_leaf_value_by_index"; uint32_t base_page_number = 0; int current_leaf_value_index = 0; int number_of_leaf_values = 0; int result = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( leaf_value_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value index value out of bounds.", function ); goto on_error; } if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( page_tree->number_of_leaf_values == -1 ) { /* libesedb_page_tree_get_number_of_leaf_values is called to build the leaf_page_descriptors_tree */ if( libesedb_page_tree_get_number_of_leaf_values( page_tree, file_io_handle, &number_of_leaf_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf values from page: %" PRIu32 ".", function, page_tree->root_page_number ); goto on_error; } } base_page_number = page_tree->root_page_number; if( libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create leaf page descriptor.", function ); goto on_error; } leaf_page_descriptor->first_leaf_value_index = leaf_value_index; leaf_page_descriptor->last_leaf_value_index = leaf_value_index; result = libcdata_btree_get_value_by_value( page_tree->leaf_page_descriptors_tree, (intptr_t *) leaf_page_descriptor, (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libesedb_leaf_page_descriptor_compare, &upper_node, (intptr_t **) &existing_leaf_page_descriptor, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf page descriptor from tree.", function ); goto on_error; } else if( result != 0 ) { if( existing_leaf_page_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing existing leaf page descriptor.", function ); goto on_error; } current_leaf_value_index = existing_leaf_page_descriptor->first_leaf_value_index; base_page_number = existing_leaf_page_descriptor->page_number; } if( libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free leaf page descriptor.", function ); goto on_error; } /* Use a local cache to prevent cache invalidation of the root page * when reading child pages. */ if( libfcache_cache_initialize( &base_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create base page cache.", function ); goto on_error; } if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) base_page_cache, (int) base_page_number - 1, (intptr_t **) &base_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, base_page_number ); goto on_error; } if( base_page_number == page_tree->root_page_number ) { if( libesedb_page_validate_root_page( base_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported root page.", function ); goto on_error; } } if( libesedb_page_tree_get_leaf_value_by_index_from_page( page_tree, file_io_handle, base_page, leaf_value_index, data_definition, ¤t_leaf_value_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %d from page: %" PRIu32 ".", function, leaf_value_index, base_page_number ); goto on_error; } if( current_leaf_value_index != ( leaf_value_index + 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid current leaf value index value out of bounds.", function ); goto on_error; } if( libfcache_cache_free( &base_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free base page cache.", function ); goto on_error; } return( 1 ); on_error: if( *data_definition != NULL ) { libesedb_data_definition_free( data_definition, NULL ); } if( leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, NULL ); } if( base_page_cache != NULL ) { libfcache_cache_free( &base_page_cache, NULL ); } return( -1 ); } /* Retrieves a specific leaf value * This function creates a new data definition * Returns 1 if successful, 0 if no such value or -1 on error */ int libesedb_page_tree_get_leaf_value_by_key_from_page( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, libesedb_page_tree_key_t *leaf_value_key, libesedb_data_definition_t **data_definition, int recursion_depth, libcerror_error_t **error ) { libesedb_page_tree_key_t *page_value_key = NULL; libesedb_page_t *child_page = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; libfcache_cache_t *child_page_cache = NULL; static char *function = "libesedb_page_tree_get_leaf_value_by_key_from_page"; uint32_t child_page_number = 0; uint32_t page_flags = 0; uint16_t data_offset = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; int compare_result = 0; int result = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } if( page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page tree - missing IO handle.", function ); return( -1 ); } if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( ( recursion_depth < 0 ) || ( recursion_depth > LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid recursion depth value out of bounds.", function ); return( -1 ); } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } if( number_of_page_values == 0 ) { return( 1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } /* Use a local cache to prevent cache invalidation of the page * when reading child pages. */ if( libfcache_cache_initialize( &child_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create child page cache.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { continue; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_ROOT ) != 0 ) { if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page - root flag is set and page value: %" PRIu16 " has common key.", function, page_value_index ); goto on_error; } } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( libesedb_page_tree_get_key( page_tree, page_tree_value, page, page_flags, page_value_index, &page_value_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve key of page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } compare_result = libesedb_page_tree_key_compare( leaf_value_key, page_value_key, error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare page value: %" PRIu16 " and leaf value keys.", function, page_value_index ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { if( compare_result == LIBFDATA_COMPARE_EQUAL ) { if( libesedb_data_definition_initialize( data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data definition.", function ); goto on_error; } data_offset = page_value->offset + 2 + page_tree_value->local_key_size; if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE ) != 0 ) { data_offset += 2; } ( *data_definition )->page_value_index = page_value_index; ( *data_definition )->page_offset = page->offset - ( 2 * page_tree->io_handle->page_size ); ( *data_definition )->page_number = page->page_number; ( *data_definition )->data_offset = data_offset; ( *data_definition )->data_size = page_tree_value->data_size; result = 1; } } else if( compare_result != LIBFDATA_COMPARE_GREATER ) { if( page_tree_value->data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page tree value: %" PRIu16 " data size value out of bounds.", function, page_value_index ); goto on_error; } byte_stream_copy_to_uint32_little_endian( page_tree_value->data, child_page_number ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " child page number\t: %" PRIu32 "", function, page_value_index, child_page_number ); if( child_page_number == 0 ) { libcnotify_printf( " (invalid page number)\n" ); } else if( child_page_number > page_tree->io_handle->last_page_number ) { libcnotify_printf( " (exceeds last page number: %" PRIu32 ")\n", page_tree->io_handle->last_page_number ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif #if ( SIZEOF_INT <= 4 ) if( ( child_page_number < 1 ) || ( child_page_number > (uint32_t) INT_MAX ) ) #else if( ( child_page_number < 1 ) || ( (int) child_page_number > INT_MAX ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid child page number value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( page_tree_value->data_size > 4 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " trailing data:\n", function, page_value_index ); libcnotify_print_data( &( page_tree_value->data[ 4 ] ), page_tree_value->data_size - 4, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } #endif if( ( child_page_number > 0 ) && ( child_page_number <= page_tree->io_handle->last_page_number ) ) { if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) child_page_cache, (int) child_page_number - 1, (intptr_t **) &child_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, child_page_number ); goto on_error; } if( libesedb_page_validate_page( child_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page.", function ); goto on_error; } result = libesedb_page_tree_get_leaf_value_by_key_from_page( page_tree, file_io_handle, child_page, leaf_value_key, data_definition, recursion_depth + 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value from page: %" PRIu32 ".", function, child_page_number ); goto on_error; } } } if( libesedb_page_tree_key_free( &page_value_key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page value key.", function ); goto on_error; } if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } if( result != 0 ) { break; } } if( libfcache_cache_free( &child_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free child page cache.", function ); goto on_error; } return( result ); on_error: if( *data_definition != NULL ) { libesedb_data_definition_free( data_definition, NULL ); } if( page_value_key != NULL ) { libesedb_page_tree_key_free( &page_value_key, NULL ); } if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } if( child_page_cache != NULL ) { libfcache_cache_free( &child_page_cache, NULL ); } return( -1 ); } /* Retrieves a specific leaf value * This function creates a new data definition * Returns 1 if successful, 0 if no such value or -1 on error */ int libesedb_page_tree_get_leaf_value_by_key( libesedb_page_tree_t *page_tree, libbfio_handle_t *file_io_handle, libesedb_page_tree_key_t *leaf_value_key, libesedb_data_definition_t **data_definition, libcerror_error_t **error ) { libesedb_page_t *root_page = NULL; libfcache_cache_t *root_page_cache = NULL; static char *function = "libesedb_page_tree_get_leaf_value_by_key"; int result = 0; if( page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree.", function ); return( -1 ); } /* Use a local cache to prevent cache invalidation of the root page * when reading child pages. */ if( libfcache_cache_initialize( &root_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root page cache.", function ); goto on_error; } if( libfdata_vector_get_element_value_by_index( page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) root_page_cache, (int) page_tree->root_page_number - 1, (intptr_t **) &root_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, page_tree->root_page_number ); goto on_error; } if( libesedb_page_validate_root_page( root_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported root page.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( page_tree->root_page_header == NULL ) { if( libesedb_page_tree_read_root_page_header( page_tree, root_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root page header.", function ); goto on_error; } } #endif result = libesedb_page_tree_get_leaf_value_by_key_from_page( page_tree, file_io_handle, root_page, leaf_value_key, data_definition, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value from page: %" PRIu32 ".", function, page_tree->root_page_number ); goto on_error; } if( libfcache_cache_free( &root_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root page cache.", function ); goto on_error; } return( result ); on_error: if( root_page_cache != NULL ) { libfcache_cache_free( &root_page_cache, NULL ); } return( -1 ); } #ifdef TODO /* TODO refactor */ if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { if( libcnotify_verbose != 0 ) { if( page_value_index > 1 ) { if( child_page->page_number != previous_next_child_page_number ) { libcnotify_printf( "%s: mismatch in child page number (%" PRIu32 " != %" PRIu32 ").\n", function, previous_next_child_page_number, child_page->page_number ); } if( child_page->header->previous_page_number != previous_child_page_number ) { libcnotify_printf( "%s: mismatch in previous child page number (%" PRIu32 " != %" PRIu32 ").\n", function, previous_child_page_number, child_page->header->previous_page_number ); } } /* TODO need the actual values for the following checks if( page_value_index == 1 ) { if( child_page->header->previous_page_number != 0 ) { libcnotify_printf( "%s: mismatch in previous child page number (%" PRIu32 " != %" PRIu32 ").", function, 0, child_page->header->previous_page_number ); } } if( page_value_index == ( number_of_page_values - 1 ) ) { if( child_page->header->next_page_number != 0 ) { libcnotify_printf( "%s: mismatch in next child page number (%" PRIu32 " != %" PRIu32 ").", function, 0, child_page->header->previous_page_number ); } } */ } previous_child_page_number = child_page->page_number; previous_next_child_page_number = child_page->header->next_page_number; } #endif /* TODO */ libesedb-20240420/libesedb/libesedb_block_descriptor.c0000644000175000017500000000606114610727250023465 0ustar00lordyestalordyesta/* * Block descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_block_descriptor.h" #include "libesedb_libcerror.h" /* Creates a block descriptor * Make sure the value block_descriptor is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_block_descriptor_initialize( libesedb_block_descriptor_t **block_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_block_descriptor_initialize"; if( block_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block descriptor.", function ); return( -1 ); } if( *block_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid block descriptor value already set.", function ); return( -1 ); } *block_descriptor = memory_allocate_structure( libesedb_block_descriptor_t ); if( *block_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block descriptor.", function ); goto on_error; } if( memory_set( *block_descriptor, 0, sizeof( libesedb_block_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block descriptor.", function ); goto on_error; } return( 1 ); on_error: if( *block_descriptor != NULL ) { memory_free( *block_descriptor ); *block_descriptor = NULL; } return( -1 ); } /* Frees a block descriptor * Returns 1 if successful or -1 on error */ int libesedb_block_descriptor_free( libesedb_block_descriptor_t **block_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_block_descriptor_free"; if( block_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block descriptor.", function ); return( -1 ); } if( *block_descriptor != NULL ) { memory_free( *block_descriptor ); *block_descriptor = NULL; } return( 1 ); } libesedb-20240420/libesedb/libesedb_block_tree_node.c0000644000175000017500000003530514610727250023256 0ustar00lordyestalordyesta/* * Block tree node functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_block_tree_node.h" #include "libesedb_definitions.h" #include "libesedb_libcerror.h" /* Creates a block tree node * Make sure the value block_tree_node is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_initialize( libesedb_block_tree_node_t **block_tree_node, off64_t offset, size64_t size, size64_t leaf_value_size, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_node_initialize"; size64_t sub_node_size = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( *block_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid block tree node value already set.", function ); return( -1 ); } if( offset < 0 ) { 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 ); } if( ( size == 0 ) || ( size > (size64_t) ( INT64_MAX - offset ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid size value out of bounds.", function ); return( -1 ); } if( leaf_value_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value size value out of bounds.", function ); return( -1 ); } *block_tree_node = memory_allocate_structure( libesedb_block_tree_node_t ); if( *block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block tree node.", function ); goto on_error; } if( memory_set( *block_tree_node, 0, sizeof( libesedb_block_tree_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block tree node.", function ); memory_free( *block_tree_node ); *block_tree_node = NULL; return( -1 ); } if( libcdata_array_initialize( &( ( *block_tree_node )->sub_nodes_array ), LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES, 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; } sub_node_size = leaf_value_size; while( ( size / sub_node_size ) > LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES ) { sub_node_size *= LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES; } ( *block_tree_node )->start_offset = offset; ( *block_tree_node )->end_offset = offset + size; ( *block_tree_node )->size = size; ( *block_tree_node )->sub_node_size = sub_node_size; if( sub_node_size == leaf_value_size ) { ( *block_tree_node )->is_leaf_node = 1; } return( 1 ); on_error: if( *block_tree_node != NULL ) { memory_free( *block_tree_node ); *block_tree_node = NULL; } return( -1 ); } /* Frees a block tree node * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_free( libesedb_block_tree_node_t **block_tree_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libesedb_block_tree_node_t *sub_block_tree_node = NULL; static char *function = "libesedb_block_tree_node_free"; int result = 1; int sub_node_index = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( *block_tree_node != NULL ) { if( ( *block_tree_node )->is_leaf_node != 0 ) { if( libcdata_array_free( &( ( *block_tree_node )->sub_nodes_array ), value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub nodes array.", function ); result = -1; } } else { for( sub_node_index = 0; sub_node_index < LIBESEDB_BLOCK_TREE_NUMBER_OF_SUB_NODES; sub_node_index++ ) { if( libcdata_array_get_entry_by_index( ( *block_tree_node )->sub_nodes_array, sub_node_index, (intptr_t **) &sub_block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d.", function, sub_node_index ); result = -1; } if( libesedb_block_tree_node_free( &sub_block_tree_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_index ); result = -1; } } if( libcdata_array_free( &( ( *block_tree_node )->sub_nodes_array ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub nodes array.", function ); result = -1; } } memory_free( *block_tree_node ); *block_tree_node = NULL; } return( result ); } /* Retrieves the sub node for a specific offset * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_get_sub_node_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_tree_node_t **sub_block_tree_node, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_node_get_sub_node_at_offset"; off64_t sub_node_index = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( block_tree_node->is_leaf_node != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node - not a branch node.", function ); return( -1 ); } if( ( offset < block_tree_node->start_offset ) || ( offset >= block_tree_node->end_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 ); } sub_node_index = ( offset - block_tree_node->start_offset ) / block_tree_node->sub_node_size; if( ( sub_node_index < 0 ) || ( sub_node_index > (off64_t) INT_MAX ) ) { 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( libcdata_array_get_entry_by_index( block_tree_node->sub_nodes_array, (int) sub_node_index, (intptr_t **) sub_block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %" PRIi64 ".", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the sub node for a specific offset * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_set_sub_node_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_tree_node_t *sub_block_tree_node, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_node_set_sub_node_at_offset"; off64_t sub_node_index = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( block_tree_node->is_leaf_node != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node - not a branch node.", function ); return( -1 ); } if( ( offset < block_tree_node->start_offset ) || ( offset >= block_tree_node->end_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 ); } sub_node_index = ( offset - block_tree_node->start_offset ) / block_tree_node->sub_node_size; if( ( sub_node_index < 0 ) || ( sub_node_index > (off64_t) INT_MAX ) ) { 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( libcdata_array_set_entry_by_index( block_tree_node->sub_nodes_array, (int) sub_node_index, (intptr_t *) sub_block_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %" PRIi64 ".", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Retrieves the leaf value for a specific offset * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_get_leaf_value_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_descriptor_t **block_descriptor, off64_t *block_offset, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_node_get_leaf_value_at_offset"; off64_t leaf_value_index = 0; off64_t safe_block_offset = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( block_tree_node->is_leaf_node == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node - not a leaf node.", function ); return( -1 ); } if( ( offset < block_tree_node->start_offset ) || ( offset >= block_tree_node->end_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 ); } if( block_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block offset.", function ); return( -1 ); } safe_block_offset = offset - block_tree_node->start_offset; leaf_value_index = safe_block_offset / block_tree_node->sub_node_size; if( ( leaf_value_index < 0 ) || ( leaf_value_index > (off64_t) INT_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value index value out of bounds.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( block_tree_node->sub_nodes_array, (int) leaf_value_index, (intptr_t **) block_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %" PRIi64 ".", function, leaf_value_index ); return( -1 ); } *block_offset = safe_block_offset - ( leaf_value_index * block_tree_node->sub_node_size ); return( 1 ); } /* Sets the leaf value for a specific offset * Returns 1 if successful or -1 on error */ int libesedb_block_tree_node_set_leaf_value_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_descriptor_t *block_descriptor, libcerror_error_t **error ) { static char *function = "libesedb_block_tree_node_set_leaf_value_at_offset"; off64_t leaf_value_index = 0; if( block_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node.", function ); return( -1 ); } if( block_tree_node->is_leaf_node == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block tree node - not a leaf node.", function ); return( -1 ); } if( ( offset < block_tree_node->start_offset ) || ( offset >= block_tree_node->end_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 ); } leaf_value_index = ( offset - block_tree_node->start_offset ) / block_tree_node->sub_node_size; if( ( leaf_value_index < 0 ) || ( leaf_value_index > (off64_t) INT_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf value index value out of bounds.", function ); return( -1 ); } if( libcdata_array_set_entry_by_index( block_tree_node->sub_nodes_array, (int) leaf_value_index, (intptr_t *) block_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf value: %" PRIi64 ".", function, leaf_value_index ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_support.c0000644000175000017500000002222714610727250021653 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "libesedb_codepage.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libclocale.h" #include "libesedb_support.h" #if !defined( HAVE_LOCAL_LIBESEDB ) /* Returns the library version */ const char *libesedb_get_version( void ) { return( (const char *) LIBESEDB_VERSION_STRING ); } /* Returns the access flags for reading */ int libesedb_get_access_flags_read( void ) { return( (uint8_t) LIBESEDB_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 libesedb_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libesedb_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 libesedb_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libesedb_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_LIBESEDB ) */ /* Determines if a file contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ int libesedb_check_file_signature( const char *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libesedb_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 = 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 ); goto on_error; } 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 = libesedb_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 contains an ESEDB file signature * Returns 1 if true, 0 if not or -1 on error */ int libesedb_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libesedb_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 = 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 = libesedb_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 /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Determines if a file contains an ESEDB file signature using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { uint8_t signature[ 8 ]; static char *function = "libesedb_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; } } read_count = libbfio_handle_read_buffer_at_offset( file_io_handle, signature, 8, 0, error ); if( read_count != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read signature at offset: 0 (0x00000000).", 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 ); goto on_error; } } if( memory_compare( esedb_file_signature, &( signature[ 4 ] ), 4 ) == 0 ) { return( 1 ); } return( 0 ); on_error: if( file_io_handle_is_open == 0 ) { libbfio_handle_close( file_io_handle, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_debug.c0000644000175000017500000004061614610727250021227 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the file type */ void libesedb_debug_print_file_type( uint32_t file_type ) { switch( file_type ) { case LIBESEDB_FILE_TYPE_DATABASE: libcnotify_printf( "Database" ); break; case LIBESEDB_FILE_TYPE_STREAMING_FILE: libcnotify_printf( "Streaming file" ); break; default: libcnotify_printf( "(Unknown)" ); } } /* Prints the database state */ void libesedb_debug_print_database_state( uint32_t database_state ) { switch( database_state ) { case 1: libcnotify_printf( "Just created (JET_dbstateJustCreated)" ); break; case 2: libcnotify_printf( "Dirty Shutdown (JET_dbstateDirtyShutdown)" ); break; case 3: libcnotify_printf( "Clean Shutdown (JET_dbstateCleanShutdown)" ); break; case 4: libcnotify_printf( "Being converted (JET_dbstateBeingConverted)" ); break; case 5: libcnotify_printf( "Force Detach (JET_dbstateForceDetach)" ); break; default: libcnotify_printf( "(Unknown)" ); break; } } /* Prints the page flags */ void libesedb_debug_print_page_flags( uint32_t page_flags ) { if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_ROOT ) != 0 ) { libcnotify_printf( "\tIs root\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { libcnotify_printf( "\tIs leaf\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_PARENT ) != 0 ) { libcnotify_printf( "\tIs parent\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_EMPTY ) != 0 ) { libcnotify_printf( "\tIs empty\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_SPACE_TREE ) != 0 ) { libcnotify_printf( "\tIs space tree\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_INDEX ) != 0 ) { libcnotify_printf( "\tIs index\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LONG_VALUE ) != 0 ) { libcnotify_printf( "\tIs long value\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_0x0400 ) != 0 ) { libcnotify_printf( "\t0x0400\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_0x0800 ) != 0 ) { libcnotify_printf( "\t0x0800 (primary?)\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT ) != 0 ) { libcnotify_printf( "\tIs new record format\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_SCRUBBED ) != 0 ) { libcnotify_printf( "\tIs scrubbed\n" ); } if( ( page_flags & LIBESEDB_PAGE_FLAG_0x8000 ) != 0 ) { libcnotify_printf( "\t0x8000\n" ); } } /* Prints the page tag flags */ void libesedb_debug_print_page_tag_flags( uint8_t page_tag_flags ) { if( page_tag_flags > 0 ) { libcnotify_printf( " (" ); if( ( page_tag_flags & 0x04 ) != 0 ) { libcnotify_printf( "c" ); } if( ( page_tag_flags & 0x02 ) != 0 ) { libcnotify_printf( "d" ); } if( ( page_tag_flags & 0x01 ) != 0 ) { libcnotify_printf( "v" ); } libcnotify_printf( ")" ); } } /* Prints the tagged data type flags */ void libesedb_debug_print_tagged_data_type_flags( uint8_t tagged_data_type_flags ) { if( ( tagged_data_type_flags & LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ) != 0 ) { libcnotify_printf( "\tIs variable size\n" ); } if( ( tagged_data_type_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { libcnotify_printf( "\tIs compressed\n" ); } if( ( tagged_data_type_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) != 0 ) { libcnotify_printf( "\tIs long value\n" ); } if( ( tagged_data_type_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcnotify_printf( "\tIs multi value\n" ); } } /* Prints the data definition type */ void libesedb_debug_print_page_value_definition_type( uint16_t page_value_definition_type ) { switch( page_value_definition_type ) { case 1: libcnotify_printf( "(Table)" ); break; case 2: libcnotify_printf( "(Column)" ); break; case 3: libcnotify_printf( "(Index)" ); break; case 4: libcnotify_printf( "(Long Value)" ); break; case 5: libcnotify_printf( "(Callback)" ); break; default: libcnotify_printf( "(Unknown)" ); break; } } /* Prints the table group of bits */ void libesedb_debug_print_table_group_of_bits( uint32_t table_group_of_bits ) { if( ( table_group_of_bits & 0x00000001 ) != 0 ) { libcnotify_printf( "\t(JET_bitTableCreateFixedDDL)\n" ); } if( ( table_group_of_bits & 0x00000002 ) != 0 ) { libcnotify_printf( "\t(JET_bitTableCreateTemplateTable)\n" ); } if( ( table_group_of_bits & 0x00000004 ) != 0 ) { libcnotify_printf( "\t(JET_bitTableCreateNoFixedVarColumnsInDerivedTables)\n" ); } } /* Prints the column group of bits */ void libesedb_debug_print_column_group_of_bits( uint32_t column_group_of_bits ) { if( ( column_group_of_bits & 0x00000001 ) != 0 ) { libcnotify_printf( "\tIs fixed size (JET_bitColumnFixed)\n" ); } if( ( column_group_of_bits & 0x00000002 ) != 0 ) { libcnotify_printf( "\tIs tagged (JET_bitColumnTagged)\n" ); } if( ( column_group_of_bits & 0x00000004 ) != 0 ) { libcnotify_printf( "\tNot empty (JET_bitColumnNotNULL)\n" ); } if( ( column_group_of_bits & 0x00000008 ) != 0 ) { libcnotify_printf( "\tIs version column (JET_bitColumnVersion)\n" ); } if( ( column_group_of_bits & 0x00000010 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnAutoincrement)\n" ); } if( ( column_group_of_bits & 0x00000020 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnUpdatable)\n" ); } if( ( column_group_of_bits & 0x00000040 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnTTKey)\n" ); } if( ( column_group_of_bits & 0x00000080 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnTTDescending)\n" ); } if( ( column_group_of_bits & 0x00000400 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnMultiValued)\n" ); } if( ( column_group_of_bits & 0x00000800 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnEscrowUpdate)\n" ); } if( ( column_group_of_bits & 0x00001000 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnUnversioned)\n" ); } if( ( column_group_of_bits & 0x00002000 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnDeleteOnZero or JET_bitColumnMaybeNull)\n" ); } if( ( column_group_of_bits & 0x00004000 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnFinalize)\n" ); } if( ( column_group_of_bits & 0x00008000 ) != 0 ) { libcnotify_printf( "\t(JET_bitColumnUserDefinedDefault)\n" ); } } /* Prints the index group of bits */ void libesedb_debug_print_index_group_of_bits( uint32_t index_group_of_bits ) { if( ( index_group_of_bits & 0x00000001 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexUnique)\n" ); } if( ( index_group_of_bits & 0x00000002 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexPrimary)\n" ); } if( ( index_group_of_bits & 0x00000004 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexDisallowNull)\n" ); } if( ( index_group_of_bits & 0x00000008 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexIgnoreNull)\n" ); } if( ( index_group_of_bits & 0x00000010 ) != 0 ) { libcnotify_printf( "\t(0x00000010)\n" ); } if( ( index_group_of_bits & 0x00000020 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexIgnoreAnyNull)\n" ); } if( ( index_group_of_bits & 0x00000040 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexIgnoreFirstNull)\n" ); } if( ( index_group_of_bits & 0x00000080 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexLazyFlush)\n" ); } if( ( index_group_of_bits & 0x00000100 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexEmpty)\n" ); } if( ( index_group_of_bits & 0x00000200 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexUnversioned)\n" ); } if( ( index_group_of_bits & 0x00000400 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexSortNullsHigh)\n" ); } if( ( index_group_of_bits & 0x00000800 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexUnicode)\n" ); } if( ( index_group_of_bits & 0x00001000 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexTuples)\n" ); } if( ( index_group_of_bits & 0x00002000 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexTupleLimits)\n" ); } if( ( index_group_of_bits & 0x00004000 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexCrossProduct)\n" ); } if( ( index_group_of_bits & 0x00008000 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexKeyMost)\n" ); } if( ( index_group_of_bits & 0x00010000 ) != 0 ) { libcnotify_printf( "\t(JET_bitIndexDisallowTruncation)\n" ); } } /* Prints the file attribute flags * Returns 1 if successful or -1 on error */ void libesedb_debug_print_file_attribute_flags( uint32_t file_attribute_flags ) { if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_READ_ONLY ) != 0 ) { libcnotify_printf( "\tIs read-only (FILE_ATTRIBUTE_READ_ONLY)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_HIDDEN ) != 0 ) { libcnotify_printf( "\tIs hidden (FILE_ATTRIBUTE_HIDDEN)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_SYSTEM ) != 0 ) { libcnotify_printf( "\tIs system (FILE_ATTRIBUTE_SYSTEM)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_DIRECTORY ) != 0 ) { libcnotify_printf( "\tIs directory (FILE_ATTRIBUTE_DIRECTORY)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_ARCHIVE ) != 0 ) { libcnotify_printf( "\tShould be archived (FILE_ATTRIBUTE_ARCHIVE)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_DEVICE ) != 0 ) { libcnotify_printf( "\tIs device (FILE_ATTRIBUTE_DEVICE)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_NORMAL ) != 0 ) { libcnotify_printf( "\tIs normal (FILE_ATTRIBUTE_NORMAL)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_TEMPORARY ) != 0 ) { libcnotify_printf( "\tIs temporary (FILE_ATTRIBUTE_TEMPORARY)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_SPARSE_FILE ) != 0 ) { libcnotify_printf( "\tIs a sparse file (FILE_ATTRIBUTE_SPARSE_FILE)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_REPARSE_POINT ) != 0 ) { libcnotify_printf( "\tIs a reparse point or symbolic link (FILE_ATTRIBUTE_FLAG_REPARSE_POINT)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_COMPRESSED ) != 0 ) { libcnotify_printf( "\tIs compressed (FILE_ATTRIBUTE_COMPRESSED)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_OFFLINE ) != 0 ) { libcnotify_printf( "\tIs offline (FILE_ATTRIBUTE_OFFLINE)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_NOT_CONTENT_INDEXED ) != 0 ) { libcnotify_printf( "\tContent should not be indexed (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_ENCRYPTED ) != 0 ) { libcnotify_printf( "\tIs encrypted (FILE_ATTRIBUTE_ENCRYPTED)\n" ); } if( ( file_attribute_flags & LIBESEDB_FILE_ATTRIBUTE_FLAG_VIRTUAL ) != 0 ) { libcnotify_printf( "\tIs virtual (FILE_ATTRIBUTE_VIRTUAL)\n" ); } } /* Prints the LCMAP flags * Returns 1 if successful or -1 on error */ void libesedb_debug_print_lcmap_flags( uint32_t lcmap_flags ) { if( ( lcmap_flags & 0x00000300 ) != 0 ) { libcnotify_printf( "\t(LCMAP_TITLECASE)\n" ); } else if( ( lcmap_flags & 0x00000100 ) != 0 ) { libcnotify_printf( "\t(LCMAP_LOWERCASE)\n" ); } else if( ( lcmap_flags & 0x00000200 ) != 0 ) { libcnotify_printf( "\t(LCMAP_UPPERCASE)\n" ); } if( ( lcmap_flags & 0x00000400 ) != 0 ) { libcnotify_printf( "\t(LCMAP_SORTKEY)\n" ); } if( ( lcmap_flags & 0x00000800 ) != 0 ) { libcnotify_printf( "\t(LCMAP_BYTEREV)\n" ); } if( ( lcmap_flags & 0x00100000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_HIRAGANA)\n" ); } if( ( lcmap_flags & 0x00200000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_KATAKANA)\n" ); } if( ( lcmap_flags & 0x00400000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_HALFWIDTH)\n" ); } if( ( lcmap_flags & 0x00800000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_FULLWIDTH)\n" ); } if( ( lcmap_flags & 0x01000000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_LINGUISTIC_CASING)\n" ); } if( ( lcmap_flags & 0x02000000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_SIMPLIFIED_CHINESE)\n" ); } if( ( lcmap_flags & 0x04000000 ) != 0 ) { libcnotify_printf( "\t(LCMAP_TRADITIONAL_CHINESE)\n" ); } } /* Prints a log structure * Returns 1 if successful or -1 on error */ int libesedb_debug_print_log_time( uint8_t *log_time, size_t log_time_size, const char *description, const char *indentation, libcerror_error_t **error ) { static char *function = "libesedb_debug_print_log_time"; if( log_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid log time.", function ); return( -1 ); } if( log_time_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: log time too small.", function ); return( -1 ); } if( log_time_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid log time size value exceeds maximum.", 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 ); } if( indentation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid indentation.", function ); return( -1 ); } libcnotify_printf( "%s: %s%s: %04d-%02d-%02d %02d:%02d:%02d (0x%02x 0x%02x)\n", function, description, indentation, 1900 + log_time[ 5 ], log_time[ 4 ], log_time[ 3 ], log_time[ 2 ], log_time[ 1 ], log_time[ 0 ], log_time[ 6 ], log_time[ 7 ] ); return( 1 ); } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libesedb_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libesedb_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" PRIi64 " ( 0x%08" PRIx64 " ) - %08" PRIi64 " ( 0x%08" PRIx64 " ) size: %" PRIi64 "\n", offset, offset, offset + (off64_t) size, offset + (off64_t) size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ libesedb-20240420/libesedb/libesedb_column.h0000644000175000017500000000523114610727250021435 0ustar00lordyestalordyesta/* * Column functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_COLUMN_H ) #define _LIBESEDB_COLUMN_H #include #include #include "libesedb_catalog_definition.h" #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libcerror.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_column libesedb_internal_column_t; struct libesedb_internal_column { /* The IO handle */ libesedb_io_handle_t *io_handle; /* The catalog definition */ libesedb_catalog_definition_t *catalog_definition; }; int libesedb_column_initialize( libesedb_column_t **column, libesedb_io_handle_t *io_handle, libesedb_catalog_definition_t *catalog_definition, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_free( libesedb_column_t **column, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_identifier( libesedb_column_t *column, uint32_t *identifier, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_type( libesedb_column_t *column, uint32_t *type, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name_size( libesedb_column_t *column, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_utf8_name( libesedb_column_t *column, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name_size( libesedb_column_t *column, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_column_get_utf16_name( libesedb_column_t *column, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_COLUMN_H ) */ libesedb-20240420/libesedb/libesedb_record.c0000644000175000017500000027314714610727250021426 0ustar00lordyestalordyesta/* * Record (row) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_compression.h" #include "libesedb_data_definition.h" #include "libesedb_data_segment.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_libfvalue.h" #include "libesedb_long_value.h" #include "libesedb_multi_value.h" #include "libesedb_page_tree.h" #include "libesedb_page_tree_key.h" #include "libesedb_record.h" #include "libesedb_record_value.h" #include "libesedb_table_definition.h" #include "libesedb_types.h" /* Creates a record * Make sure the value record is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_record_initialize( libesedb_record_t **record, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libfdata_vector_t *long_values_pages_vector, libfcache_cache_t *long_values_pages_cache, libesedb_data_definition_t *data_definition, libesedb_page_tree_t *long_values_page_tree, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_initialize"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( *record != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid record value already set.", function ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table definition - missing table catalog definition.", function ); return( -1 ); } internal_record = memory_allocate_structure( libesedb_internal_record_t ); if( internal_record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create record.", function ); goto on_error; } if( memory_set( internal_record, 0, sizeof( libesedb_internal_record_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record.", function ); memory_free( internal_record ); return( -1 ); } if( libcdata_array_initialize( &( internal_record->values_array ), 0, 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; } if( libesedb_data_definition_read_record( data_definition, file_io_handle, io_handle, pages_vector, pages_cache, table_definition, template_table_definition, internal_record->values_array, &( internal_record->flags ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data definition record.", function ); goto on_error; } internal_record->file_io_handle = file_io_handle; internal_record->io_handle = io_handle; internal_record->table_definition = table_definition; internal_record->template_table_definition = template_table_definition; internal_record->pages_vector = pages_vector; internal_record->pages_cache = pages_cache; internal_record->long_values_pages_vector = long_values_pages_vector; internal_record->long_values_pages_cache = long_values_pages_cache; internal_record->data_definition = data_definition; internal_record->long_values_page_tree = long_values_page_tree; *record = (libesedb_record_t *) internal_record; return( 1 ); on_error: if( internal_record != NULL ) { if( internal_record->values_array != NULL ) { /* Note that if libesedb_data_definition_read_record fails values_array * can contain values that need to be freed with libfvalue_value_free. */ libcdata_array_free( &( internal_record->values_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, NULL ); } memory_free( internal_record ); } return( -1 ); } /* Frees a record * Returns 1 if successful or -1 on error */ int libesedb_record_free( libesedb_record_t **record, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_free"; int result = 1; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( *record != NULL ) { internal_record = (libesedb_internal_record_t *) *record; *record = NULL; /* The io_handle, file_io_handle, table_definition, template_table_definition, pages_vector, * pages_cache, * long_values_pages_vector, long_values_pages_cache and long_values_page_tree * references are freed elsewhere */ if( internal_record->data_definition != NULL ) { if( libesedb_data_definition_free( &( internal_record->data_definition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data definition.", function ); result = -1; } } if( libcdata_array_free( &( internal_record->values_array ), (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 values array.", function ); result = -1; } memory_free( internal_record ); } return( result ); } /* Retrieves the number of values in the record * Returns 1 if successful or -1 on error */ int libesedb_record_get_number_of_values( libesedb_record_t *record, int *number_of_values, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_number_of_values"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libcdata_array_get_number_of_entries( internal_record->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 entries from values array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific column catalog definition * Returns 1 if successful or -1 on error */ int libesedb_record_get_column_catalog_definition( libesedb_internal_record_t *internal_record, int value_entry, libesedb_catalog_definition_t **column_catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_record_get_column_identifier"; int template_table_number_of_columns = 0; if( internal_record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( internal_record->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing table definition.", function ); return( -1 ); } if( internal_record->template_table_definition != NULL ) { if( libesedb_table_definition_get_number_of_column_catalog_definitions( internal_record->template_table_definition, &template_table_number_of_columns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns from template table.", function ); return( -1 ); } } if( value_entry < template_table_number_of_columns ) { if( libesedb_table_definition_get_column_catalog_definition_by_index( internal_record->template_table_definition, value_entry, column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition from template table.", function ); return( -1 ); } } else { if( libesedb_table_definition_get_column_catalog_definition_by_index( internal_record->table_definition, value_entry - template_table_number_of_columns, column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition from table.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the column identifier of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_column_identifier( libesedb_record_t *record, int value_entry, uint32_t *column_identifier, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_column_identifier"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_identifier( column_catalog_definition, column_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the column type of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_column_type( libesedb_record_t *record, int value_entry, uint32_t *column_type, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_column_type"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_record_get_utf8_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_utf8_column_name_size"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( internal_record->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing IO handle.", function ); return( -1 ); } if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name_size( column_catalog_definition, utf8_string_size, internal_record->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-8 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_record_get_utf8_column_name( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_utf8_column_name"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( internal_record->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing IO handle.", function ); return( -1 ); } if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name( column_catalog_definition, utf8_string, utf8_string_size, internal_record->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string of the column name of the specific entry * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_record_get_utf16_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_utf16_column_name_size"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( internal_record->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing IO handle.", function ); return( -1 ); } if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name_size( column_catalog_definition, utf16_string_size, internal_record->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-16 encoded string of the column name of the specific entry * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_record_get_utf16_column_name( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_get_utf16_column_name"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( internal_record->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid record - missing IO handle.", function ); return( -1 ); } if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name( column_catalog_definition, utf16_string, utf16_string_size, internal_record->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_value( libesedb_record_t *record, int value_entry, uint8_t **value_data, size_t *value_data_size, uint8_t *value_flags, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value"; uint32_t data_flags = 0; int encoding = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( value_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value flags.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data( record_value, value_data, value_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } *value_flags = (uint8_t) data_flags; return( 1 ); } /* Retrieves the value data flags of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_value_data_flags( libesedb_record_t *record, int value_entry, uint8_t *value_data_flags, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_data_flags"; uint32_t data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( value_data_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data flags.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } *value_data_flags = (uint8_t) data_flags; return( 1 ); } /* Retrieves the value data size of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_value_data_size( libesedb_record_t *record, int value_entry, size_t *value_data_size, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_data_size"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_size( record_value, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data size.", function, value_entry ); return( -1 ); } return( 1 ); } /* Retrieves the value data of the specific entry * Returns 1 if successful or -1 on error */ int libesedb_record_get_value_data( libesedb_record_t *record, int value_entry, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_data"; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_copy_data( record_value, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value: %d data.", function, value_entry ); return( -1 ); } return( 1 ); } /* Retrieves the boolean value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_boolean( libesedb_record_t *record, int value_entry, uint8_t *value_boolean, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_boolean"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_BOOLEAN ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_boolean( record_value, 0, value_boolean, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to boolean value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 8-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_8bit( libesedb_record_t *record, int value_entry, uint8_t *value_8bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_8bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_8bit( record_value, 0, value_8bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to 8-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 16-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_16bit( libesedb_record_t *record, int value_entry, uint16_t *value_16bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_16bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_16bit( record_value, 0, value_16bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to 16-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 32-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_32bit( libesedb_record_t *record, int value_entry, uint32_t *value_32bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_32bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_32bit( record_value, 0, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to 32-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_64bit( libesedb_record_t *record, int value_entry, uint64_t *value_64bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_64bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_CURRENCY ) && ( column_type != LIBESEDB_COLUMN_TYPE_DATE_TIME ) && ( column_type != LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_64bit( record_value, 0, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to 64-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit filetime value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_filetime( libesedb_record_t *record, int value_entry, uint64_t *value_filetime, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_filetime"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_DATE_TIME ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { /* Copy the filetime to a 64-bit value */ if( libfvalue_value_copy_to_64bit( record_value, 0, value_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to 64-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the single precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_floating_point_32bit( libesedb_record_t *record, int value_entry, float *value_floating_point_32bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_floating_point_32bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_FLOAT_32BIT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_float( record_value, 0, value_floating_point_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to single precision floating point value.", function ); return( -1 ); } } return( result ); } /* Retrieves the double precision floating point value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_floating_point_64bit( libesedb_record_t *record, int value_entry, double *value_floating_point_64bit, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_floating_point_64bit"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( column_type != LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_copy_to_double( record_value, 0, value_floating_point_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to double precision floating point value.", function ); return( -1 ); } } return( result ); } /* Retrieves the size of an UTF-8 string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_utf8_string_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_utf8_string_size"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libesedb_record_value_get_utf8_string_size( record_value, 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 from value: %d.", function, value_entry ); return( -1 ); } return( result ); } /* Retrieves the UTF-8 encoded string of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_utf8_string( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_utf8_string"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libesedb_record_value_get_utf8_string( record_value, utf8_string, 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 from value: %d.", function, value_entry ); return( -1 ); } return( result ); } /* Retrieves the size of an UTF-16 string a specific entry * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_utf16_string_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_utf16_string_size"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libesedb_record_value_get_utf16_string_size( record_value, 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 from value: %d.", function, value_entry ); return( -1 ); } return( result ); } /* Retrieves the UTF-16 encoded string value of a specific entry * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_utf16_string( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_record_get_value_utf16_string"; uint32_t column_type = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libesedb_record_value_get_utf16_string( record_value, utf16_string, 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 from value: %d.", function, value_entry ); return( -1 ); } return( result ); } /* Retrieves the binary data size of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_binary_data_size( libesedb_record_t *record, int value_entry, size_t *binary_data_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; uint8_t *entry_data = NULL; uint8_t *value_data = NULL; static char *function = "libesedb_record_get_value_binary_data_size"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_decompress_get_size( entry_data, entry_data_size, binary_data_size, error ); } else { result = libfvalue_value_get_data( record_value, &value_data, binary_data_size, &encoding, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve value data.", function ); return( -1 ); } } return( result ); } /* Retrieves the binary data value of a specific entry * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_get_value_binary_data( libesedb_record_t *record, int value_entry, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; uint8_t *entry_data = NULL; static char *function = "libesedb_record_get_value_binary_data"; size_t entry_data_size = 0; uint32_t column_type = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_column_type( column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_BINARY_DATA ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_decompress( entry_data, entry_data_size, binary_data, binary_data_size, error ); } else { result = libfvalue_value_copy_data( record_value, binary_data, binary_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable copy value data.", function ); return( -1 ); } } return( result ); } /* Determines if a specific entry is a long value * Returns 1 if true, 0 if not or -1 on error */ int libesedb_record_is_long_value( libesedb_record_t *record, int value_entry, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_is_long_value"; libfvalue_value_t *record_value = NULL; uint32_t data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } return( ( data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) != 0 ); } /* Determines if a specific entry is a multi value * Returns 1 if true, 0 if not or -1 on error */ int libesedb_record_is_multi_value( libesedb_record_t *record, int value_entry, libcerror_error_t **error ) { libesedb_internal_record_t *internal_record = NULL; static char *function = "libesedb_record_is_multi_value"; libfvalue_value_t *record_value = NULL; uint32_t data_flags = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } return( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ); } /* Retrieves the long value data segments list of a specific entry * Creates a new data segments list * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libesedb_record_get_long_value_data_segments_list( libesedb_internal_record_t *internal_record, const uint8_t *long_value_key, size_t long_value_key_size, libfdata_list_t **data_segments_list, libcerror_error_t **error ) { uint8_t long_value_segment_key[ 8 ]; libesedb_data_definition_t *data_definition = NULL; libesedb_page_tree_key_t *key = NULL; static char *function = "libesedb_record_get_long_value_data_segments_list"; uint32_t long_value_segment_offset = 0; int result = 0; if( internal_record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( long_value_key == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value key.", function ); return( -1 ); } if( long_value_key_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupport long value key size: %" PRIzd ".", function, long_value_key_size ); return( -1 ); } if( data_segments_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segments list.", function ); return( -1 ); } if( libesedb_page_tree_key_initialize( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); goto on_error; } if( libesedb_page_tree_key_set_data( key, long_value_key, long_value_key_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set long value key data in key.", function ); goto on_error; } key->type = LIBESEDB_KEY_TYPE_LONG_VALUE; result = libesedb_page_tree_get_leaf_value_by_key( internal_record->long_values_page_tree, internal_record->file_io_handle, key, &data_definition, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value by key.", function ); goto on_error; } if( libesedb_page_tree_key_free( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key.", function ); goto on_error; } if( result == 0 ) { return( 0 ); } if( libfdata_list_initialize( data_segments_list, NULL, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfdata_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libesedb_data_segment_read_element_data, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data segments list.", function ); goto on_error; } if( libesedb_data_definition_read_long_value( data_definition, internal_record->file_io_handle, internal_record->long_values_pages_vector, internal_record->long_values_pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data definition long value.", function ); goto on_error; } if( libesedb_data_definition_free( &data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data definition.", function ); goto on_error; } /* Reverse the reversed long value key */ long_value_segment_key[ 0 ] = long_value_key[ 3 ]; long_value_segment_key[ 1 ] = long_value_key[ 2 ]; long_value_segment_key[ 2 ] = long_value_key[ 1 ]; long_value_segment_key[ 3 ] = long_value_key[ 0 ]; do { byte_stream_copy_from_uint32_big_endian( &( long_value_segment_key[ 4 ] ), long_value_segment_offset ); if( libesedb_page_tree_key_initialize( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); goto on_error; } if( libesedb_page_tree_key_set_data( key, long_value_segment_key, 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set long value segment key data in key.", function ); goto on_error; } key->type = LIBESEDB_KEY_TYPE_LONG_VALUE_SEGMENT; result = libesedb_page_tree_get_leaf_value_by_key( internal_record->long_values_page_tree, internal_record->file_io_handle, key, &data_definition, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value by key.", function ); goto on_error; } else if( result != 0 ) { if( libesedb_data_definition_read_long_value_segment( data_definition, internal_record->file_io_handle, internal_record->io_handle, internal_record->long_values_pages_vector, internal_record->long_values_pages_cache, long_value_segment_offset, *data_segments_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data definition long value segment.", function ); goto on_error; } long_value_segment_offset += data_definition->data_size; if( libesedb_data_definition_free( &data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data definition.", function ); goto on_error; } } if( libesedb_page_tree_key_free( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key.", function ); goto on_error; } } while( result == 1 ); return( 1 ); on_error: if( *data_segments_list != NULL ) { libfdata_list_free( data_segments_list, NULL ); } if( data_definition != NULL ) { libesedb_data_definition_free( &data_definition, NULL ); } if( key != NULL ) { libesedb_page_tree_key_free( &key, NULL ); } return( -1 ); } /* Retrieves the long value of a specific entry * Creates a new long value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libesedb_record_get_long_value( libesedb_record_t *record, int value_entry, libesedb_long_value_t **long_value, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfdata_list_t *data_segments_list = NULL; libfvalue_value_t *record_value = NULL; uint8_t* value_data = NULL; static char *function = "libesedb_record_get_long_value"; size_t value_data_size = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } if( *long_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: long value already set.", function ); return( -1 ); } if( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); goto on_error; } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); goto on_error; } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); goto on_error; } if( ( data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); goto on_error; } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); goto on_error; } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); goto on_error; } else if( result == 0 ) { return( 0 ); } if( libfvalue_value_get_data( record_value, &value_data, &value_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve value data.", function ); goto on_error; } result = libesedb_record_get_long_value_data_segments_list( internal_record, value_data, value_data_size, &data_segments_list, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve value data.", function ); goto on_error; } else if( result == 0 ) { return( 0 ); } if( libesedb_long_value_initialize( long_value, internal_record->file_io_handle, internal_record->io_handle, column_catalog_definition, data_segments_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create long value.", function ); goto on_error; } return( 1 ); on_error: if( data_segments_list != NULL ) { libfdata_list_free( &data_segments_list, NULL ); } return( -1 ); } /* Retrieves the multi value of a specific entry * Creates a new multi value * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libesedb_record_get_multi_value( libesedb_record_t *record, int value_entry, libesedb_multi_value_t **multi_value, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_record_t *internal_record = NULL; libfvalue_value_t *record_value = NULL; uint8_t *value_data = NULL; static char *function = "libesedb_record_get_multi_value"; size_t value_data_offset = 0; size_t value_data_size = 0; uint32_t data_flags = 0; uint16_t number_of_value_entries = 0; uint16_t value_16bit = 0; uint16_t value_entry_offset = 0; uint16_t value_entry_offset_index = 0; uint16_t value_entry_size = 0; int encoding = 0; int result = 0; int value_entry_index = 0; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } internal_record = (libesedb_internal_record_t *) record; 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( libesedb_record_get_column_catalog_definition( internal_record, value_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition.", function ); return( -1 ); } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column catalog definition.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_record->values_array, value_entry, (intptr_t **) &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from values array.", function, value_entry ); return( -1 ); } if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d data flags.", function, value_entry ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } if( ( ( data_flags & LIBESEDB_VALUE_FLAG_LONG_VALUE ) != 0 ) || ( ( data_flags & 0x10 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value: %d has data.", function, value_entry ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data( record_value, &value_data, &value_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve value data.", function ); return( -1 ); } if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value data.", function ); return( -1 ); } if( value_data_size > (size_t) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value data size value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value data:\n", function ); libcnotify_print_data( value_data, value_data_size, 0 ); } #endif /* The first 2 bytes contain the offset to the first value * there is an offset for every value * therefore first offset / 2 = the number of value entries */ byte_stream_copy_to_uint16_little_endian( value_data, value_16bit ); value_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value offset: %03" PRIu16 "\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_entry_offset_index, value_16bit, value_16bit & 0x7fff ); } #endif value_entry_offset = value_16bit & 0x7fff; number_of_value_entries = value_entry_offset / 2; if( number_of_value_entries == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value entries.", function ); return( -1 ); } for( value_entry_offset_index = 1; value_entry_offset_index < number_of_value_entries; value_entry_offset_index++ ) { byte_stream_copy_to_uint16_little_endian( &( value_data[ value_data_offset ] ), value_16bit ); value_data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value offset: %03" PRIu16 "\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_entry_offset_index, value_16bit, value_16bit & 0x7fff ); } #endif value_16bit &= 0x7fff; if( value_16bit < value_entry_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value offset: %" PRIu16 " value is smaller than previous.", function, value_entry_offset_index ); return( -1 ); } value_entry_size = value_16bit - value_entry_offset; if( libfvalue_value_append_entry( record_value, &value_entry_index, (size_t) value_entry_offset, (size_t) value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable set value entry: %" PRIu16 ".", function, value_entry_offset_index - 1 ); return( -1 ); } value_entry_offset = value_16bit; } value_entry_size = (uint16_t) value_data_size - value_entry_offset; if( libfvalue_value_append_entry( record_value, &value_entry_index, (size_t) value_entry_offset, (size_t) value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable set value entry: %" PRIu16 ".", function, value_entry_offset_index - 1 ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( libesedb_multi_value_initialize( multi_value, column_catalog_definition, record_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 ); } } return( result ); } libesedb-20240420/libesedb/libesedb_leaf_page_descriptor.h0000644000175000017500000000357714610727250024314 0ustar00lordyestalordyesta/* * Leaf page descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LEAF_PAGE_DESCRIPTOR_H ) #define _LIBESEDB_LEAF_PAGE_DESCRIPTOR_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_leaf_page_descriptor libesedb_leaf_page_descriptor_t; struct libesedb_leaf_page_descriptor { /* The page number */ uint32_t page_number; /* The first leaf value index; */ int first_leaf_value_index; /* The last leaf value index; */ int last_leaf_value_index; }; int libesedb_leaf_page_descriptor_initialize( libesedb_leaf_page_descriptor_t **leaf_page_descriptor, libcerror_error_t **error ); int libesedb_leaf_page_descriptor_free( libesedb_leaf_page_descriptor_t **leaf_page_descriptor, libcerror_error_t **error ); int libesedb_leaf_page_descriptor_compare( libesedb_leaf_page_descriptor_t *first_leaf_page_descriptor, libesedb_leaf_page_descriptor_t *second_leaf_page_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_LEAF_PAGE_DESCRIPTOR_H ) */ libesedb-20240420/libesedb/libesedb_libbfio.h0000644000175000017500000000324714610727250021553 0ustar00lordyestalordyesta/* * The libbfio header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBBFIO_H ) #define _LIBESEDB_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 #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT ) #error Multi-threading support requires libbfio with multi-threading support #endif #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _LIBESEDB_LIBBFIO_H ) */ libesedb-20240420/libesedb/Makefile.am0000644000175000017500000000710014610730510020160 0ustar00lordyestalordyestaAM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_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@ \ @PTHREAD_CPPFLAGS@ \ @LIBESEDB_DLL_EXPORT@ lib_LTLIBRARIES = libesedb.la libesedb_la_SOURCES = \ esedb_file_header.h \ esedb_page.h \ esedb_page_values.h \ libesedb.c \ libesedb_block_descriptor.c libesedb_block_descriptor.h \ libesedb_block_tree.c libesedb_block_tree.h \ libesedb_block_tree_node.c libesedb_block_tree_node.h \ libesedb_catalog.c libesedb_catalog.h \ libesedb_catalog_definition.c libesedb_catalog_definition.h \ libesedb_checksum.c libesedb_checksum.h \ libesedb_codepage.c libesedb_codepage.h \ libesedb_column.c libesedb_column.h \ libesedb_column_type.c libesedb_column_type.h \ libesedb_compression.c libesedb_compression.h \ libesedb_data_definition.c libesedb_data_definition.h \ libesedb_data_segment.c libesedb_data_segment.h \ libesedb_database.c libesedb_database.h \ libesedb_debug.c libesedb_debug.h \ libesedb_definitions.h \ libesedb_error.c libesedb_error.h \ libesedb_extern.h \ libesedb_file.c libesedb_file.h \ libesedb_file_header.c libesedb_file_header.h \ libesedb_i18n.c libesedb_i18n.h \ libesedb_index.c libesedb_index.h \ libesedb_io_handle.c libesedb_io_handle.h \ libesedb_lcid.c libesedb_lcid.h \ libesedb_leaf_page_descriptor.c libesedb_leaf_page_descriptor.h \ libesedb_libbfio.h \ libesedb_libcdata.h \ libesedb_libcerror.h \ libesedb_libclocale.h \ libesedb_libcnotify.h \ libesedb_libfcache.h \ libesedb_libfdata.h \ libesedb_libfvalue.h \ libesedb_libfwnt.h \ libesedb_libuna.h \ libesedb_long_value.c libesedb_long_value.h \ libesedb_multi_value.c libesedb_multi_value.h \ libesedb_notify.c libesedb_notify.h \ libesedb_page.c libesedb_page.h \ libesedb_page_header.c libesedb_page_header.h \ libesedb_page_tree.c libesedb_page_tree.h \ libesedb_page_tree_key.c libesedb_page_tree_key.h \ libesedb_page_tree_value.c libesedb_page_tree_value.h \ libesedb_page_value.c libesedb_page_value.h \ libesedb_record.c libesedb_record.h \ libesedb_record_value.c libesedb_record_value.h \ libesedb_root_page_header.c libesedb_root_page_header.h \ libesedb_space_tree.c libesedb_space_tree.h \ libesedb_space_tree_value.c libesedb_space_tree_value.h \ libesedb_support.c libesedb_support.h \ libesedb_table.c libesedb_table.h \ libesedb_table_definition.c libesedb_table_definition.h \ libesedb_types.h \ libesedb_unused.h \ libesedb_value_data_handle.c libesedb_value_data_handle.h libesedb_la_LIBADD = \ @LIBCERROR_LIBADD@ \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @PTHREAD_LIBADD@ libesedb_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libesedb_definitions.h.in \ libesedb.rc \ libesedb.rc.in DISTCLEANFILES = \ libesedb_definitions.h \ libesedb.rc \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libesedb ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libesedb_la_SOURCES) libesedb-20240420/libesedb/libesedb_libfcache.h0000644000175000017500000000264114610727250022042 0ustar00lordyestalordyesta/* * The libfcache header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBFCACHE_H ) #define _LIBESEDB_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 /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _LIBESEDB_LIBFCACHE_H ) */ libesedb-20240420/libesedb/libesedb_notify.h0000644000175000017500000000307114610727250021450 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_NOTIFY_H ) #define _LIBESEDB_NOTIFY_H #include #include #include #include "libesedb_extern.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBESEDB ) LIBESEDB_EXTERN \ void libesedb_notify_set_verbose( int verbose ); LIBESEDB_EXTERN \ int libesedb_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_NOTIFY_H ) */ libesedb-20240420/libesedb/libesedb_catalog_definition.h0000644000175000017500000001223414610727250023763 0ustar00lordyestalordyesta/* * Catalog definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_CATALOG_DEFINITION_H ) #define _LIBESEDB_CATALOG_DEFINITION_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_catalog_definition libesedb_catalog_definition_t; struct libesedb_catalog_definition { /* The father data page (FDP) object identifier */ uint32_t father_data_page_object_identifier; /* The type */ uint16_t type; /* The identifier */ uint32_t identifier; union { /* The father data page (FDP) number */ uint32_t father_data_page_number; /* The column type */ uint32_t column_type; }; /* The size (or space usage) */ uint32_t size; /* The codepage */ uint32_t codepage; /* The LCMAP flags */ uint32_t lcmap_flags; /* The name */ uint8_t *name; /* The name size */ size_t name_size; #if defined( HAVE_DEBUG_OUTPUT ) /* The name string */ system_character_t *name_string; #endif /* The template name */ uint8_t *template_name; /* The template name size */ size_t template_name_size; /* The default value */ uint8_t *default_value; /* The default value size */ size_t default_value_size; }; int libesedb_catalog_definition_initialize( libesedb_catalog_definition_t **catalog_definition, libcerror_error_t **error ); int libesedb_catalog_definition_free( libesedb_catalog_definition_t **catalog_definition, libcerror_error_t **error ); int libesedb_catalog_definition_read_data( libesedb_catalog_definition_t *catalog_definition, const uint8_t *data, size_t data_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_identifier( libesedb_catalog_definition_t *catalog_definition, uint32_t *identifier, libcerror_error_t **error ); int libesedb_catalog_definition_get_column_type( libesedb_catalog_definition_t *catalog_definition, uint32_t *column_type, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf8_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf8_name( libesedb_catalog_definition_t *catalog_definition, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf16_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf16_name( libesedb_catalog_definition_t *catalog_definition, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf8_template_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf8_template_name( libesedb_catalog_definition_t *catalog_definition, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf16_template_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_get_utf16_template_name( libesedb_catalog_definition_t *catalog_definition, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ); int libesedb_catalog_definition_compare_name( libesedb_catalog_definition_t *catalog_definition, const uint8_t *name, size_t name_size, libcerror_error_t **error ); int libesedb_catalog_definition_compare_name_with_utf8_string( libesedb_catalog_definition_t *catalog_definition, const uint8_t *utf8_string, size_t utf8_string_length, libcerror_error_t **error ); int libesedb_catalog_definition_compare_name_with_utf16_string( libesedb_catalog_definition_t *catalog_definition, const uint16_t *utf16_string, size_t utf16_string_length, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_CATALOG_DEFINITION_H ) */ libesedb-20240420/libesedb/esedb_page.h0000644000175000017500000000623214610727250020367 0ustar00lordyestalordyesta/* * The page definition of an Extensible Storage Engine (ESE) Database File (EDB) * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_PAGE_H ) #define _ESEDB_PAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct esedb_page_header esedb_page_header_t; struct esedb_page_header { /* The XOR checksum * A XOR-32 checksum calcalted over the bytes * from offset 4 to end of the page * with an initial value of 0x89abcdef * * This values was changed in Exchange 2003 SP1 * A XOR-32 checksum calcalted over the bytes * from offset 8 to end of the page * with an initial value of the page number * * Consists of 4 bytes */ uint8_t xor_checksum[ 4 ]; /* The page number * * This values was changed in Exchange 2003 SP1 * to the ECC checksum * * Consists of 4 bytes */ union { uint8_t page_number[ 4 ]; uint8_t ecc_checksum[ 4 ]; }; /* The database last modification time * Consists of 8 bytes * Contains a database time structure */ uint8_t database_modification_time[ 8 ]; /* The previous page number * Consists of 4 bytes */ uint8_t previous_page[ 4 ]; /* The next page number * Consists of 4 bytes */ uint8_t next_page[ 4 ]; /* The father data page (FDP) object identifier * Consists of 4 bytes */ uint8_t father_data_page_object_identifier[ 4 ]; /* The available data size * Consists of 2 bytes */ uint8_t available_data_size[ 2 ]; /* The available uncommitted data size * Consists of 2 bytes */ uint8_t available_uncommitted_data_size[ 2 ]; /* The first available data offset * Consists of 2 bytes */ uint8_t available_data_offset[ 2 ]; /* The first available page tag * Consists of 2 bytes */ uint8_t available_page_tag[ 2 ]; /* The page flags * Consists of 4 bytes */ uint8_t page_flags[ 4 ]; }; typedef struct esedb_extended_page_header esedb_extended_page_header_t; struct esedb_extended_page_header { /* The 1st (extended) checksum * Consists of 8 bytes */ uint8_t checksum1[ 8 ]; /* The 2nd (extended) checksum * Consists of 8 bytes */ uint8_t checksum2[ 8 ]; /* The 3rd (extended) checksum * Consists of 8 bytes */ uint8_t checksum3[ 8 ]; /* The page number * Consists of 8 bytes */ uint8_t page_number[ 8 ]; /* Unknown (empty values) * Consists of 8 bytes */ uint8_t unknown1[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_PAGE_H ) */ libesedb-20240420/libesedb/libesedb_extern.h0000644000175000017500000000255514610727250021453 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_EXTERN_H ) #define _LIBESEDB_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb */ #if !defined( HAVE_LOCAL_LIBESEDB ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBESEDB_EXTERN_VARIABLE extern #else #define LIBESEDB_EXTERN_VARIABLE LIBESEDB_EXTERN #endif #else #define LIBESEDB_EXTERN /* extern */ #define LIBESEDB_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ #endif /* !defined( _LIBESEDB_INTERNAL_EXTERN_H ) */ libesedb-20240420/libesedb/libesedb_libfwnt.h0000644000175000017500000000324714610727250021612 0ustar00lordyestalordyesta/* * The libfwnt header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBFWNT_H ) #define _LIBESEDB_LIBFWNT_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) #include #include #include #include #include #include #include #include #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 /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBESEDB_LIBFWNT_H ) */ libesedb-20240420/libesedb/libesedb_i18n.h0000644000175000017500000000251214610727250020716 0ustar00lordyestalordyesta/* * Internationalization (i18n) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_I18N_H ) #define _LIBESEDB_I18N_H #include #include #if defined( HAVE_LIBINTL_H ) && defined( ENABLE_NLS ) #include #endif #include "libesedb_libcerror.h" /* TODO #include #define _( string ) \ dgettext( "libesedb", string ) */ #define _( string ) \ string #if defined( __cplusplus ) extern "C" { #endif int libesedb_i18n_initialize( libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_I18N_H ) */ libesedb-20240420/libesedb/libesedb_value_data_handle.c0000644000175000017500000001315114610727250023553 0ustar00lordyestalordyesta/* * Value data handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_definitions.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfvalue.h" #include "libesedb_value_data_handle.h" #include "libesedb_unused.h" /* Retrieves the number of value entries * Return if successful or -1 on error */ int libesedb_value_data_handle_read_value_entries( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding LIBESEDB_ATTRIBUTE_UNUSED, uint32_t data_flags, libcerror_error_t **error ) { static char *function = "libesedb_value_data_handle_read_value_entries"; size_t data_offset = 0; uint16_t number_of_value_entry_offsets = 0; uint16_t value_16bit = 0; uint16_t value_entry_offset = 0; uint16_t value_entry_offset_index = 0; uint16_t value_entry_size = 0; int value_entry_index = 0; LIBESEDB_UNREFERENCED_PARAMETER( encoding ) 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 == 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) UINT16_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( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value data:\n", function ); libcnotify_print_data( data, data_size, 0 ); } #endif /* The first 2 bytes contain the offset to the first value * there is an offset for every value * therefore first offset / 2 = the number of value entries */ byte_stream_copy_to_uint16_little_endian( &( data[ data_offset ] ), value_16bit ); data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value offset: %03" PRIu16 "\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_entry_offset_index, value_16bit, value_16bit & 0x7fff ); } #endif value_entry_offset = value_16bit & 0x7fff; number_of_value_entry_offsets = value_entry_offset / 2; if( number_of_value_entry_offsets == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value entries.", function ); return( -1 ); } for( value_entry_offset_index = 1; value_entry_offset_index < number_of_value_entry_offsets; value_entry_offset_index++ ) { byte_stream_copy_to_uint16_little_endian( &( data[ data_offset ] ), value_16bit ); data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: multi value offset: %03" PRIu16 "\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, value_entry_offset_index, value_16bit, value_16bit & 0x7fff ); } #endif value_16bit &= 0x7fff; if( value_16bit < value_entry_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value offset: %" PRIu16 " value is smaller than previous.", function, value_entry_offset_index ); return( -1 ); } value_entry_size = value_16bit - value_entry_offset; if( libfvalue_data_handle_append_value_entry( data_handle, &value_entry_index, (size_t) value_entry_offset, (size_t) value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable append value entry: %" PRIu16 ".", function, value_entry_offset_index - 1 ); return( -1 ); } value_entry_offset = value_16bit; } value_entry_size = (uint16_t) data_size - value_entry_offset; if( libfvalue_data_handle_append_value_entry( data_handle, &value_entry_index, (size_t) value_entry_offset, (size_t) value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable append value entry: %" PRIu16 ".", function, value_entry_offset_index - 1 ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif } return( 1 ); } libesedb-20240420/libesedb/libesedb_page_tree_key.h0000644000175000017500000000401514610727250022742 0ustar00lordyestalordyesta/* * Page tree key functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_TREE_KEY_H ) #define _LIBESEDB_PAGE_TREE_KEY_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page_tree_key libesedb_page_tree_key_t; struct libesedb_page_tree_key { /* The type */ uint8_t type; /* The data */ uint8_t *data; /* The data size */ size_t data_size; }; int libesedb_page_tree_key_initialize( libesedb_page_tree_key_t **page_tree_key, libcerror_error_t **error ); int libesedb_page_tree_key_free( libesedb_page_tree_key_t **page_tree_key, libcerror_error_t **error ); int libesedb_page_tree_key_set_data( libesedb_page_tree_key_t *page_tree_key, const uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_page_tree_key_append_data( libesedb_page_tree_key_t *page_tree_key, const uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_page_tree_key_compare( libesedb_page_tree_key_t *first_page_tree_key, libesedb_page_tree_key_t *second_page_tree_key, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_TREE_KEY_H ) */ libesedb-20240420/libesedb/libesedb_page_value.c0000644000175000017500000000564114610727250022250 0ustar00lordyestalordyesta/* * Page value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_libcerror.h" #include "libesedb_page_value.h" /* Creates a page value * Make sure the value page_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_value_initialize( libesedb_page_value_t **page_value, libcerror_error_t **error ) { static char *function = "libesedb_page_value_initialize"; if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page value.", function ); return( -1 ); } if( *page_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page value value already set.", function ); return( -1 ); } *page_value = memory_allocate_structure( libesedb_page_value_t ); if( *page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page value.", function ); goto on_error; } if( memory_set( *page_value, 0, sizeof( libesedb_page_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page value.", function ); goto on_error; } return( 1 ); on_error: if( *page_value != NULL ) { memory_free( *page_value ); *page_value = NULL; } return( -1 ); } /* Frees a page value * Returns 1 if successful or -1 on error */ int libesedb_page_value_free( libesedb_page_value_t **page_value, libcerror_error_t **error ) { static char *function = "libesedb_page_value_free"; if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page value.", function ); return( -1 ); } if( *page_value != NULL ) { /* The data is referenced and freed elsewhere */ memory_free( *page_value ); *page_value = NULL; } return( 1 ); } libesedb-20240420/libesedb/libesedb_checksum.c0000644000175000017500000003601114610727250021735 0ustar00lordyestalordyesta/* * Checksum functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_checksum.h" #include "libesedb_libcerror.h" /* The largest primary (or scalar) available * supported by a single load and store instruction */ typedef unsigned long int libesedb_aligned_t; /* The ECC-32 mask lookup table */ const uint8_t libesedb_checksum_ecc32_include_lookup_table[ 256 ] = { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }; /* Calculates the little-endian ECC-32 and XOR-32 of a buffer * It uses the initial value to calculate a new XOR-32 * Returns 1 if successful or -1 on error */ int libesedb_checksum_calculate_little_endian_ecc32( uint32_t *ecc_checksum_value, uint32_t *xor_checksum_value, const uint8_t *buffer, size_t size, size_t offset, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libesedb_checksum_calculate_little_endian_ecc32"; size_t buffer_iterator = 0; size_t buffer_alignment = 0; uint32_t bitmask = 0; uint32_t bit_iterator = 0; uint32_t final_bitmask = 0; uint32_t value_32bit = 0; uint32_t xor32_value = 0; uint32_t xor32_vertical_first = 0; uint32_t xor32_vertical_second = 0; uint32_t xor32_vertical_third = 0; uint32_t xor32_vertical_fourth = 0; uint8_t mask_table_index = 0; if( ecc_checksum_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ECC checksum value.", function ); return( -1 ); } if( xor_checksum_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid XOR checksum value.", 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( offset > size ) { 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_alignment = offset % 16; if( ( buffer_alignment % sizeof( uint32_t ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: offset is not 32-bit aligned.", function ); return( -1 ); } *ecc_checksum_value = 0; *xor_checksum_value = initial_value; bitmask = 0xff800000UL; buffer += offset; for( buffer_iterator = offset; buffer_iterator < size; buffer_iterator += 4 ) { byte_stream_copy_to_uint32_little_endian( buffer, value_32bit ); if( buffer_alignment == 0 ) { xor32_vertical_first ^= value_32bit; } else if( buffer_alignment == 4 ) { xor32_vertical_second ^= value_32bit; } else if( buffer_alignment == 8 ) { xor32_vertical_third ^= value_32bit; } else { xor32_vertical_fourth ^= value_32bit; } xor32_value ^= value_32bit; buffer += 4; buffer_alignment += 4; if( buffer_alignment >= 16 ) { mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= bitmask; } bitmask -= 0x007fff80UL; buffer_alignment = 0; xor32_value = 0; } } if( xor32_value != 0 ) { mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= bitmask; } } /* Determine the checksum part of the combination of * the first and second vertical XOR */ xor32_value = xor32_vertical_first; xor32_value ^= xor32_vertical_second; mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= 0x00400000UL; } /* Determine the checksum part of the combination of * the first and third vertical XOR */ xor32_value = xor32_vertical_first; xor32_value ^= xor32_vertical_third; mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= 0x00200000UL; } /* Determine the checksum part of the combination of * the second and fourth vertical XOR */ xor32_value = xor32_vertical_second; xor32_value ^= xor32_vertical_fourth; mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= 0x00000020UL; } /* Determine the checksum part of the combination of * the third and fourth vertical XOR */ xor32_value = xor32_vertical_third; xor32_value ^= xor32_vertical_fourth; mask_table_index = ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); xor32_value >>= 8; mask_table_index ^= ( xor32_value & 0xff ); if( libesedb_checksum_ecc32_include_lookup_table[ mask_table_index ] != 0 ) { *ecc_checksum_value ^= 0x00000040UL; } /* Determine the XOR-32 */ xor32_value = xor32_vertical_first; xor32_value ^= xor32_vertical_second; xor32_value ^= xor32_vertical_third; xor32_value ^= xor32_vertical_fourth; /* Determine the final bitmask */ bitmask = 0xffff0000UL; final_bitmask = 0; for( bit_iterator = 1; bit_iterator != 0; bit_iterator <<= 1 ) { if( ( xor32_value & bit_iterator ) != 0 ) { final_bitmask ^= bitmask; } bitmask -= 0x0000ffffUL; } /* Determine the buffer size bitmask */ if( size < 8192 ) { *ecc_checksum_value &= 0xffffffffUL ^ (uint32_t) ( size << 19 ); } *ecc_checksum_value ^= ( *ecc_checksum_value ^ final_bitmask ) & 0x001f001fUL; *xor_checksum_value ^= xor32_value; return( 1 ); } /* Calculates the little-endian XOR-32 of a buffer * It uses the initial value to calculate a new XOR-32 * Returns 1 if successful or -1 on error */ int libesedb_checksum_calculate_little_endian_xor32( uint32_t *checksum_value, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { libesedb_aligned_t *aligned_buffer_iterator = NULL; uint8_t *buffer_iterator = NULL; static char *function = "libesedb_checksum_calculate_little_endian_xor32"; libesedb_aligned_t value_aligned = 0; uint32_t big_endian_value_32bit = 0; uint32_t safe_checksum_value = 0; uint32_t value_32bit = 0; uint8_t alignment_count = 0; uint8_t alignment_size = 0; uint8_t byte_count = 0; uint8_t byte_order = 0; uint8_t byte_size = 0; if( checksum_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid checksum value.", 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 ); } safe_checksum_value = initial_value; buffer_iterator = (uint8_t *) buffer; /* Only optimize when there is the alignment is a multitude of 32-bit * and for buffers larger than the alignment */ if( ( ( sizeof( libesedb_aligned_t ) % 4 ) == 0 ) && ( size > ( 2 * sizeof( libesedb_aligned_t ) ) ) ) { /* Align the buffer iterator */ alignment_size = (uint8_t) ( (intptr_t) buffer_iterator % sizeof( libesedb_aligned_t ) ); if( alignment_size > 0 ) { byte_size = sizeof( libesedb_aligned_t ) - alignment_size; /* Align the buffer iterator in 4-byte steps */ while( byte_size != 0 ) { value_32bit = 0; byte_count = 1; if( byte_size >= 4 ) { value_32bit |= buffer_iterator[ 3 ]; value_32bit <<= 8; byte_count++; } if( byte_size >= 3 ) { value_32bit |= buffer_iterator[ 2 ]; value_32bit <<= 8; byte_count++; } if( byte_size >= 2 ) { value_32bit |= buffer_iterator[ 1 ]; value_32bit <<= 8; byte_count++; } value_32bit |= buffer_iterator[ 0 ]; buffer_iterator += byte_count; byte_size -= byte_count; safe_checksum_value ^= value_32bit; } size -= byte_count; } aligned_buffer_iterator = (libesedb_aligned_t *) buffer_iterator; if( *buffer_iterator != (uint8_t) ( *aligned_buffer_iterator & 0xff ) ) { byte_order = _BYTE_STREAM_ENDIAN_BIG; } else { byte_order = _BYTE_STREAM_ENDIAN_LITTLE; } /* Calculate the XOR value using the aligned buffer iterator */ while( size > sizeof( libesedb_aligned_t ) ) { value_aligned ^= *aligned_buffer_iterator; aligned_buffer_iterator++; size -= sizeof( libesedb_aligned_t ); } /* Align the aligned XOR value with the 32-bit XOR value */ if( alignment_size > 0 ) { byte_count = ( alignment_size % 4 ) * 8; alignment_count = ( sizeof( libesedb_aligned_t ) - alignment_size ) * 8; if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { /* Shift twice to set unused bytes to 0 */ big_endian_value_32bit = (uint32_t) ( ( value_aligned >> alignment_count ) << byte_count ); /* Change big-endian into little-endian */ value_32bit = ( ( big_endian_value_32bit & 0x000000ffUL ) << 24 ) | ( ( big_endian_value_32bit & 0x0000ff00UL ) << 8 ) | ( ( big_endian_value_32bit >> 8 ) & 0x0000ff00UL ) | ( ( big_endian_value_32bit >> 24 ) & 0x000000ffUL ); /* Strip-off the used part of the aligned value */ value_aligned <<= alignment_count; } else if( byte_order == _BYTE_STREAM_ENDIAN_LITTLE ) { value_32bit = (uint32_t) ( value_aligned << byte_count ); /* Strip-off the used part of the aligned value */ value_aligned >>= alignment_count; } safe_checksum_value ^= value_32bit; } /* Update the 32-bit XOR value with the aligned XOR value */ byte_size = (uint8_t) sizeof( libesedb_aligned_t ); while( byte_size != 0 ) { byte_count = ( ( byte_size / 4 ) - 1 ) * 32; if( byte_order == _BYTE_STREAM_ENDIAN_BIG ) { big_endian_value_32bit = (uint32_t) ( ( value_aligned >> byte_count ) & 0xffffffffUL ); /* Change big-endian into little-endian */ value_32bit = ( ( big_endian_value_32bit & 0x000000ffUL ) << 24 ) | ( ( big_endian_value_32bit & 0x0000ff00UL ) << 8 ) | ( ( big_endian_value_32bit >> 8 ) & 0x0000ff00UL ) | ( ( big_endian_value_32bit >> 24 ) & 0x000000ffUL ); } else if( byte_order == _BYTE_STREAM_ENDIAN_LITTLE ) { value_32bit = (uint32_t) value_aligned; value_aligned >>= byte_count; } byte_size -= 4; safe_checksum_value ^= value_32bit; } /* Re-align the buffer iterator */ buffer_iterator = (uint8_t *) aligned_buffer_iterator; byte_size = 4 - ( alignment_size % 4 ); if( byte_size != 4 ) { value_32bit = buffer_iterator[ 0 ]; value_32bit <<= 8; if( byte_size >= 2 ) { value_32bit |= buffer_iterator[ 1 ]; } value_32bit <<= 8; if( byte_size >= 3 ) { value_32bit |= buffer_iterator[ 2 ]; } value_32bit <<= 8; buffer_iterator += byte_size; size -= byte_size; safe_checksum_value ^= value_32bit; } } while( size > 0 ) { value_32bit = 0; byte_count = 1; if( size >= 4 ) { value_32bit |= buffer_iterator[ 3 ]; value_32bit <<= 8; byte_count++; } if( size >= 3 ) { value_32bit |= buffer_iterator[ 2 ]; value_32bit <<= 8; byte_count++; } if( size >= 2 ) { value_32bit |= buffer_iterator[ 1 ]; value_32bit <<= 8; byte_count++; } value_32bit |= buffer_iterator[ 0 ]; buffer_iterator += byte_count; size -= byte_count; safe_checksum_value ^= value_32bit; } *checksum_value = safe_checksum_value; return( 1 ); } libesedb-20240420/libesedb/libesedb_index.c0000644000175000017500000004403114610727250021243 0ustar00lordyestalordyesta/* * Index functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_data_definition.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_index.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_page_tree_key.h" #include "libesedb_record.h" #include "libesedb_types.h" /* Creates an index * Make sure the value index is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_index_initialize( libesedb_index_t **index, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libesedb_catalog_definition_t *index_catalog_definition, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libfdata_vector_t *long_values_pages_vector, libfcache_cache_t *long_values_pages_cache, libesedb_page_tree_t *table_page_tree, libesedb_page_tree_t *long_values_page_tree, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_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( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( index_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index catalog definition.", function ); return( -1 ); } internal_index = memory_allocate_structure( libesedb_internal_index_t ); if( internal_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( internal_index, 0, sizeof( libesedb_internal_index_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear index.", function ); memory_free( internal_index ); return( -1 ); } /* TODO (template) table definition required ? */ if( libesedb_page_tree_initialize( &( internal_index->index_page_tree ), io_handle, pages_vector, pages_cache, index_catalog_definition->identifier, index_catalog_definition->father_data_page_number, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index page tree.", function ); goto on_error; } internal_index->io_handle = io_handle; internal_index->file_io_handle = file_io_handle; internal_index->table_definition = table_definition; internal_index->template_table_definition = template_table_definition; internal_index->index_catalog_definition = index_catalog_definition; internal_index->pages_vector = pages_vector; internal_index->pages_cache = pages_cache; internal_index->long_values_pages_vector = long_values_pages_vector; internal_index->long_values_pages_cache = long_values_pages_cache; internal_index->table_page_tree = table_page_tree; internal_index->long_values_page_tree = long_values_page_tree; *index = (libesedb_index_t *) internal_index; return( 1 ); on_error: if( internal_index != NULL ) { memory_free( internal_index ); } return( -1 ); } /* Frees an index * Returns 1 if successful or -1 on error */ int libesedb_index_free( libesedb_index_t **index, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_free"; int result = 1; 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 ) { internal_index = (libesedb_internal_index_t *) *index; *index = NULL; /* The io_handle, file_io_handle, table_definition, template_table_definition, * index_catalog_definition, pages_vector, pages_cache, table_page_tree and * long_values_page_tree references are freed elsewhere */ if( libesedb_page_tree_free( &( internal_index->index_page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index page tree.", function ); result = -1; } memory_free( internal_index ); } return( result ); } /* Retrieves the index identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ int libesedb_index_get_identifier( libesedb_index_t *index, uint32_t *identifier, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_identifier"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( libesedb_catalog_definition_get_identifier( internal_index->index_catalog_definition, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_index_get_utf8_name_size( libesedb_index_t *index, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_utf8_string_size"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( internal_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( libesedb_catalog_definition_get_utf8_name_size( internal_index->index_catalog_definition, utf8_string_size, internal_index->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-8 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_index_get_utf8_name( libesedb_index_t *index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_utf8_string"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( internal_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( libesedb_catalog_definition_get_utf8_name( internal_index->index_catalog_definition, utf8_string, utf8_string_size, internal_index->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string of the index name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_index_get_utf16_name_size( libesedb_index_t *index, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_utf16_string_size"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( internal_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( libesedb_catalog_definition_get_utf16_name_size( internal_index->index_catalog_definition, utf16_string_size, internal_index->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-16 encoded string of the index name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_index_get_utf16_name( libesedb_index_t *index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_utf16_string"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( internal_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( libesedb_catalog_definition_get_utf16_name( internal_index->index_catalog_definition, utf16_string, utf16_string_size, internal_index->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of records in the index * Returns 1 if successful or -1 on error */ int libesedb_index_get_number_of_records( libesedb_index_t *index, int *number_of_records, libcerror_error_t **error ) { libesedb_internal_index_t *internal_index = NULL; static char *function = "libesedb_index_get_number_of_records"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( libesedb_page_tree_get_number_of_leaf_values( internal_index->index_page_tree, internal_index->file_io_handle, number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf values from index page tree.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific record * Returns 1 if successful or -1 on error */ int libesedb_index_get_record( libesedb_index_t *index, int record_entry, libesedb_record_t **record, libcerror_error_t **error ) { libesedb_data_definition_t *index_data_definition = NULL; libesedb_data_definition_t *record_data_definition = NULL; libesedb_internal_index_t *internal_index = NULL; libesedb_page_tree_key_t *key = NULL; uint8_t *index_data = NULL; static char *function = "libesedb_index_get_record"; size_t index_data_size = 0; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } internal_index = (libesedb_internal_index_t *) index; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( *record != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid record value already set.", function ); return( -1 ); } if( libesedb_page_tree_get_leaf_value_by_index( internal_index->index_page_tree, internal_index->file_io_handle, record_entry, &index_data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %d from index values tree.", function, record_entry ); goto on_error; } if( libesedb_data_definition_read_data( index_data_definition, internal_index->file_io_handle, internal_index->io_handle, internal_index->pages_vector, internal_index->pages_cache, &index_data, &index_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read index data definition data.", function ); goto on_error; } if( libesedb_data_definition_free( &index_data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index data definition.", function ); goto on_error; } if( libesedb_page_tree_key_initialize( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create key.", function ); goto on_error; } if( libesedb_page_tree_key_set_data( key, index_data, index_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set index data in key.", function ); goto on_error; } key->type = LIBESEDB_KEY_TYPE_INDEX_VALUE; if( libesedb_page_tree_get_leaf_value_by_key( internal_index->table_page_tree, internal_index->file_io_handle, key, &record_data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value by key.", function ); goto on_error; } if( libesedb_page_tree_key_free( &key, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free key.", function ); goto on_error; } if( libesedb_record_initialize( record, internal_index->file_io_handle, internal_index->io_handle, internal_index->table_definition, internal_index->template_table_definition, internal_index->pages_vector, internal_index->pages_cache, internal_index->long_values_pages_vector, internal_index->long_values_pages_cache, record_data_definition, internal_index->long_values_page_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record.", function ); goto on_error; } return( 1 ); on_error: if( record_data_definition != NULL ) { libesedb_data_definition_free( &record_data_definition, NULL ); } if( index_data_definition != NULL ) { libesedb_data_definition_free( &index_data_definition, NULL ); } if( key != NULL ) { libesedb_page_tree_key_free( &key, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_multi_value.h0000644000175000017500000001346614610727250022477 0ustar00lordyestalordyesta/* * Multi value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_MULTI_VALUE_H ) #define _LIBESEDB_MULTI_VALUE_H #include #include #include "libesedb_catalog_definition.h" #include "libesedb_extern.h" #include "libesedb_libcerror.h" #include "libesedb_libfvalue.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_multi_value libesedb_internal_multi_value_t; struct libesedb_internal_multi_value { /* The column catalog definition */ libesedb_catalog_definition_t *column_catalog_definition; /* The record value */ libfvalue_value_t *record_value; }; int libesedb_multi_value_initialize( libesedb_multi_value_t **multi_value, libesedb_catalog_definition_t *column_catalog_definition, libfvalue_value_t *record_value, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_free( libesedb_multi_value_t **multi_value, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_column_type( libesedb_multi_value_t *multi_value, uint32_t *column_type, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_number_of_values( libesedb_multi_value_t *multi_value, int *number_of_values, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ); /* TODO deprecate */ LIBESEDB_EXTERN \ int libesedb_multi_value_get_value( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *column_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_data_size( libesedb_record_t *record, int multi_value_index, size_t *value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_data( libesedb_record_t *record, int multi_value_index, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_8bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *value_8bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_16bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *value_16bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint32_t *value_32bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_64bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_32bit( libesedb_multi_value_t *multi_value, int multi_value_index, float *value_32bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_floating_point_64bit( libesedb_multi_value_t *multi_value, int multi_value_index, double *value_64bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_filetime( libesedb_multi_value_t *multi_value, int multi_value_index, uint64_t *value_filetime, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf8_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_utf16_string( libesedb_multi_value_t *multi_value, int multi_value_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data_size( libesedb_multi_value_t *multi_value, int multi_value_index, size_t *binary_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_multi_value_get_value_binary_data( libesedb_multi_value_t *multi_value, int multi_value_index, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_MULTI_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_libcnotify.h0000644000175000017500000000266014610727250022305 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBCNOTIFY_H ) #define _LIBESEDB_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 /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBESEDB_LIBCNOTIFY_H ) */ libesedb-20240420/libesedb/libesedb_column.c0000644000175000017500000002610214610727250021430 0ustar00lordyestalordyesta/* * Column functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_column.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libcerror.h" #include "libesedb_types.h" /* Creates a column * Make sure the value column is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_column_initialize( libesedb_column_t **column, libesedb_io_handle_t *io_handle, libesedb_catalog_definition_t *catalog_definition, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_initialize"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } if( *column != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid column 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 ); } if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } internal_column = memory_allocate_structure( libesedb_internal_column_t ); if( internal_column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create column.", function ); goto on_error; } if( memory_set( internal_column, 0, sizeof( libesedb_internal_column_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear column.", function ); goto on_error; } internal_column->io_handle = io_handle; internal_column->catalog_definition = catalog_definition; *column = (libesedb_column_t *) internal_column; return( 1 ); on_error: if( internal_column != NULL ) { memory_free( internal_column ); } return( -1 ); } /* Frees a column * Returns 1 if successful or -1 on error */ int libesedb_column_free( libesedb_column_t **column, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_free"; int result = 1; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } if( *column != NULL ) { internal_column = (libesedb_internal_column_t *) *column; *column = NULL; /* The io_handle and catalog_definition references * are freed elsewhere */ memory_free( internal_column ); } return( result ); } /* Retrieves the column identifier * Returns 1 if successful or -1 on error */ int libesedb_column_get_identifier( libesedb_column_t *column, uint32_t *identifier, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_identifier"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( libesedb_catalog_definition_get_identifier( internal_column->catalog_definition, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the column type * Returns 1 if successful or -1 on error */ int libesedb_column_get_type( libesedb_column_t *column, uint32_t *type, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_type"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( libesedb_catalog_definition_get_column_type( internal_column->catalog_definition, type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_column_get_utf8_name_size( libesedb_column_t *column, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_utf8_name_size"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( internal_column->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid column - missing IO handle.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name_size( internal_column->catalog_definition, utf8_string_size, internal_column->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-8 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_column_get_utf8_name( libesedb_column_t *column, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_utf8_name"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( internal_column->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid column - missing IO handle.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name( internal_column->catalog_definition, utf8_string, utf8_string_size, internal_column->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string of the column name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_column_get_utf16_name_size( libesedb_column_t *column, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_utf16_name_size"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( internal_column->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid column - missing IO handle.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name_size( internal_column->catalog_definition, utf16_string_size, internal_column->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-16 encoded string of the column name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_column_get_utf16_name( libesedb_column_t *column, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_column_t *internal_column = NULL; static char *function = "libesedb_column_get_utf16_name"; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } internal_column = (libesedb_internal_column_t *) column; if( internal_column->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid column - missing IO handle.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name( internal_column->catalog_definition, utf16_string, utf16_string_size, internal_column->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_unused.h0000644000175000017500000000260014610727250021440 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_UNUSED_H ) #define _LIBESEDB_UNUSED_H #include #if !defined( LIBESEDB_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBESEDB_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBESEDB_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBESEDB_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBESEDB_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBESEDB_UNUSED_H ) */ libesedb-20240420/libesedb/libesedb.rc.in0000644000175000017500000000213114610727250020636 0ustar00lordyestalordyesta#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 access the Extensible Storage Engine (ESE) Database File (EDB) format\0" VALUE "FileVersion", "@VERSION@" "\0" VALUE "InternalName", "libesedb.dll\0" VALUE "LegalCopyright", "(C) 2009-2024, Joachim Metz \0" VALUE "OriginalFilename", "libesedb.dll\0" VALUE "ProductName", "libesedb\0" VALUE "ProductVersion", "@VERSION@" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libesedb/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libesedb-20240420/libesedb/libesedb_io_handle.c0000644000175000017500000001607614610727250022066 0ustar00lordyestalordyesta/* * Input/Output (IO) handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_checksum.h" #include "libesedb_codepage.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_unused.h" const uint8_t esedb_file_signature[ 4 ] = { 0xef, 0xcd, 0xab, 0x89 }; /* Creates an IO handle * Make sure the value io_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_io_handle_initialize( libesedb_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libesedb_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( libesedb_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( libesedb_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 )->ascii_codepage = LIBESEDB_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 libesedb_io_handle_free( libesedb_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libesedb_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 ) { memory_free( *io_handle ); *io_handle = NULL; } return( result ); } /* Clears the IO handle * Returns 1 if successful or -1 on error */ int libesedb_io_handle_clear( libesedb_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libesedb_io_handle_clear"; 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( memory_set( io_handle, 0, sizeof( libesedb_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear IO handle.", function ); return( -1 ); } io_handle->ascii_codepage = LIBESEDB_CODEPAGE_WINDOWS_1252; return( 1 ); } /* Sets the pages data range * Returns 1 if successful or -1 on error */ int libesedb_io_handle_set_pages_data_range( libesedb_io_handle_t *io_handle, size64_t file_size, libcerror_error_t **error ) { static char *function = "libesedb_io_handle_set_pages_data_range"; 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->page_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing page size.", function ); return( -1 ); } io_handle->file_size = file_size; io_handle->pages_data_offset = (off64_t) ( io_handle->page_size * 2 ); io_handle->pages_data_size = file_size - (size64_t) io_handle->pages_data_offset; io_handle->last_page_number = (uint32_t) ( io_handle->pages_data_size / io_handle->page_size ); return( 1 ); } /* Reads a page * Callback function for the page vector * Returns 1 if successful or -1 on error */ int libesedb_io_handle_read_page( libesedb_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfdata_cache_t *cache, int element_index, int element_file_index LIBESEDB_ATTRIBUTE_UNUSED, off64_t element_offset, size64_t element_size LIBESEDB_ATTRIBUTE_UNUSED, uint32_t element_flags LIBESEDB_ATTRIBUTE_UNUSED, uint8_t read_flags LIBESEDB_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libesedb_page_t *page = NULL; static char *function = "libesedb_io_handle_read_page"; LIBESEDB_UNREFERENCED_PARAMETER( element_file_index ); LIBESEDB_UNREFERENCED_PARAMETER( element_size ); LIBESEDB_UNREFERENCED_PARAMETER( element_flags ); LIBESEDB_UNREFERENCED_PARAMETER( read_flags ); if( libesedb_page_initialize( &page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page.", function ); goto on_error; } if( libesedb_page_read_file_io_handle( page, io_handle, file_io_handle, element_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page.", function ); goto on_error; } if( libfdata_vector_set_element_value_by_index( vector, (intptr_t *) file_io_handle, cache, element_index, (intptr_t *) page, (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_page_free, LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set page as element value.", function ); goto on_error; } return( 1 ); on_error: if( page != NULL ) { libesedb_page_free( &page, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_libfdata.h0000644000175000017500000000301114610727250021700 0ustar00lordyestalordyesta/* * The libfdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBFDATA_H ) #define _LIBESEDB_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 #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 /* defined( HAVE_LOCAL_LIBFDATA ) */ #endif /* !defined( _LIBESEDB_LIBFDATA_H ) */ libesedb-20240420/libesedb/libesedb.c0000644000175000017500000000350014610727250020050 0ustar00lordyestalordyesta/* * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #if defined( WINAPI ) #include #endif #include "libesedb_unused.h" /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb */ #if !defined( HAVE_LOCAL_LIBESEDB ) #if defined( WINAPI ) && defined( HAVE_DLLMAIN ) #if defined( _MANAGED ) #pragma managed( push, off ) #endif /* Defines the entry point for the DLL */ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { LIBESEDB_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 libesedb_is_dll( void ) { return( 1 ); } #endif /* defined( WINAPI ) && defined( HAVE_DLLMAIN ) */ #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ libesedb-20240420/libesedb/libesedb_file.c0000644000175000017500000014035614610727250021062 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "libesedb_catalog.h" #include "libesedb_database.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_i18n.h" #include "libesedb_io_handle.h" #include "libesedb_file.h" #include "libesedb_file_header.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_table.h" #include "libesedb_table_definition.h" /* Creates a file * Make sure the value file is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_file_initialize( libesedb_file_t **file, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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( libesedb_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( libesedb_internal_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); memory_free( internal_file ); return( -1 ); } if( libesedb_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; } if( libesedb_i18n_initialize( error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initalize internationalization (i18n).", function ); goto on_error; } *file = (libesedb_file_t *) internal_file; return( 1 ); on_error: if( internal_file != NULL ) { if( internal_file->io_handle != NULL ) { libesedb_io_handle_free( &( internal_file->io_handle ), NULL ); } memory_free( internal_file ); } return( -1 ); } /* Frees a file * Returns 1 if successful or -1 on error */ int libesedb_file_free( libesedb_file_t **file, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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 = (libesedb_internal_file_t *) *file; if( internal_file->file_io_handle != NULL ) { if( libesedb_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( libesedb_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 a file to abort its current activity * Returns 1 if successful or -1 on error */ int libesedb_file_signal_abort( libesedb_file_t *file, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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 = (libesedb_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 libesedb_file_open( libesedb_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_open"; size_t filename_length = 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 = (libesedb_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( ( ( access_flags & LIBESEDB_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBESEDB_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 & LIBESEDB_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( 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 filename_length = narrow_string_length( filename ); if( libbfio_file_set_name( file_io_handle, filename, filename_length + 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( libesedb_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 libesedb_file_open_wide( libesedb_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_open_wide"; size_t filename_length = 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 = (libesedb_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( ( ( access_flags & LIBESEDB_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBESEDB_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 & LIBESEDB_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( 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 filename_length = wide_string_length( filename ); if( libbfio_file_set_name_wide( file_io_handle, filename, filename_length + 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( libesedb_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 /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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 ); } 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 & LIBESEDB_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBESEDB_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 & LIBESEDB_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 ); } internal_file = (libesedb_internal_file_t *) file; if( ( access_flags & LIBESEDB_ACCESS_FLAG_READ ) != 0 ) { bfio_access_flags = LIBBFIO_ACCESS_FLAG_READ; } 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, 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 ); goto on_error; } internal_file->file_io_handle_opened_in_library = 1; } if( libesedb_file_open_read( internal_file, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file handle.", function ); goto on_error; } internal_file->file_io_handle = file_io_handle; return( 1 ); on_error: if( ( file_io_handle_is_open == 0 ) && ( internal_file->file_io_handle_opened_in_library != 0 ) ) { libbfio_handle_close( file_io_handle, error ); internal_file->file_io_handle_opened_in_library = 0; } return( -1 ); } /* Closes a file * Returns 0 if successful or -1 on error */ int libesedb_file_close( libesedb_file_t *file, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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 = (libesedb_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 defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( internal_file->file_io_handle_created_in_library != 0 ) { if( libesedb_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( internal_file->file_io_handle_opened_in_library != 0 ) { 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; } internal_file->file_io_handle_opened_in_library = 0; } if( internal_file->file_io_handle_created_in_library != 0 ) { 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_created_in_library = 0; } internal_file->file_io_handle = NULL; if( libesedb_io_handle_clear( internal_file->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear IO handle.", function ); result = -1; } if( libfdata_vector_free( &( internal_file->pages_vector ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free pages vector.", function ); result = -1; } if( libfcache_cache_free( &( internal_file->pages_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free pages cache.", function ); result = -1; } if( libesedb_database_free( &( internal_file->database ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free database.", function ); result = -1; } if( libesedb_catalog_free( &( internal_file->catalog ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free catalog.", function ); result = -1; } if( libesedb_catalog_free( &( internal_file->backup_catalog ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free backup catalog.", function ); result = -1; } return( result ); } /* Opens a file for reading * Returns 1 if successful or -1 on error */ int libesedb_file_open_read( libesedb_internal_file_t *internal_file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libesedb_file_header_t *file_header = NULL; static char *function = "libesedb_file_open_read"; size64_t file_size = 0; off64_t file_offset = 0; int result = 0; int segment_index = 0; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } 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->pages_vector != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - pages vector already set.", function ); return( -1 ); } if( internal_file->pages_cache != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - pages cache already set.", function ); return( -1 ); } if( internal_file->database != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - database already set.", function ); return( -1 ); } if( internal_file->catalog != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - catalog already set.", function ); return( -1 ); } if( internal_file->backup_catalog != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - backup catalog already set.", function ); return( -1 ); } internal_file->io_handle->abort = 0; if( libbfio_handle_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 file size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading file header:\n" ); } #endif if( libesedb_file_header_initialize( &file_header, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file header.", function ); goto on_error; } if( libesedb_file_header_read_file_io_handle( file_header, file_io_handle, file_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header.", function ); goto on_error; } internal_file->io_handle->file_type = file_header->file_type; internal_file->io_handle->format_version = file_header->format_version; internal_file->io_handle->format_revision = file_header->format_revision; internal_file->io_handle->page_size = file_header->page_size; internal_file->io_handle->creation_format_version = file_header->creation_format_version; internal_file->io_handle->creation_format_revision = file_header->creation_format_revision; if( libesedb_file_header_free( &file_header, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file header.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading backup file header:\n" ); } #endif if( internal_file->io_handle->page_size != 0 ) { if( libesedb_file_header_initialize( &file_header, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create backup file header.", function ); goto on_error; } result = libesedb_file_header_read_file_io_handle( file_header, file_io_handle, (off64_t) internal_file->io_handle->page_size, error ); if( result != 1 ) { file_offset = 0x0800; while( file_offset <= 0x8000 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); result = libesedb_file_header_read_file_io_handle( file_header, file_io_handle, (off64_t) internal_file->io_handle->page_size, error ); if( result == 1 ) { break; } file_offset <<= 1; } } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read backup file header.", function ); goto on_error; } if( internal_file->io_handle->format_version == 0 ) { internal_file->io_handle->format_version = file_header->format_version; } else if( internal_file->io_handle->format_version != file_header->format_version ) { #if defined( HAVE_VERBOSE_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in format version: 0x%" PRIx32 " and backup: 0x%" PRIx32 "\n", function, internal_file->io_handle->format_version, file_header->format_version ); } #endif } if( internal_file->io_handle->format_revision == 0 ) { internal_file->io_handle->format_revision = file_header->format_revision; } else if( internal_file->io_handle->format_revision != file_header->format_revision ) { #if defined( HAVE_VERBOSE_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in format revision: 0x%" PRIx32 " and backup: 0x%" PRIx32 "\n", function, internal_file->io_handle->format_revision, file_header->format_revision ); } #endif } if( internal_file->io_handle->page_size == 0 ) { internal_file->io_handle->page_size = file_header->page_size; } else if( internal_file->io_handle->page_size != file_header->page_size ) { #if defined( HAVE_VERBOSE_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in page size: 0x%04" PRIx32 " and backup: 0x%04" PRIx32 "\n", function, internal_file->io_handle->page_size, file_header->page_size ); } #endif /* The offset of the backup (database) file header * is a good indication of the actual page size */ internal_file->io_handle->page_size = (uint32_t) file_offset; } if( libesedb_file_header_free( &file_header, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free backup file header.", function ); goto on_error; } } if( internal_file->io_handle->format_version != 0x620 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported format version: 0x%04" PRIx32 ".", function, internal_file->io_handle->format_version ); goto on_error; } if( internal_file->io_handle->page_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page size.", function ); goto on_error; } if( internal_file->io_handle->format_version == 0x620 ) { if( internal_file->io_handle->format_revision < 0x11 ) { if( ( internal_file->io_handle->page_size != 0x1000 ) && ( internal_file->io_handle->page_size != 0x2000 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page size: %" PRIu32 " (0x%04" PRIx32 ") for format version: 0x%" PRIx32 " revision: 0x%" PRIx32 ".", function, internal_file->io_handle->page_size, internal_file->io_handle->page_size, internal_file->io_handle->format_version, internal_file->io_handle->format_revision ); goto on_error; } } else { if( ( internal_file->io_handle->page_size != 0x0800 ) && ( internal_file->io_handle->page_size != 0x1000 ) && ( internal_file->io_handle->page_size != 0x2000 ) && ( internal_file->io_handle->page_size != 0x4000 ) && ( internal_file->io_handle->page_size != 0x8000 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page size: %" PRIu32 " (0x%04" PRIx32 ") for format version: 0x%" PRIx32 " revision: 0x%" PRIx32 ".", function, internal_file->io_handle->page_size, internal_file->io_handle->page_size, internal_file->io_handle->format_version, internal_file->io_handle->format_revision ); goto on_error; } } } if( libesedb_io_handle_set_pages_data_range( internal_file->io_handle, file_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set pages data range in IO handle.", function ); goto on_error; } /* TODO add clone function ? */ if( libfdata_vector_initialize( &( internal_file->pages_vector ), (size64_t) internal_file->io_handle->page_size, (intptr_t *) internal_file->io_handle, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libesedb_io_handle_read_page, NULL, LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create pages vector.", function ); goto on_error; } if( libfdata_vector_append_segment( internal_file->pages_vector, &segment_index, 0, internal_file->io_handle->pages_data_offset, internal_file->io_handle->pages_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append segment to pages vector.", function ); goto on_error; } if( libfcache_cache_initialize( &( internal_file->pages_cache ), LIBESEDB_MAXIMUM_CACHE_ENTRIES_PAGES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create pages cache.", function ); goto on_error; } if( internal_file->io_handle->file_type == LIBESEDB_FILE_TYPE_DATABASE ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading the database:\n" ); } #endif if( libesedb_database_initialize( &( internal_file->database ), internal_file->io_handle, internal_file->pages_vector, internal_file->pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create database.", function ); goto on_error; } if( libesedb_database_read_file_io_handle( internal_file->database, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read database.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading the catalog:\n" ); } #endif if( libesedb_catalog_initialize( &( internal_file->catalog ), internal_file->io_handle, LIBESEDB_PAGE_NUMBER_CATALOG, internal_file->pages_vector, internal_file->pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create catalog.", function ); goto on_error; } if( libesedb_catalog_read_file_io_handle( internal_file->catalog, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read catalog.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading the backup catalog:\n" ); } #endif if( libesedb_catalog_initialize( &( internal_file->backup_catalog ), internal_file->io_handle, LIBESEDB_PAGE_NUMBER_CATALOG_BACKUP, internal_file->pages_vector, internal_file->pages_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create backup catalog.", function ); goto on_error; } if( libesedb_catalog_read_file_io_handle( internal_file->backup_catalog, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read backup catalog.", function ); goto on_error; } /* TODO compare contents of catalogs ? */ } internal_file->io_handle->abort = 0; return( 1 ); on_error: if( internal_file->backup_catalog != NULL ) { libesedb_catalog_free( &( internal_file->backup_catalog ), NULL ); } if( internal_file->catalog != NULL ) { libesedb_catalog_free( &( internal_file->catalog ), NULL ); } if( internal_file->database != NULL ) { libesedb_database_free( &( internal_file->database ), NULL ); } if( internal_file->pages_cache != NULL ) { libfcache_cache_free( &( internal_file->pages_cache ), NULL ); } if( internal_file->pages_vector != NULL ) { libfdata_vector_free( &( internal_file->pages_vector ), NULL ); } if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } internal_file->io_handle->abort = 0; return( -1 ); } /* Retrieves the file type * Returns 1 if successful or -1 on error */ int libesedb_file_get_type( libesedb_file_t *file, uint32_t *type, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_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 = (libesedb_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 file (current) version * Returns 1 if successful or -1 on error */ int libesedb_file_get_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_get_format_version"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libesedb_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( format_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format version.", function ); return( -1 ); } if( format_revision == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format revision.", function ); return( -1 ); } *format_version = internal_file->io_handle->format_version; *format_revision = internal_file->io_handle->format_revision; return( 1 ); } /* Retrieves the file creation format version * Returns 1 if successful or -1 on error */ int libesedb_file_get_creation_format_version( libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_get_creation_format_version"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libesedb_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( format_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format version.", function ); return( -1 ); } if( format_revision == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format revision.", function ); return( -1 ); } *format_version = internal_file->io_handle->creation_format_version; *format_revision = internal_file->io_handle->creation_format_revision; return( 1 ); } /* Retrieves the file page size * Returns 1 if successful or -1 on error */ int libesedb_file_get_page_size( libesedb_file_t *file, uint32_t *page_size, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_get_page_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 = (libesedb_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( page_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page size.", function ); return( -1 ); } *page_size = internal_file->io_handle->page_size; return( 1 ); } /* Retrieves the number of tables * Returns 1 if successful or -1 on error */ int libesedb_file_get_number_of_tables( libesedb_file_t *file, int *number_of_tables, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; static char *function = "libesedb_file_get_number_of_tables"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libesedb_internal_file_t *) file; if( internal_file->catalog == NULL ) { if( number_of_tables == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of tables.", function ); return( -1 ); } *number_of_tables = 0; } else { if( libesedb_catalog_get_number_of_table_definitions( internal_file->catalog, number_of_tables, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of tables.", function ); return( -1 ); } } return( 1 ); } /* Retrieves a specific table * Returns 1 if successful or -1 on error */ int libesedb_file_get_table( libesedb_file_t *file, int table_entry, libesedb_table_t **table, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; libesedb_table_definition_t *table_definition = NULL; libesedb_table_definition_t *template_table_definition = NULL; static char *function = "libesedb_file_get_table"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libesedb_internal_file_t *) file; 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 ); } if( libesedb_catalog_get_table_definition_by_index( internal_file->catalog, table_entry, &table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table definition: %d.", function, table_entry ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table definition - missing table catalog definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition->template_name != NULL ) { if( libesedb_catalog_get_table_definition_by_utf8_name( internal_file->catalog, table_definition->table_catalog_definition->template_name, table_definition->table_catalog_definition->template_name_size, &template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template table definition.", function ); return( -1 ); } } if( libesedb_table_initialize( table, internal_file->file_io_handle, internal_file->io_handle, table_definition, template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table.", function ); return( -1 ); } return( 1 ); } /* Retrieves the table for the UTF-8 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ int libesedb_file_get_table_by_utf8_name( libesedb_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_t **table, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; libesedb_table_definition_t *table_definition = NULL; libesedb_table_definition_t *template_table_definition = NULL; static char *function = "libesedb_file_get_table_by_utf8_name"; 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 = (libesedb_internal_file_t *) file; 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 ); } result = libesedb_catalog_get_table_definition_by_utf8_name( internal_file->catalog, utf8_string, utf8_string_length, &table_definition, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table definition.", function ); return( -1 ); } else if( result != 0 ) { if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table definition - missing table catalog definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition->template_name != NULL ) { if( libesedb_catalog_get_table_definition_by_name( internal_file->catalog, table_definition->table_catalog_definition->template_name, table_definition->table_catalog_definition->template_name_size, &template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template table definition.", function ); return( -1 ); } } if( libesedb_table_initialize( table, internal_file->file_io_handle, internal_file->io_handle, table_definition, template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table.", function ); return( -1 ); } } return( result ); } /* Retrieves the table for the UTF-16 encoded name * Returns 1 if successful, 0 if no table could be found or -1 on error */ int libesedb_file_get_table_by_utf16_name( libesedb_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_t **table, libcerror_error_t **error ) { libesedb_internal_file_t *internal_file = NULL; libesedb_table_definition_t *table_definition = NULL; libesedb_table_definition_t *template_table_definition = NULL; static char *function = "libesedb_file_get_table_by_utf16_name"; 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 = (libesedb_internal_file_t *) file; 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 ); } result = libesedb_catalog_get_table_definition_by_utf16_name( internal_file->catalog, utf16_string, utf16_string_length, &table_definition, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table definition.", function ); return( -1 ); } else if( result != 0 ) { if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table definition - missing table catalog definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition->template_name != NULL ) { if( libesedb_catalog_get_table_definition_by_name( internal_file->catalog, table_definition->table_catalog_definition->template_name, table_definition->table_catalog_definition->template_name_size, &template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve template table definition.", function ); return( -1 ); } } if( libesedb_table_initialize( table, internal_file->file_io_handle, internal_file->io_handle, table_definition, template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table.", function ); return( -1 ); } } return( result ); } libesedb-20240420/libesedb/libesedb_page_header.c0000644000175000017500000003333714610727250022367 0ustar00lordyestalordyesta/* * Page header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_page_header.h" #include "esedb_page.h" /* Creates a page header * Make sure the value page_header is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_header_initialize( libesedb_page_header_t **page_header, libcerror_error_t **error ) { static char *function = "libesedb_page_header_initialize"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( *page_header != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page header value already set.", function ); return( -1 ); } *page_header = memory_allocate_structure( libesedb_page_header_t ); if( *page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page header.", function ); goto on_error; } if( memory_set( *page_header, 0, sizeof( libesedb_page_header_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page header.", function ); goto on_error; } return( 1 ); on_error: if( *page_header != NULL ) { memory_free( *page_header ); *page_header = NULL; } return( -1 ); } /* Frees a page header * Returns 1 if successful or -1 on error */ int libesedb_page_header_free( libesedb_page_header_t **page_header, libcerror_error_t **error ) { static char *function = "libesedb_page_header_free"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( *page_header != NULL ) { memory_free( *page_header ); *page_header = NULL; } return( 1 ); } /* Reads a page header * Returns 1 if successful or -1 on error */ int libesedb_page_header_read_data( libesedb_page_header_t *page_header, libesedb_io_handle_t *io_handle, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_page_header_read_data"; size_t data_offset = 0; size_t minimum_data_size = 0; uint16_t available_data_size = 0; uint8_t has_extended_header = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint64_t value_64bit = 0; uint16_t value_16bit = 0; #endif if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", 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( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } minimum_data_size = sizeof( esedb_page_header_t ); if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) { minimum_data_size += sizeof( esedb_extended_page_header_t ); has_extended_header = 1; } if( ( data_size < minimum_data_size ) || ( 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page header:\n", function ); libcnotify_print_data( data, sizeof( esedb_page_header_t ), LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif byte_stream_copy_to_uint16_little_endian( ( (esedb_page_header_t *) data )->available_data_size, available_data_size ); byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->previous_page, page_header->previous_page_number ); byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->next_page, page_header->next_page_number ); byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->father_data_page_object_identifier, page_header->father_data_page_object_identifier ); byte_stream_copy_to_uint16_little_endian( ( (esedb_page_header_t *) data )->available_page_tag, page_header->available_page_tag ); byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->page_flags, page_header->flags ); /* Make sure to read after the page flags */ if( has_extended_header != 0 ) { /* TODO store checksum into page header */ } else { byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->xor_checksum, page_header->xor32_checksum ); if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_NEW_RECORD_FORMAT ) && ( ( page_header->flags & LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT ) != 0 ) ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->ecc_checksum, page_header->ecc32_checksum ); } else { byte_stream_copy_to_uint32_little_endian( ( (esedb_page_header_t *) data )->page_number, page_header->page_number ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( has_extended_header != 0 ) { /* TODO print checksum from page header */ byte_stream_copy_to_uint64_little_endian( data, value_64bit ); libcnotify_printf( "%s: checksum\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); } else { libcnotify_printf( "%s: XOR checksum\t\t\t\t\t: 0x%08" PRIx32 "\n", function, page_header->xor32_checksum ); if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_NEW_RECORD_FORMAT ) && ( ( page_header->flags & LIBESEDB_PAGE_FLAG_IS_NEW_RECORD_FORMAT ) != 0 ) ) { libcnotify_printf( "%s: ECC checksum\t\t\t\t\t: 0x%08" PRIx32 "\n", function, page_header->ecc32_checksum ); } else { libcnotify_printf( "%s: page number\t\t\t\t\t: %" PRIu32 "\n", function, page_header->page_number ); } } libcnotify_printf( "%s: database modification time:\n", function ); libcnotify_print_data( ( (esedb_page_header_t *) data )->database_modification_time, 8, 0 ); libcnotify_printf( "%s: previous page number\t\t\t\t: %" PRIu32 "\n", function, page_header->previous_page_number ); libcnotify_printf( "%s: next page number\t\t\t\t: %" PRIu32 "\n", function, page_header->next_page_number ); libcnotify_printf( "%s: father data page (FDP) object identifier\t: %" PRIu32 "\n", function, page_header->father_data_page_object_identifier ); libcnotify_printf( "%s: available data size\t\t\t\t: %" PRIu32 "\n", function, available_data_size ); byte_stream_copy_to_uint16_little_endian( ( (esedb_page_header_t *) data )->available_uncommitted_data_size, value_16bit ); libcnotify_printf( "%s: available uncommitted data size\t\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (esedb_page_header_t *) data )->available_data_offset, value_16bit ); libcnotify_printf( "%s: available data offset\t\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: available page tag\t\t\t\t: %" PRIu32 "\n", function, page_header->available_page_tag ); libcnotify_printf( "%s: page flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, page_header->flags ); libesedb_debug_print_page_flags( page_header->flags ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ data_offset = sizeof( esedb_page_header_t ); if( has_extended_header != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: extended page header:\n", function ); libcnotify_print_data( &( data[ data_offset ] ), 40, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { byte_stream_copy_to_uint64_little_endian( ( (esedb_extended_page_header_t *) &( data[ data_offset ] ) )->checksum1, value_64bit ); libcnotify_printf( "%s: checksum1\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (esedb_extended_page_header_t *) &( data[ data_offset ] ) )->checksum2, value_64bit ); libcnotify_printf( "%s: checksum2\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (esedb_extended_page_header_t *) &( data[ data_offset ] ) )->checksum3, value_64bit ); libcnotify_printf( "%s: checksum3\t\t\t\t\t: 0x%08" PRIx64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (esedb_extended_page_header_t *) &( data[ data_offset ] ) )->page_number, value_64bit ); libcnotify_printf( "%s: page number\t\t\t\t\t: %" PRIu64 "\n", function, value_64bit ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ data_offset += sizeof( esedb_extended_page_header_t ); } page_header->data_size = data_offset; return( 1 ); } /* Retrieves the previous page number * Returns 1 if successful or -1 on error */ int libesedb_page_header_get_previous_page_number( libesedb_page_header_t *page_header, uint32_t *previous_page_number, libcerror_error_t **error ) { static char *function = "libesedb_page_header_get_previous_page_number"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( previous_page_number == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid previous page number.", function ); return( -1 ); } *previous_page_number = page_header->previous_page_number; return( 1 ); } /* Retrieves the next page number * Returns 1 if successful or -1 on error */ int libesedb_page_header_get_next_page_number( libesedb_page_header_t *page_header, uint32_t *next_page_number, libcerror_error_t **error ) { static char *function = "libesedb_page_header_get_next_page_number"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( next_page_number == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid next page number.", function ); return( -1 ); } *next_page_number = page_header->next_page_number; return( 1 ); } /* Retrieves the father data page object identifier * Returns 1 if successful or -1 on error */ int libesedb_page_header_get_father_data_page_object_identifier( libesedb_page_header_t *page_header, uint32_t *father_data_page_object_identifier, libcerror_error_t **error ) { static char *function = "libesedb_page_header_get_father_data_page_object_identifier"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( father_data_page_object_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid father data page object identifier.", function ); return( -1 ); } *father_data_page_object_identifier = page_header->father_data_page_object_identifier; return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libesedb_page_header_get_flags( libesedb_page_header_t *page_header, uint32_t *flags, libcerror_error_t **error ) { static char *function = "libesedb_page_header_get_flags"; if( page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page header.", function ); return( -1 ); } if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = page_header->flags; return( 1 ); } libesedb-20240420/libesedb/libesedb_space_tree_value.c0000644000175000017500000001122214610727250023436 0ustar00lordyestalordyesta/* * Space tree value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_space_tree_value.h" /* Creates a space tree value * Make sure the value space_tree_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_space_tree_value_initialize( libesedb_space_tree_value_t **space_tree_value, libcerror_error_t **error ) { static char *function = "libesedb_space_tree_value_initialize"; if( space_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree value.", function ); return( -1 ); } if( *space_tree_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid space tree value value already set.", function ); return( -1 ); } *space_tree_value = memory_allocate_structure( libesedb_space_tree_value_t ); if( *space_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create space tree value.", function ); goto on_error; } if( memory_set( *space_tree_value, 0, sizeof( libesedb_space_tree_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear space tree value.", function ); goto on_error; } return( 1 ); on_error: if( *space_tree_value != NULL ) { memory_free( *space_tree_value ); *space_tree_value = NULL; } return( -1 ); } /* Frees a space tree value * Returns 1 if successful or -1 on error */ int libesedb_space_tree_value_free( libesedb_space_tree_value_t **space_tree_value, libcerror_error_t **error ) { static char *function = "libesedb_space_tree_value_free"; if( space_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree value.", function ); return( -1 ); } if( *space_tree_value != NULL ) { memory_free( *space_tree_value ); *space_tree_value = NULL; } return( 1 ); } /* Reads a space tree value * Returns 1 if successful or -1 on error */ int libesedb_space_tree_value_read_data( libesedb_space_tree_value_t *space_tree_value, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_space_tree_value_read_data"; if( space_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree value.", 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 < 4 ) || ( 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: space tree value:\n", function ); libcnotify_print_data( data, data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif byte_stream_copy_to_uint32_little_endian( data, space_tree_value->number_of_pages ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of pages\t\t\t: %" PRIu32 "\n", function, space_tree_value->number_of_pages ); libcnotify_printf( "\n" ); } #endif return( 1 ); } libesedb-20240420/libesedb/libesedb_compression.h0000644000175000017500000000605314610727250022504 0ustar00lordyestalordyesta/* * Compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_COMPRESSION_H ) #define _LIBESEDB_COMPRESSION_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libesedb_compression_7bit_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_7bit_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_lzxpress_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_lzxpress_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ); int libesedb_compression_get_utf8_string_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *utf8_string_size, libcerror_error_t **error ); int libesedb_compression_copy_to_utf8_string( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libesedb_compression_get_utf16_string_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *utf16_string_size, libcerror_error_t **error ); int libesedb_compression_copy_to_utf16_string( const uint8_t *compressed_data, size_t compressed_data_size, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_COMPRESSION_H ) */ libesedb-20240420/libesedb/libesedb_root_page_header.c0000644000175000017500000001616114610727250023426 0ustar00lordyestalordyesta/* * Root page header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_root_page_header.h" #include "esedb_page_values.h" /* Creates a root page header * Make sure the value root_page_header is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_root_page_header_initialize( libesedb_root_page_header_t **root_page_header, libcerror_error_t **error ) { static char *function = "libesedb_root_page_header_initialize"; if( root_page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root page header.", function ); return( -1 ); } if( *root_page_header != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid root page header value already set.", function ); return( -1 ); } *root_page_header = memory_allocate_structure( libesedb_root_page_header_t ); if( *root_page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create root page header.", function ); goto on_error; } if( memory_set( *root_page_header, 0, sizeof( libesedb_root_page_header_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear root page header.", function ); goto on_error; } return( 1 ); on_error: if( *root_page_header != NULL ) { memory_free( *root_page_header ); *root_page_header = NULL; } return( -1 ); } /* Frees a root page header * Returns 1 if successful or -1 on error */ int libesedb_root_page_header_free( libesedb_root_page_header_t **root_page_header, libcerror_error_t **error ) { static char *function = "libesedb_root_page_header_free"; if( root_page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root page header.", function ); return( -1 ); } if( *root_page_header != NULL ) { /* The data is referenced and freed elsewhere */ memory_free( *root_page_header ); *root_page_header = NULL; } return( 1 ); } /* Reads a root page header * Returns 1 if successful or -1 on error */ int libesedb_root_page_header_read_data( libesedb_root_page_header_t *root_page_header, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "libesedb_root_page_header_read_data"; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( root_page_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root page header.", 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 != sizeof( esedb_root_page_header_t ) ) && ( data_size != sizeof( esedb_extended_root_page_header_t ) ) ) { 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: root page header:\n", function ); libcnotify_print_data( data, data_size, 0 ); } #endif byte_stream_copy_to_uint32_little_endian( ( (esedb_root_page_header_t *) data )->initial_number_of_pages, root_page_header->initial_number_of_pages ); if( data_size == sizeof( esedb_root_page_header_t ) ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_root_page_header_t *) data )->extent_space, root_page_header->extent_space ); byte_stream_copy_to_uint32_little_endian( ( (esedb_root_page_header_t *) data )->space_tree_page_number, root_page_header->space_tree_page_number ); } else if( data_size == sizeof( esedb_extended_root_page_header_t ) ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_extended_root_page_header_t *) data )->extent_space, root_page_header->extent_space ); byte_stream_copy_to_uint32_little_endian( ( (esedb_extended_root_page_header_t *) data )->space_tree_page_number, root_page_header->space_tree_page_number ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: initial number of pages\t\t: %" PRIu32 "\n", function, root_page_header->initial_number_of_pages ); if( data_size == sizeof( esedb_extended_root_page_header_t ) ) { libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%02" PRIx8 "\n", function, ( (esedb_extended_root_page_header_t *) data )->unknown1 ); } byte_stream_copy_to_uint32_little_endian( ( (esedb_root_page_header_t *) data )->parent_father_data_page_number, value_32bit ); libcnotify_printf( "%s: parent FDP number\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "%s: extent space\t\t\t: %" PRIu32 "\n", function, root_page_header->extent_space ); libcnotify_printf( "%s: space tree page number\t\t: %" PRIu32 " (0x%08" PRIx32 ")\n", function, root_page_header->space_tree_page_number, root_page_header->space_tree_page_number ); libcnotify_printf( "%s: primary extent\t\t\t: %" PRIu32 "-%c\n", function, root_page_header->initial_number_of_pages, ( root_page_header->extent_space == 0 ? 's' : 'm' ) ); if( data_size == sizeof( esedb_extended_root_page_header_t ) ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_extended_root_page_header_t *) data )->unknown2, value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (esedb_extended_root_page_header_t *) data )->unknown3, value_32bit ); libcnotify_printf( "%s: unknown3\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( 1 ); } libesedb-20240420/libesedb/libesedb_libuna.h0000644000175000017500000000331014610727250021406 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBUNA_H ) #define _LIBESEDB_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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBESEDB_LIBUNA_H ) */ libesedb-20240420/libesedb/libesedb_index.h0000644000175000017500000001020114610727250021240 0ustar00lordyestalordyesta/* * Index functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INDEX_H ) #define _LIBESEDB_INDEX_H #include #include #include "libesedb_catalog_definition.h" #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_table_definition.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_index libesedb_internal_index_t; struct libesedb_internal_index { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The IO handle */ libesedb_io_handle_t *io_handle; /* The table definition */ libesedb_table_definition_t *table_definition; /* The template table definition */ libesedb_table_definition_t *template_table_definition; /* The index catalog definition */ libesedb_catalog_definition_t *index_catalog_definition; /* The pages vector */ libfdata_vector_t *pages_vector; /* The pages cache */ libfcache_cache_t *pages_cache; /* The long values pages vector */ libfdata_vector_t *long_values_pages_vector; /* The long values pages cache */ libfcache_cache_t *long_values_pages_cache; /* The table page tree */ libesedb_page_tree_t *table_page_tree; /* The long values page tree */ libesedb_page_tree_t *long_values_page_tree; /* The index page tree */ libesedb_page_tree_t *index_page_tree; }; int libesedb_index_initialize( libesedb_index_t **index, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libesedb_catalog_definition_t *index_catalog_definition, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libfdata_vector_t *long_values_pages_vector, libfcache_cache_t *long_values_pages_cache, libesedb_page_tree_t *table_page_tree, libesedb_page_tree_t *long_values_page_tree, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_free( libesedb_index_t **index, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_identifier( libesedb_index_t *index, uint32_t *identifier, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name_size( libesedb_index_t *index, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_utf8_name( libesedb_index_t *index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name_size( libesedb_index_t *index, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_utf16_name( libesedb_index_t *index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_number_of_records( libesedb_index_t *index, int *number_of_records, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_index_get_record( libesedb_index_t *index, int record_entry, libesedb_record_t **record, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_INDEX_H ) */ libesedb-20240420/libesedb/libesedb_record.h0000644000175000017500000002126314610727250021421 0ustar00lordyestalordyesta/* * Record (row) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_RECORD_H ) #define _LIBESEDB_RECORD_H #include #include #include "libesedb_data_definition.h" #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_table_definition.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_record libesedb_internal_record_t; struct libesedb_internal_record { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The IO handle */ libesedb_io_handle_t *io_handle; /* The table definition */ libesedb_table_definition_t *table_definition; /* The template table definition */ libesedb_table_definition_t *template_table_definition; /* The pages vector */ libfdata_vector_t *pages_vector; /* The pages cache */ libfcache_cache_t *pages_cache; /* The long values pages vector */ libfdata_vector_t *long_values_pages_vector; /* The long values pages cache */ libfcache_cache_t *long_values_pages_cache; /* The data definition */ libesedb_data_definition_t *data_definition; /* The long values page tree */ libesedb_page_tree_t *long_values_page_tree; /* The values array */ libcdata_array_t *values_array; /* The (record) flags */ uint8_t flags; }; int libesedb_record_initialize( libesedb_record_t **record, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libfdata_vector_t *long_values_pages_vector, libfcache_cache_t *long_values_pages_cache, libesedb_data_definition_t *data_definition, libesedb_page_tree_t *long_values_page_tree, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_free( libesedb_record_t **record, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_number_of_values( libesedb_record_t *record, int *number_of_values, libcerror_error_t **error ); int libesedb_record_get_column_catalog_definition( libesedb_internal_record_t *internal_record, int value_entry, libesedb_catalog_definition_t **column_catalog_definition, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_column_identifier( libesedb_record_t *record, int value_entry, uint32_t *column_identifier, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_column_type( libesedb_record_t *record, int value_entry, uint32_t *column_type, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_utf8_column_name( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_utf16_column_name( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* TODO deprecate */ LIBESEDB_EXTERN \ int libesedb_record_get_value( libesedb_record_t *record, int value_entry, uint8_t **value_data, size_t *value_data_size, uint8_t *value_flags, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_data_size( libesedb_record_t *record, int value_entry, size_t *value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_data( libesedb_record_t *record, int value_entry, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_data_flags( libesedb_record_t *record, int value_entry, uint8_t *value_data_flags, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_boolean( libesedb_record_t *record, int value_entry, uint8_t *value_boolean, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_8bit( libesedb_record_t *record, int value_entry, uint8_t *value_8bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_16bit( libesedb_record_t *record, int value_entry, uint16_t *value_16bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_32bit( libesedb_record_t *record, int value_entry, uint32_t *value_32bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_64bit( libesedb_record_t *record, int value_entry, uint64_t *value_64bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_filetime( libesedb_record_t *record, int value_entry, uint64_t *value_filetime, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_32bit( libesedb_record_t *record, int value_entry, float *value_floating_point_32bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_floating_point_64bit( libesedb_record_t *record, int value_entry, double *value_floating_point_64bit, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string_size( libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_utf8_string( libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string_size( libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_utf16_string( libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data_size( libesedb_record_t *record, int value_entry, size_t *binary_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_value_binary_data( libesedb_record_t *record, int value_entry, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_is_long_value( libesedb_record_t *record, int value_entry, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_is_multi_value( libesedb_record_t *record, int value_entry, libcerror_error_t **error ); int libesedb_record_get_long_value_data_segments_list( libesedb_internal_record_t *internal_record, const uint8_t *long_value_key, size_t long_value_key_size, libfdata_list_t **data_segments_list, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_long_value( libesedb_record_t *record, int value_entry, libesedb_long_value_t **long_value, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_record_get_multi_value( libesedb_record_t *record, int value_entry, libesedb_multi_value_t **multi_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_RECORD_H ) */ libesedb-20240420/libesedb/libesedb_table_definition.h0000644000175000017500000000740714610727250023446 0ustar00lordyestalordyesta/* * Table definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_TABLE_DEFINITION_H ) #define _LIBESEDB_TABLE_DEFINITION_H #include #include #include "libesedb_catalog_definition.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_table_definition libesedb_table_definition_t; struct libesedb_table_definition { /* The table catalog definition */ libesedb_catalog_definition_t *table_catalog_definition; /* The long value catalog definition */ libesedb_catalog_definition_t *long_value_catalog_definition; /* The callback catalog definition */ libesedb_catalog_definition_t *callback_catalog_definition; /* The column catalog definition array */ libcdata_array_t *column_catalog_definition_array; /* The index catalog definition array */ libcdata_array_t *index_catalog_definition_array; }; int libesedb_table_definition_initialize( libesedb_table_definition_t **table_definition, libesedb_catalog_definition_t *table_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_free( libesedb_table_definition_t **table_definition, libcerror_error_t **error ); int libesedb_table_definition_set_long_value_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *long_value_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_set_callback_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *callback_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_get_number_of_column_catalog_definitions( libesedb_table_definition_t *table_definition, int *number_of_definitions, libcerror_error_t **error ); int libesedb_table_definition_get_column_catalog_definition_by_index( libesedb_table_definition_t *table_definition, int definition_index, libesedb_catalog_definition_t **column_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_append_column_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *column_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_get_number_of_index_catalog_definitions( libesedb_table_definition_t *table_definition, int *number_of_definitions, libcerror_error_t **error ); int libesedb_table_definition_get_index_catalog_definition_by_index( libesedb_table_definition_t *table_definition, int definition_index, libesedb_catalog_definition_t **index_catalog_definition, libcerror_error_t **error ); int libesedb_table_definition_append_index_catalog_definition( libesedb_table_definition_t *table_definition, libesedb_catalog_definition_t *index_catalog_definition, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_TABLE_DEFINITION_H ) */ libesedb-20240420/libesedb/libesedb_long_value.h0000644000175000017500000001002614610727250022271 0ustar00lordyestalordyesta/* * Long value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LONG_VALUE_H ) #define _LIBESEDB_LONG_VALUE_H #include #include #include "libesedb_catalog_definition.h" #include "libesedb_extern.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_libfvalue.h" #include "libesedb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_internal_long_value libesedb_internal_long_value_t; struct libesedb_internal_long_value { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The IO handle */ libesedb_io_handle_t *io_handle; /* The column catalog definition */ libesedb_catalog_definition_t *column_catalog_definition; /* The data segments list */ libfdata_list_t *data_segments_list; /* The data segments cache */ libfcache_cache_t *data_segments_cache; /* The record value */ libfvalue_value_t *record_value; }; int libesedb_long_value_initialize( libesedb_long_value_t **long_value, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_catalog_definition_t *column_catalog_definition, libfdata_list_t *data_segments_list, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_free( libesedb_long_value_t **long_value, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_data_size( libesedb_long_value_t *long_value, size64_t *data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_data( libesedb_long_value_t *long_value, uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_long_value_get_record_value( libesedb_internal_long_value_t *internal_long_value, libfvalue_value_t **record_value, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_number_of_data_segments( libesedb_long_value_t *long_value, int *number_of_data_segments, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment_size( libesedb_long_value_t *long_value, int data_segment_index, size_t *data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_data_segment( libesedb_long_value_t *long_value, int data_segment_index, uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string_size( libesedb_long_value_t *long_value, size_t *utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_utf8_string( libesedb_long_value_t *long_value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string_size( libesedb_long_value_t *long_value, size_t *utf16_string_size, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_long_value_get_utf16_string( libesedb_long_value_t *long_value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_LONG_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_data_segment.h0000644000175000017500000000432714610727250022600 0ustar00lordyestalordyesta/* * Data segment functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DATA_SEGMENT_H ) #define _LIBESEDB_DATA_SEGMENT_H #include #include #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_data_segment libesedb_data_segment_t; struct libesedb_data_segment { /* The (segment) data */ uint8_t *data; /* The (segment) data size */ size_t data_size; }; int libesedb_data_segment_initialize( libesedb_data_segment_t **data_segment, size_t data_size, libcerror_error_t **error ); int libesedb_data_segment_free( libesedb_data_segment_t **data_segment, libcerror_error_t **error ); int libesedb_data_segment_get_data_size( libesedb_data_segment_t *data_segment, size_t *data_size, libcerror_error_t **error ); int libesedb_data_segment_get_data( libesedb_data_segment_t *data_segment, uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_data_segment_read_element_data( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *element, libfdata_cache_t *cache, int element_file_index, off64_t element_offset, size64_t element_size, uint32_t element_flags, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_DATA_SEGMENT_H ) */ libesedb-20240420/libesedb/libesedb_catalog.c0000644000175000017500000010015014610727250021541 0ustar00lordyestalordyesta/* * Catalog functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_block_descriptor.h" #include "libesedb_block_tree.h" #include "libesedb_data_definition.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_catalog.h" #include "libesedb_catalog_definition.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_libuna.h" #include "libesedb_page_tree.h" #include "libesedb_table_definition.h" /* Creates a catalog * Make sure the value catalog is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_catalog_initialize( libesedb_catalog_t **catalog, libesedb_io_handle_t *io_handle, uint32_t root_page_number, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ) { static char *function = "libesedb_catalog_initialize"; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( *catalog != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid catalog 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 ); } *catalog = memory_allocate_structure( libesedb_catalog_t ); if( *catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create catalog.", function ); goto on_error; } if( memory_set( *catalog, 0, sizeof( libesedb_catalog_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear catalog.", function ); memory_free( *catalog ); *catalog = NULL; return( -1 ); } if( libesedb_page_tree_initialize( &( ( *catalog )->page_tree ), io_handle, pages_vector, pages_cache, LIBESEDB_FDP_OBJECT_IDENTIFIER_CATALOG, root_page_number, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree.", function ); goto on_error; } if( libesedb_block_tree_initialize( &( ( *catalog )->page_block_tree ), io_handle->file_size, io_handle->page_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page block tree.", function ); goto on_error; } if( libcdata_array_initialize( &( ( *catalog )->table_definition_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table definition array.", function ); goto on_error; } return( 1 ); on_error: if( *catalog != NULL ) { if( ( *catalog )->page_block_tree != NULL ) { libesedb_block_tree_free( &( ( *catalog )->page_block_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_block_descriptor_free, NULL ); } if( ( *catalog )->page_tree != NULL ) { libesedb_page_tree_free( &( ( *catalog )->page_tree ), NULL ); } memory_free( *catalog ); *catalog = NULL; } return( -1 ); } /* Frees a catalog * Returns 1 if successful or -1 on error */ int libesedb_catalog_free( libesedb_catalog_t **catalog, libcerror_error_t **error ) { static char *function = "libesedb_catalog_free"; int result = 1; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( *catalog != NULL ) { if( libesedb_page_tree_free( &( ( *catalog )->page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free catalog page tree.", function ); result = -1; } if( libesedb_block_tree_free( &( ( *catalog )->page_block_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_block_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page block tree.", function ); result = -1; } if( libcdata_array_free( &( ( *catalog )->table_definition_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_table_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table definition array.", function ); result = -1; } memory_free( *catalog ); *catalog = NULL; } return( result ); } /* Reads a catalog value * Returns 1 if successful or -1 on error */ int libesedb_catalog_read_value_data( libesedb_catalog_t *catalog, const uint8_t *data, size_t data_size, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { libesedb_catalog_definition_t *catalog_definition = NULL; static char *function = "libesedb_catalog_read_value_data"; int entry_index = 0; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( catalog->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog - missing page tree.", function ); return( -1 ); } if( catalog->page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog - invalid page tree - missing IO handle.", function ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_initialize( &catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create catalog definition.", function ); goto on_error; } if( libesedb_catalog_definition_read_data( catalog_definition, data, data_size, catalog->page_tree->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read catalog definition.", function ); goto on_error; } if( ( catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE ) && ( *table_definition == NULL ) ) { /* TODO add build-in table 1 support */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing table definition for catalog definition type: %" PRIu16 ".\n", function, catalog_definition->type ); } #endif if( libesedb_catalog_definition_free( &catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free catalog definition.", function ); goto on_error; } catalog_definition = NULL; } else switch( catalog_definition->type ) { case LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE: *table_definition = NULL; if( libesedb_table_definition_initialize( table_definition, catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table definition.", function ); libesedb_table_definition_free( table_definition, NULL ); goto on_error; } catalog_definition = NULL; if( libcdata_array_append_entry( catalog->table_definition_array, &entry_index, (intptr_t *) *table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append table definition to table definition array.", function ); libesedb_table_definition_free( table_definition, NULL ); goto on_error; } break; case LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN: if( libesedb_table_definition_append_column_catalog_definition( *table_definition, catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append column catalog definition to table definition.", function ); goto on_error; } catalog_definition = NULL; break; case LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX: if( libesedb_table_definition_append_index_catalog_definition( *table_definition, catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append index catalog definition to table definition.", function ); goto on_error; } catalog_definition = NULL; break; case LIBESEDB_CATALOG_DEFINITION_TYPE_LONG_VALUE: if( libesedb_table_definition_set_long_value_catalog_definition( *table_definition, catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set long value catalog definition in table definition.", function ); goto on_error; } catalog_definition = NULL; break; case LIBESEDB_CATALOG_DEFINITION_TYPE_CALLBACK: if( libesedb_table_definition_set_callback_catalog_definition( *table_definition, catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set callback catalog definition in table definition.", function ); goto on_error; } catalog_definition = NULL; break; default: #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unsupported catalog definition type: %" PRIu16 ".\n", function, catalog_definition->type ); } #endif if( libesedb_catalog_definition_free( &catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free catalog definition.", function ); goto on_error; } catalog_definition = NULL; break; } return( 1 ); on_error: if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } return( -1 ); } /* Reads the catalog values from a leaf page * Returns 1 if successful or -1 on error */ int libesedb_catalog_read_values_from_leaf_page( libesedb_catalog_t *catalog, libesedb_page_t *page, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_catalog_read_values_from_leaf_page"; uint32_t page_flags = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page - not a leaf page.", function ); goto on_error; } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { continue; } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( libesedb_catalog_read_value_data( catalog, page_tree_value->data, page_tree_value->data_size, table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read catalog value.", function ); goto on_error; } if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } } return( 1 ); on_error: if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } return( -1 ); } /* Reads the catalog * Returns 1 if successful or -1 on error */ int libesedb_catalog_read_file_io_handle( libesedb_catalog_t *catalog, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libesedb_page_t *page = NULL; libesedb_table_definition_t *table_definition = NULL; static char *function = "libesedb_catalog_read_file_io_handle"; off64_t page_offset = 0; uint32_t leaf_page_number = 0; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( catalog->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog - missing page tree.", function ); return( -1 ); } if( catalog->page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog - invalid page tree - missing IO handle.", function ); return( -1 ); } if( libesedb_page_tree_get_get_first_leaf_page_number( catalog->page_tree, file_io_handle, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf page number from page tree.", function ); return( -1 ); } while( leaf_page_number != 0 ) { page_offset = ( leaf_page_number + 1 ) * catalog->page_tree->io_handle->page_size; if( libesedb_page_tree_check_if_page_block_first_read( catalog->page_tree, catalog->page_block_tree, leaf_page_number, page_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to check if first read of page number: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } #if ( SIZEOF_INT <= 4 ) if( leaf_page_number > (uint32_t) INT_MAX ) #else if( leaf_page_number > (unsigned int) INT_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf page number value out of bounds.", function ); return( -1 ); } if( libfdata_vector_get_element_value_by_index( catalog->page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) catalog->page_tree->pages_cache, (int) leaf_page_number - 1, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } if( libesedb_catalog_read_values_from_leaf_page( catalog, page, &table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read values from page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } if( libesedb_page_get_next_page_number( page, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number from page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } } return( 1 ); } /* Retrieves the number of table definitions * Returns 1 if successful or -1 on error */ int libesedb_catalog_get_number_of_table_definitions( libesedb_catalog_t *catalog, int *number_of_table_definitions, libcerror_error_t **error ) { static char *function = "libesedb_catalog_get_number_of_table_definitions"; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( libcdata_array_get_number_of_entries( catalog->table_definition_array, number_of_table_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from table definition array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the table definition for the specific index * Returns 1 if successful or -1 on error */ int libesedb_catalog_get_table_definition_by_index( libesedb_catalog_t *catalog, int table_definition_index, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { static char *function = "libesedb_catalog_get_table_definition_by_index"; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( catalog->table_definition_array, table_definition_index, (intptr_t **) table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from table definition array.", function, table_definition_index ); return( -1 ); } return( 1 ); } /* Retrieves the table definition for the specific name * Returns 1 if successful, 0 if no corresponding table definition was found or -1 on error */ int libesedb_catalog_get_table_definition_by_name( libesedb_catalog_t *catalog, const uint8_t *table_name, size_t table_name_size, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { libesedb_table_definition_t *safe_table_definition = NULL; static char *function = "libesedb_catalog_get_table_definition_by_name"; int entry_index = 0; int number_of_entries = 0; int result = 0; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", 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_size == 0 ) || ( table_name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid table name size value exceeds maximum.", function ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } *table_definition = NULL; if( libcdata_array_get_number_of_entries( catalog->table_definition_array, &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 in table definition array.", function ); return( -1 ); } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libcdata_array_get_entry_by_index( catalog->table_definition_array, entry_index, (intptr_t **) &safe_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from table definition array.", function, entry_index ); return( -1 ); } if( safe_table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition: %d.", function, entry_index ); return( -1 ); } result = libesedb_catalog_definition_compare_name( safe_table_definition->table_catalog_definition, table_name, table_name_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to compare table name with table catalog definition: %d name.", function, entry_index ); return( -1 ); } else if( result == 1 ) { break; } } if( result != 0 ) { *table_definition = safe_table_definition; } return( result ); } /* Retrieves the table definition for the specific UTF-8 encoded name * Returns 1 if successful, 0 if no corresponding table definition was found or -1 on error */ int libesedb_catalog_get_table_definition_by_utf8_name( libesedb_catalog_t *catalog, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { libesedb_table_definition_t *safe_table_definition = NULL; static char *function = "libesedb_catalog_get_table_definition_by_utf8_name"; int entry_index = 0; int number_of_entries = 0; int result = LIBUNA_COMPARE_GREATER; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", 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_length == 0 ) || ( 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 length value exceeds maximum.", function ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } *table_definition = NULL; if( libcdata_array_get_number_of_entries( catalog->table_definition_array, &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 in table definition array.", function ); return( -1 ); } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libcdata_array_get_entry_by_index( catalog->table_definition_array, entry_index, (intptr_t **) &safe_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from table definition array.", function, entry_index ); return( -1 ); } if( safe_table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition: %d.", function, entry_index ); return( -1 ); } result = libesedb_catalog_definition_compare_name_with_utf8_string( safe_table_definition->table_catalog_definition, utf8_string, utf8_string_length, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to compare UTF-8 string with table catalog definition: %d name.", function, entry_index ); return( -1 ); } else if( result == LIBUNA_COMPARE_EQUAL ) { break; } } if( result == LIBUNA_COMPARE_EQUAL ) { *table_definition = safe_table_definition; return( 1 ); } return( 0 ); } /* Retrieves the table definition for the specific UTF-16 encoded name * Returns 1 if successful, 0 if no corresponding table definition was found or -1 on error */ int libesedb_catalog_get_table_definition_by_utf16_name( libesedb_catalog_t *catalog, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_definition_t **table_definition, libcerror_error_t **error ) { libesedb_table_definition_t *safe_table_definition = NULL; static char *function = "libesedb_catalog_get_table_definition_by_utf16_name"; int entry_index = 0; int number_of_entries = 0; int result = LIBUNA_COMPARE_GREATER; if( catalog == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog.", 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_length == 0 ) || ( 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 length value exceeds maximum.", function ); return( -1 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } *table_definition = NULL; if( libcdata_array_get_number_of_entries( catalog->table_definition_array, &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 in table definition array.", function ); return( -1 ); } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libcdata_array_get_entry_by_index( catalog->table_definition_array, entry_index, (intptr_t **) &safe_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from table definition array.", function, entry_index ); return( -1 ); } if( safe_table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table definition: %d.", function, entry_index ); return( -1 ); } result = libesedb_catalog_definition_compare_name_with_utf16_string( safe_table_definition->table_catalog_definition, utf16_string, utf16_string_length, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to compare UTF-16 string with table catalog definition: %d name.", function, entry_index ); return( -1 ); } else if( result == LIBUNA_COMPARE_EQUAL ) { break; } } if( result == LIBUNA_COMPARE_EQUAL ) { *table_definition = safe_table_definition; return( 1 ); } return( 0 ); } libesedb-20240420/libesedb/libesedb_record_value.c0000644000175000017500000002706214610727250022613 0ustar00lordyestalordyesta/* * Record value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libesedb_compression.h" #include "libesedb_definitions.h" #include "libesedb_record_value.h" /* Retrieves the size of an UTF-8 string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_value_get_utf8_string_size( libfvalue_value_t *record_value, size_t *utf8_string_size, libcerror_error_t **error ) { uint8_t *entry_data = NULL; static char *function = "libesedb_record_value_get_utf8_string_size"; size_t entry_data_size = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if record value has data.", function ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data flags.", function ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_get_utf8_string_size( entry_data, entry_data_size, utf8_string_size, error ); } else { result = libfvalue_value_get_utf8_string_size( record_value, 0, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve UTF-8 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-8 encoded string * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_value_get_utf8_string( libfvalue_value_t *record_value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { uint8_t *entry_data = NULL; static char *function = "libesedb_record_value_get_utf8_string"; size_t entry_data_size = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if record value has data.", function ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data flags.", function ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_copy_to_utf8_string( entry_data, entry_data_size, utf8_string, utf8_string_size, error ); } else { result = libfvalue_value_copy_to_utf8_string( record_value, 0, utf8_string, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to UTF-8 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the size of an UTF-16 string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_value_get_utf16_string_size( libfvalue_value_t *record_value, size_t *utf16_string_size, libcerror_error_t **error ) { uint8_t *entry_data = NULL; static char *function = "libesedb_record_value_get_utf16_string_size"; size_t entry_data_size = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if record value has data.", function ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data flags.", function ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_get_utf16_string_size( entry_data, entry_data_size, utf16_string_size, error ); } else { result = libfvalue_value_get_utf16_string_size( record_value, 0, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve UTF-16 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 encoded string * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_record_value_get_utf16_string( libfvalue_value_t *record_value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { uint8_t *entry_data = NULL; static char *function = "libesedb_record_value_get_utf16_string"; size_t entry_data_size = 0; uint32_t data_flags = 0; int encoding = 0; int result = 0; if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } result = libfvalue_value_has_data( record_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if record value has data.", function ); return( -1 ); } else if( result != 0 ) { if( libfvalue_value_get_data_flags( record_value, &data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data flags.", function ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_MULTI_VALUE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported data flags: 0x%02" PRIx32 ".", function, data_flags ); return( -1 ); } if( ( data_flags & LIBESEDB_VALUE_FLAG_COMPRESSED ) != 0 ) { if( libfvalue_value_get_entry_data( record_value, 0, &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 record value entry data.", function ); return( -1 ); } result = libesedb_compression_copy_to_utf16_string( entry_data, entry_data_size, utf16_string, utf16_string_size, error ); } else { result = libfvalue_value_copy_to_utf16_string( record_value, 0, utf16_string, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value to UTF-16 string.", function ); return( -1 ); } } return( result ); } libesedb-20240420/libesedb/libesedb_table.c0000644000175000017500000011352214610727250021225 0ustar00lordyestalordyesta/* * Table functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_column.h" #include "libesedb_data_definition.h" #include "libesedb_definitions.h" #include "libesedb_index.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #include "libesedb_record.h" #include "libesedb_table.h" #include "libesedb_table_definition.h" #include "libesedb_types.h" /* Creates a table * Make sure the value table is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_table_initialize( libesedb_table_t **table, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_initialize"; int segment_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 != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table 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 ); } if( table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( table_definition->table_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table definition - missing table catalog definition.", function ); return( -1 ); } internal_table = memory_allocate_structure( libesedb_internal_table_t ); if( internal_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( internal_table, 0, sizeof( libesedb_internal_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table.", function ); memory_free( internal_table ); return( -1 ); } /* TODO add clone function ? */ if( libfdata_vector_initialize( &( internal_table->pages_vector ), (size64_t) io_handle->page_size, (intptr_t *) io_handle, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libesedb_io_handle_read_page, NULL, LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create pages vector.", function ); goto on_error; } if( libfdata_vector_append_segment( internal_table->pages_vector, &segment_index, 0, io_handle->pages_data_offset, io_handle->pages_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append segment to pages vector.", function ); goto on_error; } if( libfcache_cache_initialize( &( internal_table->pages_cache ), LIBESEDB_MAXIMUM_CACHE_ENTRIES_PAGES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create pages cache.", function ); goto on_error; } if( libesedb_page_tree_initialize( &( internal_table->table_page_tree ), io_handle, internal_table->pages_vector, internal_table->pages_cache, table_definition->table_catalog_definition->identifier, table_definition->table_catalog_definition->father_data_page_number, table_definition, template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table page tree.", function ); goto on_error; } if( table_definition->long_value_catalog_definition != NULL ) { /* TODO add clone function ? */ if( libfdata_vector_initialize( &( internal_table->long_values_pages_vector ), (size64_t) io_handle->page_size, (intptr_t *) io_handle, NULL, NULL, (int (*)(intptr_t *, intptr_t *, libfdata_vector_t *, libfdata_cache_t *, int, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libesedb_io_handle_read_page, NULL, LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create long values pages vector.", function ); goto on_error; } if( libfdata_vector_append_segment( internal_table->long_values_pages_vector, &segment_index, 0, io_handle->pages_data_offset, io_handle->pages_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append segment to long values pages vector.", function ); goto on_error; } if( libfcache_cache_initialize( &( internal_table->long_values_pages_cache ), LIBESEDB_MAXIMUM_CACHE_ENTRIES_PAGES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create long values pages cache.", function ); goto on_error; } if( libesedb_page_tree_initialize( &( internal_table->long_values_page_tree ), io_handle, internal_table->long_values_pages_vector, internal_table->long_values_pages_cache, table_definition->long_value_catalog_definition->identifier, table_definition->long_value_catalog_definition->father_data_page_number, table_definition, template_table_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create long value page tree.", function ); goto on_error; } } internal_table->io_handle = io_handle; internal_table->file_io_handle = file_io_handle; internal_table->table_definition = table_definition; internal_table->template_table_definition = template_table_definition; *table = (libesedb_table_t *) internal_table; return( 1 ); on_error: if( internal_table != NULL ) { if( internal_table->long_values_pages_cache != NULL ) { libfcache_cache_free( &( internal_table->long_values_pages_cache ), NULL ); } if( internal_table->long_values_pages_vector != NULL ) { libfdata_vector_free( &( internal_table->long_values_pages_vector ), NULL ); } if( internal_table->long_values_page_tree != NULL ) { libesedb_page_tree_free( &( internal_table->long_values_page_tree ), NULL ); } if( internal_table->table_page_tree != NULL ) { libesedb_page_tree_free( &( internal_table->table_page_tree ), NULL ); } if( internal_table->pages_cache != NULL ) { libfcache_cache_free( &( internal_table->pages_cache ), NULL ); } if( internal_table->pages_vector != NULL ) { libfdata_vector_free( &( internal_table->pages_vector ), NULL ); } memory_free( internal_table ); } return( -1 ); } /* Frees a table * Returns 1 if successful or -1 on error */ int libesedb_table_free( libesedb_table_t **table, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_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 ) { internal_table = (libesedb_internal_table_t *) *table; *table = NULL; /* The io_handle, file_io_handle and table_definition references * are freed elsewhere */ if( libfdata_vector_free( &( internal_table->pages_vector ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free pages vector.", function ); result = -1; } if( libfcache_cache_free( &( internal_table->pages_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free pages cache.", function ); result = -1; } if( internal_table->long_values_pages_vector != NULL ) { if( libfdata_vector_free( &( internal_table->long_values_pages_vector ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long values pages vector.", function ); result = -1; } } if( internal_table->long_values_pages_cache != NULL ) { if( libfcache_cache_free( &( internal_table->long_values_pages_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long values pages cache.", function ); result = -1; } } if( internal_table->long_values_page_tree != NULL ) { if( libesedb_page_tree_free( &( internal_table->long_values_page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free long values page tree.", function ); result = -1; } } if( libesedb_page_tree_free( &( internal_table->table_page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table page tree.", function ); result = -1; } memory_free( internal_table ); } return( result ); } /* Retrieves the table identifier or Father Data Page (FDP) object identifier * Returns 1 if successful or -1 on error */ int libesedb_table_get_identifier( libesedb_table_t *table, uint32_t *identifier, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_identifier"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_identifier( internal_table->table_definition->table_catalog_definition, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf8_name_size( libesedb_table_t *table, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf8_name_size"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name_size( internal_table->table_definition->table_catalog_definition, utf8_string_size, internal_table->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-8 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf8_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf8_name"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_name( internal_table->table_definition->table_catalog_definition, utf8_string, utf8_string_size, internal_table->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string of the table name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf16_name_size( libesedb_table_t *table, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf16_name_size"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name_size( internal_table->table_definition->table_catalog_definition, utf16_string_size, internal_table->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-16 encoded string of the table name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf16_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf16_name"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_name( internal_table->table_definition->table_catalog_definition, utf16_string, utf16_string_size, internal_table->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-8 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf8_template_name_size( libesedb_table_t *table, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf8_template_name_size"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_template_name_size( internal_table->table_definition->table_catalog_definition, utf8_string_size, internal_table->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-8 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf8_template_name( libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf8_template_name"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf8_template_name( internal_table->table_definition->table_catalog_definition, utf8_string, utf8_string_size, internal_table->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size of the UTF-16 encoded string of the template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf16_template_name_size( libesedb_table_t *table, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf16_template_name_size"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_template_name_size( internal_table->table_definition->table_catalog_definition, utf16_string_size, internal_table->io_handle->ascii_codepage, 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( 1 ); } /* Retrieves the UTF-16 encoded string of the template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_table_get_utf16_template_name( libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_utf16_template_name"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( internal_table->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing IO handle.", function ); return( -1 ); } if( internal_table->table_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing table definition.", function ); return( -1 ); } if( libesedb_catalog_definition_get_utf16_template_name( internal_table->table_definition->table_catalog_definition, utf16_string, utf16_string_size, internal_table->io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to retrieve UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of columns in the table * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the number of columns * ignoring the template table * * Returns 1 if successful or -1 on error */ int libesedb_table_get_number_of_columns( libesedb_table_t *table, int *number_of_columns, uint8_t flags, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_number_of_columns"; int template_table_number_of_columns = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( number_of_columns == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of columns.", function ); return( -1 ); } if( ( flags & ~( LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( ( flags & LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE ) == 0 ) && ( internal_table->template_table_definition != NULL ) ) { if( libesedb_table_definition_get_number_of_column_catalog_definitions( internal_table->template_table_definition, &template_table_number_of_columns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns from template table.", function ); return( -1 ); } } if( libesedb_table_definition_get_number_of_column_catalog_definitions( internal_table->table_definition, number_of_columns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns from table.", function ); return( -1 ); } *number_of_columns += template_table_number_of_columns; return( 1 ); } /* Retrieves a specific column * * Use the flag LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE to retrieve the column * ignoring the template table * * Returns 1 if successful or -1 on error */ int libesedb_table_get_column( libesedb_table_t *table, int column_entry, libesedb_column_t **column, uint8_t flags, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_column"; int template_table_number_of_columns = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( column == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column.", function ); return( -1 ); } if( *column != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid column value already set.", function ); return( -1 ); } if( ( flags & ~( LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( flags & LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE ) == 0 ) { if( internal_table->template_table_definition != NULL ) { if( libesedb_table_definition_get_number_of_column_catalog_definitions( internal_table->template_table_definition, &template_table_number_of_columns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of columns from template table.", function ); return( -1 ); } } } if( column_entry < template_table_number_of_columns ) { if( libesedb_table_definition_get_column_catalog_definition_by_index( internal_table->template_table_definition, column_entry, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition from template table.", function ); return( -1 ); } } else { if( libesedb_table_definition_get_column_catalog_definition_by_index( internal_table->table_definition, column_entry - template_table_number_of_columns, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition from table.", function ); return( -1 ); } } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column catalog definition.", function ); return( -1 ); } if( libesedb_column_initialize( column, internal_table->io_handle, column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of indexes * Returns 1 if successful or -1 on error */ int libesedb_table_get_number_of_indexes( libesedb_table_t *table, int *number_of_indexes, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_number_of_indexes"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( libesedb_table_definition_get_number_of_index_catalog_definitions( internal_table->table_definition, number_of_indexes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of indexes.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific index * Returns 1 if successful or -1 on error */ int libesedb_table_get_index( libesedb_table_t *table, int index_entry, libesedb_index_t **index, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; libesedb_catalog_definition_t *index_catalog_definition = NULL; static char *function = "libesedb_table_get_index"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; 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( libesedb_table_definition_get_index_catalog_definition_by_index( internal_table->table_definition, index_entry, &index_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index catalog definition.", function ); return( -1 ); } if( libesedb_index_initialize( index, internal_table->file_io_handle, internal_table->io_handle, internal_table->table_definition, internal_table->template_table_definition, index_catalog_definition, internal_table->pages_vector, internal_table->pages_cache, internal_table->long_values_pages_vector, internal_table->long_values_pages_cache, internal_table->table_page_tree, internal_table->long_values_page_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of records in the table * Returns 1 if successful or -1 on error */ int libesedb_table_get_number_of_records( libesedb_table_t *table, int *number_of_records, libcerror_error_t **error ) { libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_number_of_records"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( libesedb_page_tree_get_number_of_leaf_values( internal_table->table_page_tree, internal_table->file_io_handle, number_of_records, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf values from table page tree.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific record * Returns 1 if successful or -1 on error */ int libesedb_table_get_record( libesedb_table_t *table, int record_entry, libesedb_record_t **record, libcerror_error_t **error ) { libesedb_data_definition_t *record_data_definition = NULL; libesedb_internal_table_t *internal_table = NULL; static char *function = "libesedb_table_get_record"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } internal_table = (libesedb_internal_table_t *) table; if( record == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record.", function ); return( -1 ); } if( *record != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid record value already set.", function ); return( -1 ); } if( libesedb_page_tree_get_leaf_value_by_index( internal_table->table_page_tree, internal_table->file_io_handle, record_entry, &record_data_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf value: %d from table values tree.", function, record_entry ); goto on_error; } if( libesedb_record_initialize( record, internal_table->file_io_handle, internal_table->io_handle, internal_table->table_definition, internal_table->template_table_definition, internal_table->pages_vector, internal_table->pages_cache, internal_table->long_values_pages_vector, internal_table->long_values_pages_cache, record_data_definition, internal_table->long_values_page_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record: %d.", function, record_entry ); goto on_error; } return( 1 ); on_error: if( record_data_definition != NULL ) { libesedb_data_definition_free( &record_data_definition, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_error.c0000644000175000017500000000553614610727250021274 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_error.h" #include "libesedb_libcerror.h" #if !defined( HAVE_LOCAL_LIBESEDB ) /* Free an error and its elements */ void libesedb_error_free( libesedb_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 libesedb_error_fprint( libesedb_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libesedb_error_sprint( libesedb_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libesedb_error_backtrace_fprint( libesedb_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libesedb_error_backtrace_sprint( libesedb_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */ libesedb-20240420/libesedb/libesedb_record_value.h0000644000175000017500000000337014610727250022614 0ustar00lordyestalordyesta/* * Record value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_RECORD_VALUE_H ) #define _LIBESEDB_RECORD_VALUE_H #include #include #include "libesedb_libcerror.h" #include "libesedb_libfvalue.h" #if defined( __cplusplus ) extern "C" { #endif int libesedb_record_value_get_utf8_string_size( libfvalue_value_t *record_value, size_t *utf8_string_size, libcerror_error_t **error ); int libesedb_record_value_get_utf8_string( libfvalue_value_t *record_value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libesedb_record_value_get_utf16_string_size( libfvalue_value_t *record_value, size_t *utf16_string_size, libcerror_error_t **error ); int libesedb_record_value_get_utf16_string( libfvalue_value_t *record_value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_RECORD_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_debug.h0000644000175000017500000000434514610727250021233 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DEBUG_H ) #define _LIBESEDB_DEBUG_H #include #include #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libesedb_debug_print_file_type( uint32_t file_type ); void libesedb_debug_print_database_state( uint32_t database_state ); void libesedb_debug_print_page_flags( uint32_t page_flags ); void libesedb_debug_print_page_value_definition_type( uint16_t page_value_definition_type ); void libesedb_debug_print_page_tag_flags( uint8_t page_tag_flags ); void libesedb_debug_print_tagged_data_type_flags( uint8_t tagged_data_type_flags ); void libesedb_debug_print_column_group_of_bits( uint32_t column_group_of_bits ); void libesedb_debug_print_index_group_of_bits( uint32_t index_group_of_bits ); void libesedb_debug_print_file_attribute_flags( uint32_t file_attribute_flags ); void libesedb_debug_print_lcmap_flags( uint32_t lcmap_flags ); int libesedb_debug_print_log_time( uint8_t *log_time, size_t log_time_size, const char *description, const char *indentation, libcerror_error_t **error ); int libesedb_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_DEBUG_H ) */ libesedb-20240420/libesedb/libesedb_page_header.h0000644000175000017500000000542414610727250022370 0ustar00lordyestalordyesta/* * Page header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_HEADER_H ) #define _LIBESEDB_PAGE_HEADER_H #include #include #include "libesedb_io_handle.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page_header libesedb_page_header_t; struct libesedb_page_header { /* The data size */ size_t data_size; /* The previous page number */ uint32_t previous_page_number; /* The next page number */ uint32_t next_page_number; /* The father data page (FPD) object identifier */ uint32_t father_data_page_object_identifier; /* The (first) available page tag */ uint16_t available_page_tag; /* The page flags */ uint32_t flags; /* The page number */ uint32_t page_number; /* The ECC-32 checksum */ uint32_t ecc32_checksum; /* The XOR-32 checksum */ uint32_t xor32_checksum; }; int libesedb_page_header_initialize( libesedb_page_header_t **page_header, libcerror_error_t **error ); int libesedb_page_header_free( libesedb_page_header_t **page_header, libcerror_error_t **error ); int libesedb_page_header_read_data( libesedb_page_header_t *page_header, libesedb_io_handle_t *io_handle, const uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_page_header_get_previous_page_number( libesedb_page_header_t *page_header, uint32_t *previous_page_number, libcerror_error_t **error ); int libesedb_page_header_get_next_page_number( libesedb_page_header_t *page_header, uint32_t *next_page_number, libcerror_error_t **error ); int libesedb_page_header_get_father_data_page_object_identifier( libesedb_page_header_t *page_header, uint32_t *father_data_page_object_identifier, libcerror_error_t **error ); int libesedb_page_header_get_flags( libesedb_page_header_t *page_header, uint32_t *flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_HEADER_H ) */ libesedb-20240420/libesedb/libesedb_block_tree_node.h0000644000175000017500000000560514610727250023263 0ustar00lordyestalordyesta/* * Block tree node functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_BLOCK_TREE_NODE_H ) #define _LIBESEDB_BLOCK_TREE_NODE_H #include #include #include "libesedb_block_descriptor.h" #include "libesedb_libcerror.h" #include "libesedb_libcdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_block_tree_node libesedb_block_tree_node_t; struct libesedb_block_tree_node { /* The (range) start offset */ off64_t start_offset; /* The (range) end offset */ off64_t end_offset; /* The (range) size */ off64_t size; /* The sub node size */ size64_t sub_node_size; /* Sub branch or leaf nodes array */ libcdata_array_t *sub_nodes_array; /* Value to indicate the node is a leaf node */ uint8_t is_leaf_node; }; int libesedb_block_tree_node_initialize( libesedb_block_tree_node_t **block_tree_node, off64_t offset, size64_t size, size64_t leaf_value_size, libcerror_error_t **error ); int libesedb_block_tree_node_free( libesedb_block_tree_node_t **block_tree_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libesedb_block_tree_node_get_sub_node_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_tree_node_t **sub_block_tree_node, libcerror_error_t **error ); int libesedb_block_tree_node_set_sub_node_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_tree_node_t *sub_block_tree_node, libcerror_error_t **error ); int libesedb_block_tree_node_get_leaf_value_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_descriptor_t **block_descriptor, off64_t *block_offset, libcerror_error_t **error ); int libesedb_block_tree_node_set_leaf_value_at_offset( libesedb_block_tree_node_t *block_tree_node, off64_t offset, libesedb_block_descriptor_t *block_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_BLOCK_TREE_NODE_H ) */ libesedb-20240420/libesedb/libesedb_data_definition.h0000644000175000017500000000641314610727250023264 0ustar00lordyestalordyesta/* * Data definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DATA_DEFINITION_H ) #define _LIBESEDB_DATA_DEFINITION_H #include #include #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_table_definition.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_data_definition libesedb_data_definition_t; struct libesedb_data_definition { /* The page offset */ off64_t page_offset; /* The page number */ uint32_t page_number; /* The page value index */ uint16_t page_value_index; /* The data offset relative to the start of the page */ uint16_t data_offset; /* The data size */ uint16_t data_size; }; int libesedb_data_definition_initialize( libesedb_data_definition_t **data_definition, libcerror_error_t **error ); int libesedb_data_definition_free( libesedb_data_definition_t **data_definition, libcerror_error_t **error ); int libesedb_data_definition_read_data( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ); int libesedb_data_definition_read_record( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcdata_array_t *values_array, uint8_t *record_flags, libcerror_error_t **error ); int libesedb_data_definition_read_long_value( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ); int libesedb_data_definition_read_long_value_segment( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint32_t long_value_segment_offset, libfdata_list_t *data_segments_list, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_DATA_DEFINITION_H ) */ libesedb-20240420/libesedb/libesedb_libfvalue.h0000644000175000017500000000337714610727250022122 0ustar00lordyestalordyesta/* * The libfvalue header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBFVALUE_H ) #define _LIBESEDB_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 #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 /* defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _LIBESEDB_LIBFVALUE_H ) */ libesedb-20240420/libesedb/libesedb_data_definition.c0000644000175000017500000015463314610727250023267 0ustar00lordyestalordyesta/* * Data definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_column_type.h" #include "libesedb_data_definition.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_libfvalue.h" #include "libesedb_page.h" #include "libesedb_table_definition.h" #include "libesedb_value_data_handle.h" #include "esedb_page_values.h" /* Creates a data definition * Make sure the value data_definition is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_data_definition_initialize( libesedb_data_definition_t **data_definition, libcerror_error_t **error ) { static char *function = "libesedb_data_definition_initialize"; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( *data_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data definition value already set.", function ); return( -1 ); } *data_definition = memory_allocate_structure( libesedb_data_definition_t ); if( *data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data definition.", function ); goto on_error; } if( memory_set( *data_definition, 0, sizeof( libesedb_data_definition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data definition.", function ); goto on_error; } return( 1 ); on_error: if( *data_definition != NULL ) { memory_free( *data_definition ); *data_definition = NULL; } return( -1 ); } /* Frees a data definition * Returns 1 if successful or -1 on error */ int libesedb_data_definition_free( libesedb_data_definition_t **data_definition, libcerror_error_t **error ) { static char *function = "libesedb_data_definition_free"; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( *data_definition != NULL ) { memory_free( *data_definition ); *data_definition = NULL; } return( 1 ); } /* Reads the data * Returns 1 if successful or -1 on error */ int libesedb_data_definition_read_data( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libesedb_page_t *page = NULL; libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_data_definition_read_data"; off64_t element_data_offset = 0; uint16_t data_offset = 0; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", 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( 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( libfdata_vector_get_element_value_at_offset( pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) pages_cache, data_definition->page_offset, &element_data_offset, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 " at offset: 0x%08" PRIx64 ".", function, data_definition->page_number, data_definition->page_offset ); return( -1 ); } if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page.", function ); return( -1 ); } if( libesedb_page_get_value_by_index( page, data_definition->page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value data.", function ); return( -1 ); } data_offset = data_definition->data_offset - page_value->offset; if( ( data_definition->data_offset < page_value->offset ) || ( data_offset > page_value->size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data definition - data offset value out of bounds.", function ); return( -1 ); } *data = &( page_value->data[ data_offset ] ); *data_size = (size_t) ( page_value->size - data_offset ); return( 1 ); } /* Reads the record * Uses the definition data in the catalog definitions * Returns 1 if successful or -1 on error */ int libesedb_data_definition_read_record( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libesedb_table_definition_t *table_definition, libesedb_table_definition_t *template_table_definition, libcdata_array_t *values_array, uint8_t *record_flags, libcerror_error_t **error ) { libesedb_catalog_definition_t *column_catalog_definition = NULL; libesedb_page_t *page = NULL; libesedb_page_value_t *page_value = NULL; libfvalue_data_handle_t *value_data_handle = NULL; libfvalue_value_t *record_value = NULL; uint8_t *record_data = NULL; uint8_t *tagged_data_type_offset_data = NULL; static char *function = "libesedb_data_definition_read_record"; size_t record_data_size = 0; size_t remaining_definition_data_size = 0; off64_t element_data_offset = 0; uint16_t data_offset = 0; uint16_t fixed_size_data_type_value_offset = 0; uint16_t masked_previous_tagged_data_type_offset = 0; uint16_t masked_tagged_data_type_offset = 0; uint16_t previous_tagged_data_type_offset = 0; uint16_t previous_variable_size_data_type_size = 0; uint16_t tagged_data_type_identifier = 0; uint16_t tagged_data_type_offset = 0; uint16_t tagged_data_type_offset_bitmask = 0x3fff; uint16_t tagged_data_type_offset_data_size = 0; uint16_t tagged_data_type_size = 0; uint16_t tagged_data_type_value_offset = 0; uint16_t tagged_data_types_offset = 0; uint16_t variable_size_data_type_offset = 0; uint16_t variable_size_data_type_size = 0; uint16_t variable_size_data_type_value_offset = 0; uint16_t variable_size_data_type_value_size = 0; uint16_t variable_size_data_types_offset = 0; uint8_t current_variable_size_data_type = 0; uint8_t last_fixed_size_data_type = 0; uint8_t last_variable_size_data_type = 0; uint8_t number_of_variable_size_data_types = 0; uint8_t record_value_type = 0; uint8_t tagged_data_types_format = LIBESEDB_TAGGED_DATA_TYPES_FORMAT_INDEX; int column_catalog_definition_index = 0; int encoding = 0; int number_of_column_catalog_definitions = 0; int number_of_table_column_catalog_definitions = 0; int number_of_template_table_column_catalog_definitions = 0; int record_value_codepage = 0; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", 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_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table definition.", function ); return( -1 ); } if( values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid values array.", function ); return( -1 ); } if( record_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid record flags.", function ); return( -1 ); } if( libfdata_vector_get_element_value_at_offset( pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) pages_cache, data_definition->page_offset, &element_data_offset, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 " at offset: 0x%08" PRIx64 ".", function, data_definition->page_number, data_definition->page_offset ); goto on_error; } if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page.", function ); goto on_error; } if( libesedb_page_get_value_by_index( page, data_definition->page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, data_definition->page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, data_definition->page_value_index ); goto on_error; } if( page_value->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value data.", function ); goto on_error; } data_offset = data_definition->data_offset - page_value->offset; if( ( data_definition->data_offset < page_value->offset ) || ( data_offset > page_value->size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data definition - data offset value out of bounds.", function ); goto on_error; } record_data = &( page_value->data[ data_offset ] ); record_data_size = page_value->size - data_offset; if( record_data_size < sizeof( esedb_data_definition_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record data size value out of bounds.", function ); goto on_error; } if( ( io_handle->format_version == 0x620 ) && ( io_handle->format_revision <= 2 ) ) { tagged_data_types_format = LIBESEDB_TAGGED_DATA_TYPES_FORMAT_LINEAR; } if( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) { tagged_data_type_offset_bitmask = 0x7fff; } last_fixed_size_data_type = ( (esedb_data_definition_header_t *) record_data )->last_fixed_size_data_type; last_variable_size_data_type = ( (esedb_data_definition_header_t *) record_data )->last_variable_size_data_type; byte_stream_copy_to_uint16_little_endian( ( (esedb_data_definition_header_t *) record_data )->variable_size_data_types_offset, variable_size_data_types_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: last fixed size data type\t\t\t: %" PRIu8 "\n", function, last_fixed_size_data_type ); libcnotify_printf( "%s: last variable size data type\t\t: %" PRIu8 "\n", function, last_variable_size_data_type ); libcnotify_printf( "%s: variable size data types offset\t\t: %" PRIu16 "\n", function, variable_size_data_types_offset ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( template_table_definition != NULL ) { if( libesedb_table_definition_get_number_of_column_catalog_definitions( template_table_definition, &number_of_template_table_column_catalog_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of template table column catalog definitions.", function ); goto on_error; } } if( libesedb_table_definition_get_number_of_column_catalog_definitions( table_definition, &number_of_table_column_catalog_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of table column catalog definitions.", function ); goto on_error; } number_of_column_catalog_definitions = number_of_table_column_catalog_definitions; if( template_table_definition != NULL ) { if( number_of_table_column_catalog_definitions > number_of_template_table_column_catalog_definitions ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of table column catalog definitions value exceeds number in template table.", function ); goto on_error; } number_of_column_catalog_definitions += number_of_template_table_column_catalog_definitions; } if( libcdata_array_resize( values_array, number_of_column_catalog_definitions, (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 ); goto on_error; } if( last_variable_size_data_type > 127 ) { number_of_variable_size_data_types = last_variable_size_data_type - 127; } fixed_size_data_type_value_offset = (uint16_t) sizeof( esedb_data_definition_header_t ); current_variable_size_data_type = 127; variable_size_data_type_offset = variable_size_data_types_offset; variable_size_data_type_value_offset = variable_size_data_types_offset + ( number_of_variable_size_data_types * 2 ); for( column_catalog_definition_index = 0; column_catalog_definition_index < number_of_column_catalog_definitions; column_catalog_definition_index++ ) { if( ( template_table_definition != NULL ) && ( column_catalog_definition_index < number_of_template_table_column_catalog_definitions ) ) { if( libesedb_table_definition_get_column_catalog_definition_by_index( template_table_definition, column_catalog_definition_index, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition: %d from template table.", function, column_catalog_definition_index ); goto on_error; } } else { if( libesedb_table_definition_get_column_catalog_definition_by_index( table_definition, column_catalog_definition_index, &column_catalog_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column catalog definition: %d from table.", function, column_catalog_definition_index ); goto on_error; } } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column catalog definition: %d.", function, column_catalog_definition_index ); goto on_error; } if( column_catalog_definition->type != LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column catalog definition type: %" PRIu16 " for list element: %d.", function, column_catalog_definition->type, column_catalog_definition_index ); goto on_error; } if( ( template_table_definition != NULL ) && ( column_catalog_definition_index == number_of_template_table_column_catalog_definitions ) ) { if( column_catalog_definition->identifier != 256 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: only tagged data types supported in tables using a template table.", function ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: column definition identifier\t\t: %03" PRIu32 "\n", function, column_catalog_definition->identifier ); libcnotify_printf( "%s: column definition name\t\t\t: %" PRIs_SYSTEM "\n", function, column_catalog_definition->name_string ); libcnotify_printf( "%s: column definition type\t\t\t: %s (%s)\n", function, libesedb_column_type_get_description( column_catalog_definition->column_type ), libesedb_column_type_get_identifier( column_catalog_definition->column_type ) ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* TODO refactor to value type */ switch( column_catalog_definition->column_type ) { case LIBESEDB_COLUMN_TYPE_NULL: /* JET_coltypNil seems to be able to contain data */ record_value_type = LIBFVALUE_VALUE_TYPE_BINARY_DATA; break; case LIBESEDB_COLUMN_TYPE_BOOLEAN: record_value_type = LIBFVALUE_VALUE_TYPE_BOOLEAN; break; case LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_8BIT; break; case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_INTEGER_16BIT; break; case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_16BIT; break; case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_INTEGER_32BIT; break; case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT; break; case LIBESEDB_COLUMN_TYPE_CURRENCY: case LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED: record_value_type = LIBFVALUE_VALUE_TYPE_INTEGER_64BIT; break; case LIBESEDB_COLUMN_TYPE_FLOAT_32BIT: record_value_type = LIBFVALUE_VALUE_TYPE_FLOATING_POINT_32BIT; break; case LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT: record_value_type = LIBFVALUE_VALUE_TYPE_FLOATING_POINT_64BIT; break; case LIBESEDB_COLUMN_TYPE_DATE_TIME: record_value_type = LIBFVALUE_VALUE_TYPE_FILETIME; break; case LIBESEDB_COLUMN_TYPE_GUID: record_value_type = LIBFVALUE_VALUE_TYPE_GUID; break; case LIBESEDB_COLUMN_TYPE_BINARY_DATA: case LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA: record_value_type = LIBFVALUE_VALUE_TYPE_BINARY_DATA; break; case LIBESEDB_COLUMN_TYPE_TEXT: case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: record_value_type = LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM; break; case LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE: /* TODO handle this value type */ record_value_type = LIBFVALUE_VALUE_TYPE_UNDEFINED; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_catalog_definition->column_type ); goto on_error; } if( libfvalue_data_handle_initialize( &value_data_handle, (int (*)(libfvalue_data_handle_t *, const uint8_t *, size_t, int, uint32_t, libcerror_error_t **)) &libesedb_value_data_handle_read_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value data handle.", function ); goto on_error; } if( ( column_catalog_definition->column_type == LIBESEDB_COLUMN_TYPE_TEXT ) || ( column_catalog_definition->column_type == LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { record_value_codepage = (int) column_catalog_definition->codepage; /* If the codepage is not set use the default codepage */ if( record_value_codepage == 0 ) { record_value_codepage = io_handle->ascii_codepage; } /* Codepage 1200 in the ESE database format is not strict UTF-16 little-endian * it can be used for ASCII strings as well. */ if( record_value_codepage == 1200 ) { record_value_codepage = LIBFVALUE_CODEPAGE_1200_MIXED; } encoding = record_value_codepage; } else { encoding = LIBFVALUE_ENDIAN_LITTLE; } if( column_catalog_definition->identifier <= 127 ) { if( column_catalog_definition->identifier <= last_fixed_size_data_type ) { if( column_catalog_definition->size > ( record_data_size - fixed_size_data_type_value_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data definition - size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu32 ") fixed size data type size\t\t: %" PRIu32 "\n", function, column_catalog_definition->identifier, column_catalog_definition->size ); libcnotify_print_data( &( record_data[ fixed_size_data_type_value_offset ] ), column_catalog_definition->size, 0 ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libfvalue_data_handle_set_data( value_data_handle, &( record_data[ fixed_size_data_type_value_offset ] ), column_catalog_definition->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 fixed size data type definition.", function ); goto on_error; } if( column_catalog_definition->size > (uint32_t) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid common catalog definition size value exceeds maximum.", function ); goto on_error; } fixed_size_data_type_value_offset += (uint16_t) column_catalog_definition->size; } } else if( current_variable_size_data_type < last_variable_size_data_type ) { while( current_variable_size_data_type < column_catalog_definition->identifier ) { if( variable_size_data_type_offset > ( record_data_size - 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid variable size data type offset value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( &( record_data[ variable_size_data_type_offset ] ), variable_size_data_type_size ); variable_size_data_type_offset += 2; current_variable_size_data_type++; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") variable size data type size\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, current_variable_size_data_type, variable_size_data_type_size, ( ( variable_size_data_type_size & 0x8000 ) != 0 ) ? 0 : ( variable_size_data_type_size & 0x7fff ) - previous_variable_size_data_type_size ); } #endif if( current_variable_size_data_type == column_catalog_definition->identifier ) { /* The MSB signifies that the variable size data type is empty */ if( ( variable_size_data_type_size & 0x8000 ) == 0 ) { if( variable_size_data_type_size < previous_variable_size_data_type_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid variable size data type size value out of bounds.", function ); goto on_error; } variable_size_data_type_value_size = variable_size_data_type_size - previous_variable_size_data_type_size; if( ( variable_size_data_type_value_size > record_data_size ) || ( variable_size_data_type_value_offset > ( record_data_size - variable_size_data_type_value_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid variable size data type value size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu32 ") variable size data type:\n", function, column_catalog_definition->identifier ); libcnotify_print_data( &( record_data[ variable_size_data_type_value_offset ] ), variable_size_data_type_value_size, 0 ); } #endif if( libfvalue_data_handle_set_data( value_data_handle, &( record_data[ variable_size_data_type_value_offset ] ), variable_size_data_type_value_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 variable size data type definition.", function ); goto on_error; } variable_size_data_type_value_offset += variable_size_data_type_value_size; previous_variable_size_data_type_size = variable_size_data_type_size; } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu32 ") variable size data type\t\t: \n", function, column_catalog_definition->identifier ); } #endif } if( current_variable_size_data_type >= last_variable_size_data_type ) { break; } } } else { if( tagged_data_types_format == LIBESEDB_TAGGED_DATA_TYPES_FORMAT_LINEAR ) { if( tagged_data_types_offset == 0 ) { tagged_data_types_offset = variable_size_data_type_value_offset; tagged_data_type_value_offset = variable_size_data_type_value_offset; remaining_definition_data_size = record_data_size - (size_t) tagged_data_types_offset; byte_stream_copy_to_uint16_little_endian( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_identifier ); tagged_data_type_value_offset += 2; byte_stream_copy_to_uint16_little_endian( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_size ); tagged_data_type_value_offset += 2; remaining_definition_data_size -= 4; } if( ( remaining_definition_data_size > 0 ) && ( column_catalog_definition->identifier == tagged_data_type_identifier ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type identifier\t\t: %" PRIu16 "\n", function, column_catalog_definition->identifier, tagged_data_type_identifier ); libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type size\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, column_catalog_definition->identifier, tagged_data_type_size, tagged_data_type_size & 0x5fff ); } #endif if( ( tagged_data_type_size & 0x8000 ) != 0 ) { if( tagged_data_type_value_offset >= record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type flags\t\t: 0x%02" PRIx8 "\n", function, column_catalog_definition->identifier, record_data[ tagged_data_type_value_offset ] ); libesedb_debug_print_tagged_data_type_flags( record_data[ tagged_data_type_value_offset ] ); libcnotify_printf( "\n" ); } #endif if( libfvalue_data_handle_set_data_flags( value_data_handle, (uint32_t) record_data[ tagged_data_type_value_offset ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set tagged data type flags in tagged data type definition.", function ); goto on_error; } tagged_data_type_value_offset += 1; tagged_data_type_size = ( tagged_data_type_size & 0x5fff ) - 1; remaining_definition_data_size -= 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( tagged_data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type:\n", function, column_catalog_definition->identifier ); if( tagged_data_type_value_offset < record_data_size ) { libcnotify_print_data( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_size, 0 ); } else { libcnotify_printf( "\n\n" ); } } else { libcnotify_printf( "%s: (%03" PRIu32 ") tagged data type\t\t\t: \n", function, column_catalog_definition->identifier ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( tagged_data_type_size > 0 ) { if( tagged_data_type_value_offset >= record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } if( tagged_data_type_size > remaining_definition_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type size value exceeds remaining data size.", function ); goto on_error; } if( libfvalue_data_handle_set_data( value_data_handle, &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_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 tagged data type definition.", function ); goto on_error; } remaining_definition_data_size -= tagged_data_type_size; } if( remaining_definition_data_size > 0 ) { if( tagged_data_type_value_offset >= record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_identifier ); tagged_data_type_value_offset += 2; byte_stream_copy_to_uint16_little_endian( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_size ); tagged_data_type_value_offset += 2; remaining_definition_data_size -= 4; } } } else if( tagged_data_types_format == LIBESEDB_TAGGED_DATA_TYPES_FORMAT_INDEX ) { if( tagged_data_types_offset == 0 ) { tagged_data_types_offset = variable_size_data_type_value_offset; /* Note that offset is allowed to be equal to the record data size here */ if( tagged_data_types_offset > record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data types offset value out of bounds.", function ); goto on_error; } tagged_data_type_offset_data = &( record_data[ tagged_data_types_offset ] ); remaining_definition_data_size = record_data_size - (size_t) tagged_data_types_offset; if( remaining_definition_data_size > 0 ) { if( record_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data types offset data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( tagged_data_type_offset_data, tagged_data_type_identifier ); tagged_data_type_offset_data += 2; byte_stream_copy_to_uint16_little_endian( tagged_data_type_offset_data, tagged_data_type_offset ); tagged_data_type_offset_data += 2; if( tagged_data_type_offset == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } tagged_data_type_offset_data_size = ( tagged_data_type_offset & 0x3fff ) - 4; remaining_definition_data_size -= 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: tagged data type offset data size\t\t: %" PRIu16 "\n", function, tagged_data_type_offset_data_size ); libcnotify_printf( "%s: tagged data type offset data:\n", function ); libcnotify_print_data( tagged_data_type_offset_data, tagged_data_type_offset_data_size + 4, 0 ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ } } if( ( remaining_definition_data_size > 0 ) && ( column_catalog_definition->identifier == tagged_data_type_identifier ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type identifier\t\t: %" PRIu16 "\n", function, column_catalog_definition->identifier, tagged_data_type_identifier ); libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type offset\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, column_catalog_definition->identifier, tagged_data_type_offset, tagged_data_type_offset & tagged_data_type_offset_bitmask ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ previous_tagged_data_type_offset = tagged_data_type_offset; if( tagged_data_type_offset_data_size > 0 ) { if( tagged_data_type_offset_data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data types offset data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( tagged_data_type_offset_data, tagged_data_type_identifier ); tagged_data_type_offset_data += 2; byte_stream_copy_to_uint16_little_endian( tagged_data_type_offset_data, tagged_data_type_offset ); tagged_data_type_offset_data += 2; tagged_data_type_offset_data_size -= 4; remaining_definition_data_size -= 4; } masked_previous_tagged_data_type_offset = previous_tagged_data_type_offset & tagged_data_type_offset_bitmask; masked_tagged_data_type_offset = tagged_data_type_offset & tagged_data_type_offset_bitmask; if( masked_previous_tagged_data_type_offset > masked_tagged_data_type_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value exceeds next tagged data type offset.", function ); goto on_error; } if( masked_tagged_data_type_offset > masked_previous_tagged_data_type_offset ) { tagged_data_type_size = masked_tagged_data_type_offset - masked_previous_tagged_data_type_offset; } else { tagged_data_type_size = (uint16_t) remaining_definition_data_size; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type size\t\t: %" PRIu16 "\n", function, column_catalog_definition->identifier, tagged_data_type_size ); } #endif tagged_data_type_value_offset = tagged_data_types_offset + masked_previous_tagged_data_type_offset; if( tagged_data_type_size > 0 ) { if( tagged_data_type_size > remaining_definition_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type size value exceeds remaining data size.", function ); goto on_error; } remaining_definition_data_size -= tagged_data_type_size; if( ( ( io_handle->format_revision >= LIBESEDB_FORMAT_REVISION_EXTENDED_PAGE_HEADER ) && ( io_handle->page_size >= 16384 ) ) || ( ( previous_tagged_data_type_offset & 0x4000 ) != 0 ) ) { if( tagged_data_type_value_offset >= record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } if( libfvalue_data_handle_set_data_flags( value_data_handle, (uint32_t) record_data[ tagged_data_type_value_offset ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set tagged data type flags in tagged data type definition.", function ); goto on_error; } tagged_data_type_value_offset += 1; tagged_data_type_size -= 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") tagged data type:\n", function, column_catalog_definition->identifier ); if( tagged_data_type_value_offset < record_data_size ) { libcnotify_print_data( &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_size, 0 ); } else { libcnotify_printf( "\n\n" ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ } #if defined( HAVE_DEBUG_OUTPUT ) /* TODO are zero size tagged data type values handled correctly? */ else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu32 ") tagged data type\t\t\t: \n", function, column_catalog_definition->identifier ); } #endif if( tagged_data_type_size > 0 ) { if( tagged_data_type_value_offset >= record_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type offset value out of bounds.", function ); goto on_error; } if( tagged_data_type_size > ( record_data_size - tagged_data_type_value_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid tagged data type size value out of bounds.", function ); goto on_error; } if( libfvalue_data_handle_set_data( value_data_handle, &( record_data[ tagged_data_type_value_offset ] ), tagged_data_type_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 tagged data type definition.", function ); goto on_error; } } } } } if( libfvalue_value_type_initialize_with_data_handle( &record_value, record_value_type, value_data_handle, LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record value.", function ); goto on_error; } value_data_handle = NULL; if( libcdata_array_set_entry_by_index( values_array, column_catalog_definition_index, (intptr_t *) record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set data type definition: %d.", function, column_catalog_definition_index ); goto on_error; } record_value = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( fixed_size_data_type_value_offset < variable_size_data_types_offset ) { libcnotify_printf( "%s: fixed size data types trailing data:\n", function ); libcnotify_print_data( &( record_data[ fixed_size_data_type_value_offset ] ), variable_size_data_types_offset - fixed_size_data_type_value_offset, 0 ); } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( 1 ); on_error: if( record_value != NULL ) { libfvalue_value_free( &record_value, NULL ); } if( value_data_handle != NULL ) { libfvalue_data_handle_free( &value_data_handle, NULL ); } return( -1 ); } /* Reads the long value * Returns 1 if successful or -1 on error */ int libesedb_data_definition_read_long_value( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ) { libesedb_page_t *page = NULL; libesedb_page_value_t *page_value = NULL; uint8_t *long_value_data = NULL; static char *function = "libesedb_data_definition_read_long_value"; size_t long_value_data_size = 0; off64_t element_data_offset = 0; uint32_t value_32bit = 0; uint16_t data_offset = 0; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", function ); return( -1 ); } if( libfdata_vector_get_element_value_at_offset( pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) pages_cache, data_definition->page_offset, &element_data_offset, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 " at offset: 0x%08" PRIx64 ".", function, data_definition->page_number, data_definition->page_offset ); return( -1 ); } if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page.", function ); return( -1 ); } if( libesedb_page_get_value_by_index( page, data_definition->page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value data.", function ); return( -1 ); } data_offset = data_definition->data_offset - page_value->offset; if( ( data_definition->data_offset < page_value->offset ) || ( data_offset > page_value->size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data definition - data offset value out of bounds.", function ); return( -1 ); } long_value_data = &( page_value->data[ data_offset ] ); long_value_data_size = page_value->size - data_offset; if( long_value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported long values data size: %" PRIzd ".", function, long_value_data_size ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: long value data:\n", function ); libcnotify_print_data( long_value_data, long_value_data_size, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( long_value_data, value_32bit ); long_value_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unknown1\t\t\t\t: %" PRIu32 "\n", function, value_32bit ); } #endif byte_stream_copy_to_uint16_little_endian( long_value_data, value_32bit ); long_value_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: last segment offset\t\t\t: %" PRIu32 "\n", function, value_32bit ); libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads the long value segment * Returns 1 if successful or -1 on error */ int libesedb_data_definition_read_long_value_segment( libesedb_data_definition_t *data_definition, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, uint32_t long_value_segment_offset, libfdata_list_t *data_segments_list, libcerror_error_t **error ) { libesedb_page_t *page = NULL; libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_data_definition_read_long_value_segment"; off64_t element_data_offset = 0; off64_t long_value_segment_data_offset = 0; size64_t data_size = 0; size_t long_value_segment_data_size = 0; uint16_t data_offset = 0; int element_index = 0; if( data_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data definition.", 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( libfdata_vector_get_element_value_at_offset( pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) pages_cache, data_definition->page_offset, &element_data_offset, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 " at offset: 0x%08" PRIx64 ".", function, data_definition->page_number, data_definition->page_offset ); return( -1 ); } if( page == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page.", function ); return( -1 ); } if( libesedb_page_get_value_by_index( page, data_definition->page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, data_definition->page_value_index ); return( -1 ); } if( page_value->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value data.", function ); return( -1 ); } data_offset = data_definition->data_offset - page_value->offset; if( ( data_definition->data_offset < page_value->offset ) || ( data_offset > page_value->size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data definition - data offset value out of bounds.", function ); return( -1 ); } long_value_segment_data_size = page_value->size - data_offset; /* Note that the data stream will point to the file offset * io_handle->pages_data_offset contains the offset relative from the start of the file to the page data * data_definition->page_offset contains the offset relative from the start of the page data * data_definition->data_offset contains the offset relative from the start of the page */ long_value_segment_data_offset = io_handle->pages_data_offset + data_definition->page_offset + data_definition->data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: long value segment with offset: %" PRIu32 " has data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIzd "\n", function, long_value_segment_offset, long_value_segment_data_offset, long_value_segment_data_offset, long_value_segment_data_size ); libcnotify_printf( "\n" ); } #endif if( libfdata_list_get_size( data_segments_list, &data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of data segments list.", function ); return( -1 ); } if( long_value_segment_offset != (off64_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported long value segment offset: %" PRIi64 " value must match end of previous segment: %" PRIzd ".", function, long_value_segment_offset, data_size ); return( -1 ); } if( libfdata_list_append_element( data_segments_list, &element_index, 0, long_value_segment_data_offset, (size64_t) long_value_segment_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append long value segment at offset: 0x%08" PRIx64 " to data segments list.", function, long_value_segment_offset ); return( -1 ); } return( 1 ); } libesedb-20240420/libesedb/libesedb_space_tree.h0000644000175000017500000000423014610727250022250 0ustar00lordyestalordyesta/* * Space tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_SPACE_TREE_H ) #define _LIBESEDB_SPACE_TREE_H #include #include #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_space_tree libesedb_space_tree_t; struct libesedb_space_tree { /* The page tree */ libesedb_page_tree_t *page_tree; }; int libesedb_space_tree_initialize( libesedb_space_tree_t **space_tree, libesedb_io_handle_t *io_handle, uint32_t object_identifier, uint32_t root_page_number, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ); int libesedb_space_tree_free( libesedb_space_tree_t **space_tree, libcerror_error_t **error ); int libesedb_space_tree_read_values_from_page( libesedb_space_tree_t *space_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, int *current_leaf_value_index, int recursion_depth, libcerror_error_t **error ); int libesedb_space_tree_read_file_io_handle( libesedb_space_tree_t *space_tree, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_SPACE_TREE_H ) */ libesedb-20240420/libesedb/libesedb_lcid.c0000644000175000017500000004447514610727250021063 0ustar00lordyestalordyesta/* * LCID functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_lcid.h" #if defined( HAVE_DEBUG_OUTPUT ) libesedb_lcid_language_tag_t libesedb_lcid_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 *libesedb_lcid_language_tag_get_identifier( uint16_t lcid_language_tag ) { int iterator = 0; while( ( libesedb_lcid_language_tags[ iterator ] ).lcid_language_tag != (uint16_t) -1 ) { if( ( libesedb_lcid_language_tags[ iterator ] ).lcid_language_tag == lcid_language_tag ) { break; } iterator++; } return( ( libesedb_lcid_language_tags[ iterator ] ).identifier ); } /* Retrieves a string containing the language tag description */ const char *libesedb_lcid_language_tag_get_description( uint16_t lcid_language_tag ) { int iterator = 0; while( ( libesedb_lcid_language_tags[ iterator ] ).lcid_language_tag != (uint16_t) -1 ) { if( ( libesedb_lcid_language_tags[ iterator ] ).lcid_language_tag == lcid_language_tag ) { break; } iterator++; } return( ( libesedb_lcid_language_tags[ iterator ] ).description ); } #endif libesedb-20240420/libesedb/libesedb_space_tree.c0000644000175000017500000004714214610727250022254 0ustar00lordyestalordyesta/* * Space tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_page_value.h" #include "libesedb_page_tree.h" #include "libesedb_page_tree_value.h" #include "libesedb_space_tree.h" #include "libesedb_space_tree_value.h" /* Creates a space tree * Make sure the value space_tree is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_space_tree_initialize( libesedb_space_tree_t **space_tree, libesedb_io_handle_t *io_handle, uint32_t object_identifier, uint32_t root_page_number, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ) { static char *function = "libesedb_space_tree_initialize"; if( space_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree.", function ); return( -1 ); } if( *space_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid space tree value already set.", function ); return( -1 ); } *space_tree = memory_allocate_structure( libesedb_space_tree_t ); if( *space_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create space tree.", function ); goto on_error; } if( memory_set( ( *space_tree ), 0, sizeof( libesedb_space_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear space tree.", function ); memory_free( *space_tree ); *space_tree = NULL; return( -1 ); } if( libesedb_page_tree_initialize( &( ( *space_tree )->page_tree ), io_handle, pages_vector, pages_cache, object_identifier, root_page_number, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree.", function ); goto on_error; } return( 1 ); on_error: if( *space_tree != NULL ) { memory_free( *space_tree ); *space_tree = NULL; } return( -1 ); } /* Frees a space_tree * Returns 1 if successful or -1 on error */ int libesedb_space_tree_free( libesedb_space_tree_t **space_tree, libcerror_error_t **error ) { static char *function = "libesedb_space_tree_free"; int result = 1; if( space_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree.", function ); return( -1 ); } if( *space_tree != NULL ) { if( libesedb_page_tree_free( &( ( *space_tree )->page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree.", function ); result = -1; } memory_free( *space_tree ); *space_tree = NULL; } return( result ); } /* Reads the space_tree values from a page * Returns 1 if successful or -1 on error */ int libesedb_space_tree_read_values_from_page( libesedb_space_tree_t *space_tree, libbfio_handle_t *file_io_handle, libesedb_page_t *page, int *current_leaf_value_index, int recursion_depth, libcerror_error_t **error ) { libesedb_page_t *child_page = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; libesedb_space_tree_value_t *space_tree_value = NULL; libfcache_cache_t *child_page_cache = NULL; static char *function = "libesedb_space_tree_read_values_from_page"; uint32_t child_page_number = 0; uint32_t page_flags = 0; uint32_t total_number_of_pages = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t father_data_page_object_identifier = 0; #endif if( space_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree.", function ); return( -1 ); } if( space_tree->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid space tree - missing page tree.", function ); return( -1 ); } if( space_tree->page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid space tree - invalid page tree - missing IO handle.", function ); return( -1 ); } if( current_leaf_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current leaf value index.", function ); return( -1 ); } if( ( recursion_depth < 0 ) || ( recursion_depth > LIBESEDB_MAXIMUM_INDEX_NODE_RECURSION_DEPTH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid recursion depth value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libesedb_page_get_father_data_page_object_identifier( page, &father_data_page_object_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve father data page object identifier.", function ); goto on_error; } if( space_tree->page_tree->object_identifier != father_data_page_object_identifier ) { libcnotify_printf( "%s: mismatch in father data page object identifier (tree: %" PRIu32 " != page: %" PRIu32 ").\n", function, space_tree->page_tree->object_identifier, father_data_page_object_identifier ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } if( number_of_page_values == 0 ) { return( 1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } if( libesedb_page_get_value_by_index( page, 0, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: 0.", function ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid page value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: 000 page tag flags\t: 0x%02" PRIx8 "", function, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: page value: 000 data:\n", function ); libcnotify_print_data( page_value->data, (size_t) page_value->size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* Use a local cache to prevent cache invalidation of the page * when reading child pages. */ if( libfcache_cache_initialize( &child_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create child page cache.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { continue; } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) != 0 ) { if( libesedb_space_tree_value_initialize( &space_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create space tree value.", function ); goto on_error; } if( libesedb_space_tree_value_read_data( space_tree_value, page_tree_value->data, (size_t) page_tree_value->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read space tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } total_number_of_pages += space_tree_value->number_of_pages; if( libesedb_space_tree_value_free( &space_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free space tree value.", function ); goto on_error; } } else { if( page_tree_value->data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid page tree value: %" PRIu16 " data size value out of bounds.", function, page_value_index ); goto on_error; } byte_stream_copy_to_uint32_little_endian( page_tree_value->data, child_page_number ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " child page number\t\t: %" PRIu32 "", function, page_value_index, child_page_number ); if( child_page_number == 0 ) { libcnotify_printf( " (invalid page number)\n" ); } else if( child_page_number > space_tree->page_tree->io_handle->last_page_number ) { libcnotify_printf( " (exceeds last page number: %" PRIu32 ")\n", space_tree->page_tree->io_handle->last_page_number ); } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif #if ( SIZEOF_INT <= 4 ) if( ( child_page_number < 1 ) || ( child_page_number > (uint32_t) INT_MAX ) ) #else if( ( child_page_number < 1 ) || ( (int) child_page_number > INT_MAX ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid child page number value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( page_tree_value->data_size > 4 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " trailing data:\n", function, page_value_index ); libcnotify_print_data( &( page_tree_value->data[ 4 ] ), page_tree_value->data_size - 4, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } #endif if( ( child_page_number > 0 ) && ( child_page_number <= space_tree->page_tree->io_handle->last_page_number ) ) { if( libfdata_vector_get_element_value_by_index( space_tree->page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) child_page_cache, (int) child_page_number - 1, (intptr_t **) &child_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, child_page_number ); goto on_error; } if( libesedb_page_validate_space_tree_page( child_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page.", function ); goto on_error; } if( libesedb_space_tree_read_values_from_page( space_tree, file_io_handle, child_page, current_leaf_value_index, recursion_depth + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read values from page: %" PRIu32 ".", function, child_page_number ); goto on_error; } } } if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } } if( libfcache_cache_free( &child_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free child page cache.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: total number of pages\t\t: %" PRIu32 "\n", function, total_number_of_pages ); libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } if( space_tree_value != NULL ) { libesedb_space_tree_value_free( &space_tree_value, NULL ); } if( child_page_cache != NULL ) { libfcache_cache_free( &child_page_cache, NULL ); } return( -1 ); } /* Reads the space tree * Returns 1 if successful or -1 on error */ int libesedb_space_tree_read_file_io_handle( libesedb_space_tree_t *space_tree, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libesedb_page_t *root_page = NULL; libfcache_cache_t *root_page_cache = NULL; static char *function = "libesedb_space_tree_read_file_io_handle"; int current_leaf_value_index = 0; if( space_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid space tree.", function ); return( -1 ); } if( space_tree->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid space tree - missing page tree.", function ); return( -1 ); } /* Use a local cache to prevent cache invalidation of the root page * when reading child pages. */ if( libfcache_cache_initialize( &root_page_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root page cache.", function ); goto on_error; } if( libfdata_vector_get_element_value_by_index( space_tree->page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) root_page_cache, (int) space_tree->page_tree->root_page_number - 1, (intptr_t **) &root_page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, space_tree->page_tree->root_page_number ); goto on_error; } if( libesedb_page_validate_root_page( root_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported root page.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libesedb_page_tree_read_root_page_header( space_tree->page_tree, root_page, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read root page header.", function ); goto on_error; } #endif if( libesedb_space_tree_read_values_from_page( space_tree, file_io_handle, root_page, ¤t_leaf_value_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read values from root page.", function ); goto on_error; } if( libfcache_cache_free( &root_page_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root page cache.", function ); goto on_error; } return( 1 ); on_error: if( root_page_cache != NULL ) { libfcache_cache_free( &root_page_cache, NULL ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_libclocale.h0000644000175000017500000000266314610727250022237 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_LIBCLOCALE_H ) #define _LIBESEDB_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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBESEDB_LIBCLOCALE_H ) */ libesedb-20240420/libesedb/libesedb_page_tree_value.c0000644000175000017500000001521314610727250023263 0ustar00lordyestalordyesta/* * Page tree value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_definitions.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_page_tree_value.h" /* Creates a page tree value * Make sure the value page_tree_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_page_tree_value_initialize( libesedb_page_tree_value_t **page_tree_value, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_value_initialize"; if( page_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree value.", function ); return( -1 ); } if( *page_tree_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid page tree value value already set.", function ); return( -1 ); } *page_tree_value = memory_allocate_structure( libesedb_page_tree_value_t ); if( *page_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create page tree value.", function ); goto on_error; } if( memory_set( *page_tree_value, 0, sizeof( libesedb_page_tree_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear page tree value.", function ); goto on_error; } return( 1 ); on_error: if( *page_tree_value != NULL ) { memory_free( *page_tree_value ); *page_tree_value = NULL; } return( -1 ); } /* Frees a page tree value * Returns 1 if successful or -1 on error */ int libesedb_page_tree_value_free( libesedb_page_tree_value_t **page_tree_value, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_value_free"; if( page_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree value.", function ); return( -1 ); } if( *page_tree_value != NULL ) { memory_free( *page_tree_value ); *page_tree_value = NULL; } return( 1 ); } /* Reads a page tree value * Returns 1 if successful or -1 on error */ int libesedb_page_tree_value_read_data( libesedb_page_tree_value_t *page_tree_value, const uint8_t *data, size_t data_size, uint8_t page_value_flags, libcerror_error_t **error ) { static char *function = "libesedb_page_tree_value_read_data"; size_t data_offset = 0; size_t minimum_data_size = 0; #if defined( HAVE_DEBUG_OUTPUT ) const uint8_t *page_key_data = NULL; size_t page_key_size = 0; #endif if( page_tree_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid page tree value.", 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( ( page_value_flags & LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE ) != 0 ) { minimum_data_size = 4; } else { minimum_data_size = 2; } if( ( data_size < minimum_data_size ) || ( 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page tree value:\n", function ); libcnotify_print_data( data, data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif if( ( page_value_flags & LIBESEDB_PAGE_TAG_FLAG_HAS_COMMON_KEY_SIZE ) != 0 ) { byte_stream_copy_to_uint16_little_endian( data, page_tree_value->common_key_size ); data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: common key size\t\t\t: %" PRIu16 "\n", function, page_tree_value->common_key_size ); } #endif } byte_stream_copy_to_uint16_little_endian( &( data[ data_offset ] ), page_tree_value->local_key_size ); data_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local key size\t\t\t: %" PRIu16 "\n", function, page_tree_value->local_key_size ); } #endif if( (size_t) page_tree_value->local_key_size > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid local key size value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local key value\t\t\t: ", function ); page_key_data = &( data[ data_offset ] ); page_key_size = page_tree_value->local_key_size; while( page_key_size > 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%02" PRIx8 " ", *page_key_data ); } page_key_data++; page_key_size--; } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ page_tree_value->local_key = &( data[ data_offset ] ); data_offset += page_tree_value->local_key_size; page_tree_value->data = &( data[ data_offset ] ); page_tree_value->data_size = data_size - data_offset; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page tree value data:\n", function ); libcnotify_print_data( page_tree_value->data, page_tree_value->data_size, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } #endif return( 1 ); } libesedb-20240420/libesedb/Makefile.in0000644000175000017500000013065214610746265020220 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = libesedb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = libesedb_definitions.h libesedb.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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libesedb_la_DEPENDENCIES = am_libesedb_la_OBJECTS = libesedb.lo libesedb_block_descriptor.lo \ libesedb_block_tree.lo libesedb_block_tree_node.lo \ libesedb_catalog.lo libesedb_catalog_definition.lo \ libesedb_checksum.lo libesedb_codepage.lo libesedb_column.lo \ libesedb_column_type.lo libesedb_compression.lo \ libesedb_data_definition.lo libesedb_data_segment.lo \ libesedb_database.lo libesedb_debug.lo libesedb_error.lo \ libesedb_file.lo libesedb_file_header.lo libesedb_i18n.lo \ libesedb_index.lo libesedb_io_handle.lo libesedb_lcid.lo \ libesedb_leaf_page_descriptor.lo libesedb_long_value.lo \ libesedb_multi_value.lo libesedb_notify.lo libesedb_page.lo \ libesedb_page_header.lo libesedb_page_tree.lo \ libesedb_page_tree_key.lo libesedb_page_tree_value.lo \ libesedb_page_value.lo libesedb_record.lo \ libesedb_record_value.lo libesedb_root_page_header.lo \ libesedb_space_tree.lo libesedb_space_tree_value.lo \ libesedb_support.lo libesedb_table.lo \ libesedb_table_definition.lo libesedb_value_data_handle.lo libesedb_la_OBJECTS = $(am_libesedb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libesedb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libesedb_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libesedb.Plo \ ./$(DEPDIR)/libesedb_block_descriptor.Plo \ ./$(DEPDIR)/libesedb_block_tree.Plo \ ./$(DEPDIR)/libesedb_block_tree_node.Plo \ ./$(DEPDIR)/libesedb_catalog.Plo \ ./$(DEPDIR)/libesedb_catalog_definition.Plo \ ./$(DEPDIR)/libesedb_checksum.Plo \ ./$(DEPDIR)/libesedb_codepage.Plo \ ./$(DEPDIR)/libesedb_column.Plo \ ./$(DEPDIR)/libesedb_column_type.Plo \ ./$(DEPDIR)/libesedb_compression.Plo \ ./$(DEPDIR)/libesedb_data_definition.Plo \ ./$(DEPDIR)/libesedb_data_segment.Plo \ ./$(DEPDIR)/libesedb_database.Plo \ ./$(DEPDIR)/libesedb_debug.Plo ./$(DEPDIR)/libesedb_error.Plo \ ./$(DEPDIR)/libesedb_file.Plo \ ./$(DEPDIR)/libesedb_file_header.Plo \ ./$(DEPDIR)/libesedb_i18n.Plo ./$(DEPDIR)/libesedb_index.Plo \ ./$(DEPDIR)/libesedb_io_handle.Plo \ ./$(DEPDIR)/libesedb_lcid.Plo \ ./$(DEPDIR)/libesedb_leaf_page_descriptor.Plo \ ./$(DEPDIR)/libesedb_long_value.Plo \ ./$(DEPDIR)/libesedb_multi_value.Plo \ ./$(DEPDIR)/libesedb_notify.Plo ./$(DEPDIR)/libesedb_page.Plo \ ./$(DEPDIR)/libesedb_page_header.Plo \ ./$(DEPDIR)/libesedb_page_tree.Plo \ ./$(DEPDIR)/libesedb_page_tree_key.Plo \ ./$(DEPDIR)/libesedb_page_tree_value.Plo \ ./$(DEPDIR)/libesedb_page_value.Plo \ ./$(DEPDIR)/libesedb_record.Plo \ ./$(DEPDIR)/libesedb_record_value.Plo \ ./$(DEPDIR)/libesedb_root_page_header.Plo \ ./$(DEPDIR)/libesedb_space_tree.Plo \ ./$(DEPDIR)/libesedb_space_tree_value.Plo \ ./$(DEPDIR)/libesedb_support.Plo \ ./$(DEPDIR)/libesedb_table.Plo \ ./$(DEPDIR)/libesedb_table_definition.Plo \ ./$(DEPDIR)/libesedb_value_data_handle.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libesedb_la_SOURCES) DIST_SOURCES = $(libesedb_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libesedb.rc.in \ $(srcdir)/libesedb_definitions.h.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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 = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_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@ \ @PTHREAD_CPPFLAGS@ \ @LIBESEDB_DLL_EXPORT@ lib_LTLIBRARIES = libesedb.la libesedb_la_SOURCES = \ esedb_file_header.h \ esedb_page.h \ esedb_page_values.h \ libesedb.c \ libesedb_block_descriptor.c libesedb_block_descriptor.h \ libesedb_block_tree.c libesedb_block_tree.h \ libesedb_block_tree_node.c libesedb_block_tree_node.h \ libesedb_catalog.c libesedb_catalog.h \ libesedb_catalog_definition.c libesedb_catalog_definition.h \ libesedb_checksum.c libesedb_checksum.h \ libesedb_codepage.c libesedb_codepage.h \ libesedb_column.c libesedb_column.h \ libesedb_column_type.c libesedb_column_type.h \ libesedb_compression.c libesedb_compression.h \ libesedb_data_definition.c libesedb_data_definition.h \ libesedb_data_segment.c libesedb_data_segment.h \ libesedb_database.c libesedb_database.h \ libesedb_debug.c libesedb_debug.h \ libesedb_definitions.h \ libesedb_error.c libesedb_error.h \ libesedb_extern.h \ libesedb_file.c libesedb_file.h \ libesedb_file_header.c libesedb_file_header.h \ libesedb_i18n.c libesedb_i18n.h \ libesedb_index.c libesedb_index.h \ libesedb_io_handle.c libesedb_io_handle.h \ libesedb_lcid.c libesedb_lcid.h \ libesedb_leaf_page_descriptor.c libesedb_leaf_page_descriptor.h \ libesedb_libbfio.h \ libesedb_libcdata.h \ libesedb_libcerror.h \ libesedb_libclocale.h \ libesedb_libcnotify.h \ libesedb_libfcache.h \ libesedb_libfdata.h \ libesedb_libfvalue.h \ libesedb_libfwnt.h \ libesedb_libuna.h \ libesedb_long_value.c libesedb_long_value.h \ libesedb_multi_value.c libesedb_multi_value.h \ libesedb_notify.c libesedb_notify.h \ libesedb_page.c libesedb_page.h \ libesedb_page_header.c libesedb_page_header.h \ libesedb_page_tree.c libesedb_page_tree.h \ libesedb_page_tree_key.c libesedb_page_tree_key.h \ libesedb_page_tree_value.c libesedb_page_tree_value.h \ libesedb_page_value.c libesedb_page_value.h \ libesedb_record.c libesedb_record.h \ libesedb_record_value.c libesedb_record_value.h \ libesedb_root_page_header.c libesedb_root_page_header.h \ libesedb_space_tree.c libesedb_space_tree.h \ libesedb_space_tree_value.c libesedb_space_tree_value.h \ libesedb_support.c libesedb_support.h \ libesedb_table.c libesedb_table.h \ libesedb_table_definition.c libesedb_table_definition.h \ libesedb_types.h \ libesedb_unused.h \ libesedb_value_data_handle.c libesedb_value_data_handle.h libesedb_la_LIBADD = \ @LIBCERROR_LIBADD@ \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @PTHREAD_LIBADD@ libesedb_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libesedb_definitions.h.in \ libesedb.rc \ libesedb.rc.in DISTCLEANFILES = \ libesedb_definitions.h \ libesedb.rc \ Makefile \ 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 libesedb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libesedb/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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): libesedb_definitions.h: $(top_builddir)/config.status $(srcdir)/libesedb_definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libesedb.rc: $(top_builddir)/config.status $(srcdir)/libesedb.rc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @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 " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libesedb.la: $(libesedb_la_OBJECTS) $(libesedb_la_DEPENDENCIES) $(EXTRA_libesedb_la_DEPENDENCIES) $(AM_V_CCLD)$(libesedb_la_LINK) -rpath $(libdir) $(libesedb_la_OBJECTS) $(libesedb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_block_descriptor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_block_tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_block_tree_node.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_catalog.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_catalog_definition.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_checksum.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_codepage.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_column.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_column_type.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_compression.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_data_definition.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_data_segment.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_database.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_file_header.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_i18n.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_index.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_io_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_lcid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_leaf_page_descriptor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_long_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_multi_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_notify.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_header.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_tree_key.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_tree_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_record_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_root_page_header.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_space_tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_space_tree_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_table.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_table_definition.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_value_data_handle.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libesedb.Plo -rm -f ./$(DEPDIR)/libesedb_block_descriptor.Plo -rm -f ./$(DEPDIR)/libesedb_block_tree.Plo -rm -f ./$(DEPDIR)/libesedb_block_tree_node.Plo -rm -f ./$(DEPDIR)/libesedb_catalog.Plo -rm -f ./$(DEPDIR)/libesedb_catalog_definition.Plo -rm -f ./$(DEPDIR)/libesedb_checksum.Plo -rm -f ./$(DEPDIR)/libesedb_codepage.Plo -rm -f ./$(DEPDIR)/libesedb_column.Plo -rm -f ./$(DEPDIR)/libesedb_column_type.Plo -rm -f ./$(DEPDIR)/libesedb_compression.Plo -rm -f ./$(DEPDIR)/libesedb_data_definition.Plo -rm -f ./$(DEPDIR)/libesedb_data_segment.Plo -rm -f ./$(DEPDIR)/libesedb_database.Plo -rm -f ./$(DEPDIR)/libesedb_debug.Plo -rm -f ./$(DEPDIR)/libesedb_error.Plo -rm -f ./$(DEPDIR)/libesedb_file.Plo -rm -f ./$(DEPDIR)/libesedb_file_header.Plo -rm -f ./$(DEPDIR)/libesedb_i18n.Plo -rm -f ./$(DEPDIR)/libesedb_index.Plo -rm -f ./$(DEPDIR)/libesedb_io_handle.Plo -rm -f ./$(DEPDIR)/libesedb_lcid.Plo -rm -f ./$(DEPDIR)/libesedb_leaf_page_descriptor.Plo -rm -f ./$(DEPDIR)/libesedb_long_value.Plo -rm -f ./$(DEPDIR)/libesedb_multi_value.Plo -rm -f ./$(DEPDIR)/libesedb_notify.Plo -rm -f ./$(DEPDIR)/libesedb_page.Plo -rm -f ./$(DEPDIR)/libesedb_page_header.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree_key.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree_value.Plo -rm -f ./$(DEPDIR)/libesedb_page_value.Plo -rm -f ./$(DEPDIR)/libesedb_record.Plo -rm -f ./$(DEPDIR)/libesedb_record_value.Plo -rm -f ./$(DEPDIR)/libesedb_root_page_header.Plo -rm -f ./$(DEPDIR)/libesedb_space_tree.Plo -rm -f ./$(DEPDIR)/libesedb_space_tree_value.Plo -rm -f ./$(DEPDIR)/libesedb_support.Plo -rm -f ./$(DEPDIR)/libesedb_table.Plo -rm -f ./$(DEPDIR)/libesedb_table_definition.Plo -rm -f ./$(DEPDIR)/libesedb_value_data_handle.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libesedb.Plo -rm -f ./$(DEPDIR)/libesedb_block_descriptor.Plo -rm -f ./$(DEPDIR)/libesedb_block_tree.Plo -rm -f ./$(DEPDIR)/libesedb_block_tree_node.Plo -rm -f ./$(DEPDIR)/libesedb_catalog.Plo -rm -f ./$(DEPDIR)/libesedb_catalog_definition.Plo -rm -f ./$(DEPDIR)/libesedb_checksum.Plo -rm -f ./$(DEPDIR)/libesedb_codepage.Plo -rm -f ./$(DEPDIR)/libesedb_column.Plo -rm -f ./$(DEPDIR)/libesedb_column_type.Plo -rm -f ./$(DEPDIR)/libesedb_compression.Plo -rm -f ./$(DEPDIR)/libesedb_data_definition.Plo -rm -f ./$(DEPDIR)/libesedb_data_segment.Plo -rm -f ./$(DEPDIR)/libesedb_database.Plo -rm -f ./$(DEPDIR)/libesedb_debug.Plo -rm -f ./$(DEPDIR)/libesedb_error.Plo -rm -f ./$(DEPDIR)/libesedb_file.Plo -rm -f ./$(DEPDIR)/libesedb_file_header.Plo -rm -f ./$(DEPDIR)/libesedb_i18n.Plo -rm -f ./$(DEPDIR)/libesedb_index.Plo -rm -f ./$(DEPDIR)/libesedb_io_handle.Plo -rm -f ./$(DEPDIR)/libesedb_lcid.Plo -rm -f ./$(DEPDIR)/libesedb_leaf_page_descriptor.Plo -rm -f ./$(DEPDIR)/libesedb_long_value.Plo -rm -f ./$(DEPDIR)/libesedb_multi_value.Plo -rm -f ./$(DEPDIR)/libesedb_notify.Plo -rm -f ./$(DEPDIR)/libesedb_page.Plo -rm -f ./$(DEPDIR)/libesedb_page_header.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree_key.Plo -rm -f ./$(DEPDIR)/libesedb_page_tree_value.Plo -rm -f ./$(DEPDIR)/libesedb_page_value.Plo -rm -f ./$(DEPDIR)/libesedb_record.Plo -rm -f ./$(DEPDIR)/libesedb_record_value.Plo -rm -f ./$(DEPDIR)/libesedb_root_page_header.Plo -rm -f ./$(DEPDIR)/libesedb_space_tree.Plo -rm -f ./$(DEPDIR)/libesedb_space_tree_value.Plo -rm -f ./$(DEPDIR)/libesedb_support.Plo -rm -f ./$(DEPDIR)/libesedb_table.Plo -rm -f ./$(DEPDIR)/libesedb_table_definition.Plo -rm -f ./$(DEPDIR)/libesedb_value_data_handle.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libesedb ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libesedb_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: libesedb-20240420/libesedb/libesedb_database.h0000644000175000017500000000413514610727250021706 0ustar00lordyestalordyesta/* * Database functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_DATABASE_H ) #define _LIBESEDB_DATABASE_H #include #include #include "libesedb_block_tree.h" #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page_tree.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_database libesedb_database_t; struct libesedb_database { /* The page tree */ libesedb_page_tree_t *page_tree; /* The page block tree */ libesedb_block_tree_t *page_block_tree; }; int libesedb_database_initialize( libesedb_database_t **database, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ); int libesedb_database_free( libesedb_database_t **database, libcerror_error_t **error ); int libesedb_database_read_values_from_leaf_page( libesedb_database_t *database, libesedb_page_t *page, int *current_leaf_value_index, libcerror_error_t **error ); int libesedb_database_read_file_io_handle( libesedb_database_t *database, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_DATABASE_H ) */ libesedb-20240420/libesedb/libesedb_compression.c0000644000175000017500000007353714610727250022512 0ustar00lordyestalordyesta/* * Compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_compression.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfwnt.h" #include "libesedb_libuna.h" /* Retrieves the uncompressed size of the 7-bit compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_7bit_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libesedb_compression_7bit_decompress_get_size"; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", 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[ 0 ] == 0x18 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported leading byte: 0x%02" PRIx8 ".", function, compressed_data[ 0 ] ); return( -1 ); } *uncompressed_data_size = ( ( compressed_data_size - 1 ) * 8 ) / 7; return( 1 ); } /* Decompresses 7-bit compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_7bit_decompress( const 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 = "libesedb_compression_7bit_decompress"; size_t compressed_data_index = 0; size_t uncompressed_data_index = 0; uint16_t value_16bit = 0; uint8_t bit_index = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", 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 ); } if( uncompressed_data_size < ( ( ( compressed_data_size - 1 ) * 8 ) / 7 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported leading byte: 0x%02" PRIx8 ".", function, compressed_data[ 0 ] ); return( -1 ); } for( compressed_data_index = 1; compressed_data_index < compressed_data_size; compressed_data_index++ ) { value_16bit |= (uint16_t) compressed_data[ compressed_data_index ] << bit_index; uncompressed_data[ uncompressed_data_index++ ] = (uint8_t) ( value_16bit & 0x7f ); value_16bit >>= 7; bit_index++; if( bit_index == 7 ) { uncompressed_data[ uncompressed_data_index++ ] = (uint8_t) ( value_16bit & 0x7f ); value_16bit >>= 7; bit_index = 0; } } if( value_16bit != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported remainder: 0x%02" PRIx16 ".", function, value_16bit ); return( -1 ); } return( 1 ); } /* Retrieves the uncompressed size of LZXPRESS compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_lzxpress_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libesedb_compression_lzxpress_decompress_get_size"; 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( compressed_data_size < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", 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[ 0 ] != 0x18 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported leading byte: 0x%02" PRIx8 ".", function, compressed_data[ 0 ] ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( compressed_data[ 1 ] ), *uncompressed_data_size ); return( 1 ); } /* Decompresses LZXPRESS compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_lzxpress_decompress( const 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 = "libesedb_compression_lzxpress_decompress"; 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 < 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] != 0x18 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported leading byte: 0x%02" PRIx8 ".", function, compressed_data[ 0 ] ); return( -1 ); } if( libfwnt_lzxpress_decompress( &( compressed_data[ 3 ] ), compressed_data_size - 3, uncompressed_data, &uncompressed_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to decompress LZXPRESS compressed data.", function ); return( -1 ); } return( 1 ); } /* Retrieves the uncompressed size of the compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_decompress_get_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libesedb_compression_decompress_get_size"; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress_get_size( compressed_data, compressed_data_size, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); return( -1 ); } return( 1 ); } /* Decompresses compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_decompress( const 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 = "libesedb_compression_decompress"; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_get_utf8_string_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *utf8_string_size, libcerror_error_t **error ) { uint8_t *uncompressed_data = NULL; static char *function = "libesedb_compression_get_utf8_string_size"; size_t uncompressed_data_size = 0; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); goto on_error; } if( ( uncompressed_data_size == 0 ) || ( uncompressed_data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); goto on_error; } uncompressed_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * uncompressed_data_size ); if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create uncompressed data.", function ); goto on_error; } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); goto on_error; } result = 0; if( ( ( uncompressed_data_size % 2 ) == 0 ) && ( ( compressed_data[ 0 ] == 0x18 ) || ( ( compressed_data[ 0 ] & 0x10 ) == 0 ) ) ) { result = libuna_utf8_string_size_from_utf16_stream( uncompressed_data, uncompressed_data_size, LIBUNA_ENDIAN_LITTLE, 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 of UTF-16 stream.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { result = libuna_utf8_string_size_from_utf8_stream( uncompressed_data, uncompressed_data_size, 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 of UTF-8 stream.", function ); goto on_error; } } memory_free( uncompressed_data ); uncompressed_data = NULL; return( 1 ); on_error: if( uncompressed_data != NULL ) { memory_free( uncompressed_data ); } return( -1 ); } /* Copies compressed data to an UTF-8 string * Returns 1 on success or -1 on error */ int libesedb_compression_copy_to_utf8_string( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { uint8_t *uncompressed_data = NULL; static char *function = "libesedb_compression_copy_to_utf8_string"; size_t uncompressed_data_size = 0; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); goto on_error; } if( ( uncompressed_data_size == 0 ) || ( uncompressed_data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); goto on_error; } uncompressed_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * uncompressed_data_size ); if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create uncompressed data.", function ); goto on_error; } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); goto on_error; } result = 0; if( ( ( uncompressed_data_size % 2 ) == 0 ) && ( ( compressed_data[ 0 ] == 0x18 ) || ( ( compressed_data[ 0 ] & 0x10 ) == 0 ) ) ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, uncompressed_data, uncompressed_data_size, LIBUNA_ENDIAN_LITTLE, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { result = libuna_utf8_string_copy_from_utf8_stream( utf8_string, utf8_string_size, uncompressed_data, uncompressed_data_size, error ); if( result != 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 ); goto on_error; } } memory_free( uncompressed_data ); uncompressed_data = NULL; return( 1 ); on_error: if( uncompressed_data != NULL ) { memory_free( uncompressed_data ); } return( -1 ); } /* Retrieves the UTF-16 string size of compressed data * Returns 1 on success or -1 on error */ int libesedb_compression_get_utf16_string_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *utf16_string_size, libcerror_error_t **error ) { uint8_t *uncompressed_data = NULL; static char *function = "libesedb_compression_get_utf16_string_size"; size_t uncompressed_data_size = 0; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); goto on_error; } if( ( uncompressed_data_size == 0 ) || ( uncompressed_data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); goto on_error; } uncompressed_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * uncompressed_data_size ); if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create uncompressed data.", function ); goto on_error; } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); goto on_error; } result = 0; if( ( ( uncompressed_data_size % 2 ) == 0 ) && ( ( compressed_data[ 0 ] == 0x18 ) || ( ( compressed_data[ 0 ] & 0x10 ) == 0 ) ) ) { result = libuna_utf16_string_size_from_utf16_stream( uncompressed_data, uncompressed_data_size, LIBUNA_ENDIAN_LITTLE, 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 of UTF-16 stream.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { result = libuna_utf16_string_size_from_utf8_stream( uncompressed_data, uncompressed_data_size, 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 of UTF-8 stream.", function ); goto on_error; } } memory_free( uncompressed_data ); uncompressed_data = NULL; return( 1 ); on_error: if( uncompressed_data != NULL ) { memory_free( uncompressed_data ); } return( -1 ); } /* Copies compressed data to an UTF-16 string * Returns 1 on success or -1 on error */ int libesedb_compression_copy_to_utf16_string( const uint8_t *compressed_data, size_t compressed_data_size, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { uint8_t *uncompressed_data = NULL; static char *function = "libesedb_compression_copy_to_utf16_string"; size_t uncompressed_data_size = 0; int result = 0; 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( compressed_data_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress_get_size( compressed_data, compressed_data_size, &uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); goto on_error; } if( ( uncompressed_data_size == 0 ) || ( uncompressed_data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); goto on_error; } uncompressed_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * uncompressed_data_size ); if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create uncompressed data.", function ); goto on_error; } if( compressed_data[ 0 ] == 0x18 ) { result = libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } else { result = libesedb_compression_7bit_decompress( compressed_data, compressed_data_size, uncompressed_data, uncompressed_data_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); goto on_error; } result = 0; if( ( ( uncompressed_data_size % 2 ) == 0 ) && ( ( compressed_data[ 0 ] == 0x18 ) || ( ( compressed_data[ 0 ] & 0x10 ) == 0 ) ) ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, uncompressed_data, uncompressed_data_size, LIBUNA_ENDIAN_LITTLE, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { result = libuna_utf16_string_copy_from_utf8_stream( utf16_string, utf16_string_size, uncompressed_data, uncompressed_data_size, error ); if( result != 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 ); goto on_error; } } memory_free( uncompressed_data ); uncompressed_data = NULL; return( 1 ); on_error: if( uncompressed_data != NULL ) { memory_free( uncompressed_data ); } return( -1 ); } libesedb-20240420/libesedb/libesedb_file_header.h0000644000175000017500000000422314610727250022367 0ustar00lordyestalordyesta/* * File header functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_FILE_HEADER_H ) #define _LIBESEDB_FILE_HEADER_H #include #include #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_file_header libesedb_file_header_t; struct libesedb_file_header { /* The file type */ uint32_t file_type; /* The creation format version */ uint32_t creation_format_version; /* The creation format revision */ uint32_t creation_format_revision; /* The format version */ uint32_t format_revision; /* The format revision */ uint32_t format_version; /* The database state */ uint32_t database_state; /* The page size */ uint32_t page_size; }; int libesedb_file_header_initialize( libesedb_file_header_t **file_header, libcerror_error_t **error ); int libesedb_file_header_free( libesedb_file_header_t **file_header, libcerror_error_t **error ); int libesedb_file_header_read_data( libesedb_file_header_t *file_header, const uint8_t *data, size_t data_size, libcerror_error_t **error ); int libesedb_file_header_read_file_io_handle( libesedb_file_header_t *file_header, libbfio_handle_t *file_io_handle, off64_t file_offset, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_FILE_HEADER_H ) */ libesedb-20240420/libesedb/libesedb_page_tree_value.h0000644000175000017500000000357214610727250023275 0ustar00lordyestalordyesta/* * Page tree value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_TREE_VALUE_H ) #define _LIBESEDB_PAGE_TREE_VALUE_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page_tree_value libesedb_page_tree_value_t; struct libesedb_page_tree_value { /* The common key size */ uint16_t common_key_size; /* The local key */ const uint8_t *local_key; /* The local key size */ uint16_t local_key_size; /* The data */ const uint8_t *data; /* The data size */ size_t data_size; }; int libesedb_page_tree_value_initialize( libesedb_page_tree_value_t **page_tree_value, libcerror_error_t **error ); int libesedb_page_tree_value_free( libesedb_page_tree_value_t **page_tree_value, libcerror_error_t **error ); int libesedb_page_tree_value_read_data( libesedb_page_tree_value_t *page_tree_value, const uint8_t *data, size_t data_size, uint8_t page_value_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_TREE_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_value_data_handle.h0000644000175000017500000000257214610727250023565 0ustar00lordyestalordyesta/* * Value data handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_VALUE_DATA_HANDLE_H ) #define _LIBESEDB_VALUE_DATA_HANDLE_H #include #include #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_libfvalue.h" #if defined( __cplusplus ) extern "C" { #endif int libesedb_value_data_handle_read_value_entries( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint32_t data_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_VALUE_DATA_HANDLE_H ) */ libesedb-20240420/libesedb/libesedb_page.h0000644000175000017500000000742614610727250021064 0ustar00lordyestalordyesta/* * Page functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_H ) #define _LIBESEDB_PAGE_H #include #include #include "libesedb_io_handle.h" #include "libesedb_libbfio.h" #include "libesedb_libcdata.h" #include "libesedb_libcerror.h" #include "libesedb_page_header.h" #include "libesedb_page_value.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page libesedb_page_t; struct libesedb_page { /* The page number */ uint32_t page_number; /* The file offset of the page */ off64_t offset; /* The header */ libesedb_page_header_t *header; /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The values array */ libcdata_array_t *values_array; }; int libesedb_page_initialize( libesedb_page_t **page, libcerror_error_t **error ); int libesedb_page_free( libesedb_page_t **page, libcerror_error_t **error ); int libesedb_page_calculate_checksums( libesedb_page_t *page, libesedb_io_handle_t *io_handle, const uint8_t *page_data, size_t page_data_size, uint32_t *ecc32_checksum, uint32_t *xor32_checksum, libcerror_error_t **error ); int libesedb_page_read_tags( libesedb_page_t *page, libesedb_io_handle_t *io_handle, const uint8_t *page_data, size_t page_data_size, uint16_t number_of_page_tags, libcerror_error_t **error ); int libesedb_page_read_values( libesedb_page_t *page, libesedb_io_handle_t *io_handle, uint8_t *page_data, size_t page_data_size, size_t page_values_data_offset, libcerror_error_t **error ); int libesedb_page_read_file_io_handle( libesedb_page_t *page, libesedb_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, off64_t file_offset, libcerror_error_t **error ); int libesedb_page_validate_root_page( libesedb_page_t *page, libcerror_error_t **error ); int libesedb_page_validate_space_tree_page( libesedb_page_t *page, libcerror_error_t **error ); int libesedb_page_validate_page( libesedb_page_t *page, libcerror_error_t **error ); int libesedb_page_get_previous_page_number( libesedb_page_t *page, uint32_t *previous_page_number, libcerror_error_t **error ); int libesedb_page_get_next_page_number( libesedb_page_t *page, uint32_t *next_page_number, libcerror_error_t **error ); int libesedb_page_get_father_data_page_object_identifier( libesedb_page_t *page, uint32_t *father_data_page_object_identifier, libcerror_error_t **error ); int libesedb_page_get_flags( libesedb_page_t *page, uint32_t *flags, libcerror_error_t **error ); int libesedb_page_get_number_of_values( libesedb_page_t *page, uint16_t *number_of_values, libcerror_error_t **error ); int libesedb_page_get_value_by_index( libesedb_page_t *page, uint16_t value_index, libesedb_page_value_t **page_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_H ) */ libesedb-20240420/libesedb/libesedb_catalog_definition.c0000644000175000017500000014201614610727250023760 0ustar00lordyestalordyesta/* * Catalog definition functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "libesedb_catalog_definition.h" #include "libesedb_codepage.h" #include "libesedb_column_type.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_lcid.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libuna.h" #include "libesedb_unused.h" #include "esedb_page_values.h" #if !defined( LIBESEDB_ATTRIBUTE_FALLTHROUGH ) #if defined( __GNUC__ ) && __GNUC__ >= 7 #define LIBESEDB_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough)) #else #define LIBESEDB_ATTRIBUTE_FALLTHROUGH #endif #endif /* Creates a catalog definition * Make sure the value catalog_definition is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_initialize( libesedb_catalog_definition_t **catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_initialize"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( *catalog_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid catalog definition value already set.", function ); return( -1 ); } *catalog_definition = memory_allocate_structure( libesedb_catalog_definition_t ); if( *catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create catalog definition.", function ); goto on_error; } if( memory_set( *catalog_definition, 0, sizeof( libesedb_catalog_definition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear catalog definition.", function ); goto on_error; } return( 1 ); on_error: if( *catalog_definition != NULL ) { memory_free( *catalog_definition ); *catalog_definition = NULL; } return( -1 ); } /* Frees a catalog definition * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_free( libesedb_catalog_definition_t **catalog_definition, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_free"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( *catalog_definition != NULL ) { if( ( *catalog_definition )->name != NULL ) { memory_free( ( *catalog_definition )->name ); } #if defined( HAVE_DEBUG_OUTPUT ) if( ( *catalog_definition )->name_string != NULL ) { memory_free( ( *catalog_definition )->name_string ); } #endif if( ( *catalog_definition )->template_name != NULL ) { memory_free( ( *catalog_definition )->template_name ); } if( ( *catalog_definition )->default_value != NULL ) { memory_free( ( *catalog_definition )->default_value ); } memory_free( *catalog_definition ); *catalog_definition = NULL; } return( 1 ); } /* Reads the catalog definition * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_read_data( libesedb_catalog_definition_t *catalog_definition, const uint8_t *data, size_t data_size, int ascii_codepage LIBESEDB_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { const uint8_t *fixed_size_data_type_value_data = NULL; const uint8_t *variable_size_data_type_value_data = NULL; static char *function = "libesedb_catalog_definition_read_data"; size_t remaining_data_size = 0; size_t variable_size_data_type_value_data_offset = 0; uint16_t calculated_variable_size_data_types_offset = 0; uint16_t data_type_number = 0; uint16_t data_type_size = 0; uint16_t previous_variable_size_data_type_size = 0; uint16_t variable_size_data_type_size = 0; uint16_t variable_size_data_types_offset = 0; uint8_t last_fixed_size_data_type = 0; uint8_t last_variable_size_data_type = 0; uint8_t number_of_variable_size_data_types = 0; uint8_t variable_size_data_type_iterator = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *value_string = 0; size_t value_string_size = 0; uint32_t value_32bit = 0; uint16_t record_offset = 0; uint16_t value_16bit = 0; int result = 0; #endif LIBESEDB_UNREFERENCED_PARAMETER( ascii_codepage ) if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", 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( data_size < sizeof( esedb_data_definition_header_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: data too small.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data definition:\n", function ); libcnotify_print_data( data, data_size, 0 ); } #endif last_fixed_size_data_type = ( (esedb_data_definition_header_t *) data )->last_fixed_size_data_type; last_variable_size_data_type = ( (esedb_data_definition_header_t *) data )->last_variable_size_data_type; byte_stream_copy_to_uint16_little_endian( ( (esedb_data_definition_header_t *) data )->variable_size_data_types_offset, variable_size_data_types_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: last fixed size data type\t\t\t: %" PRIu8 "\n", function, last_fixed_size_data_type ); libcnotify_printf( "%s: last variable size data type\t\t\t: %" PRIu8 "\n", function, last_variable_size_data_type ); libcnotify_printf( "%s: variable size data types offset\t\t\t: %" PRIu16 "\n", function, variable_size_data_types_offset ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* As far as the documentation states * the column data FIELD structure is 16 bytes of size */ if( last_fixed_size_data_type < 5 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: last fixed size data type too small.", function ); return( -1 ); } if( last_fixed_size_data_type > 13 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported last fixed size data type: %" PRIu8 ".", function, last_fixed_size_data_type ); return( -1 ); } if( last_variable_size_data_type > 127 ) { number_of_variable_size_data_types = last_variable_size_data_type - 127; } calculated_variable_size_data_types_offset += sizeof( esedb_data_definition_header_t ); /* Use a fall through to determine the size of the fixed size data types */ switch( last_fixed_size_data_type ) { case 13: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 12: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 11: calculated_variable_size_data_types_offset += 2; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 10: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 9: calculated_variable_size_data_types_offset += 2; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 8: if( last_variable_size_data_type > 127 ) { calculated_variable_size_data_types_offset += 1 * number_of_variable_size_data_types; } LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 7: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 6: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 5: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 4: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 3: calculated_variable_size_data_types_offset += 4; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 2: calculated_variable_size_data_types_offset += 2; LIBESEDB_ATTRIBUTE_FALLTHROUGH; case 1: calculated_variable_size_data_types_offset += 4; break; } if( ( variable_size_data_types_offset < sizeof( esedb_data_definition_header_t ) ) || ( variable_size_data_types_offset > data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: variable size data types offset value out of bounds.", function ); return( -1 ); } fixed_size_data_type_value_data = &( data[ sizeof( esedb_data_definition_header_t ) ] ); byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->father_data_page_object_identifier, catalog_definition->father_data_page_object_identifier ); byte_stream_copy_to_uint16_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->type, catalog_definition->type ); byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->identifier, catalog_definition->identifier ); if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->column_type, catalog_definition->column_type ); } else { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->father_data_page_number, catalog_definition->father_data_page_number ); } byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->space_usage, catalog_definition->size ); if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->codepage, catalog_definition->codepage ); } if( last_fixed_size_data_type >= 10 ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->lc_map_flags, catalog_definition->lcmap_flags ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { data_type_number = 1; libcnotify_printf( "%s: (%03" PRIu16 ") father data page (FDP) object identifier\t: %" PRIu32 "\n", function, data_type_number++, catalog_definition->father_data_page_object_identifier ); libcnotify_printf( "%s: (%03" PRIu16 ") type\t\t\t\t\t: 0x%04" PRIx16 " ", function, data_type_number++, catalog_definition->type ); libesedb_debug_print_page_value_definition_type( catalog_definition->type ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: (%03" PRIu16 ") identifier\t\t\t\t\t: %" PRIu32 "\n", function, data_type_number++, catalog_definition->identifier ); if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { libcnotify_printf( "%s: (%03" PRIu16 ") column type\t\t\t\t: %" PRIu32 " (%s) %s\n", function, data_type_number++, catalog_definition->column_type, libesedb_column_type_get_identifier( catalog_definition->column_type ), libesedb_column_type_get_description( catalog_definition->column_type ) ); } else { libcnotify_printf( "%s: (%03" PRIu16 ") father data page (FDP) number\t\t: %" PRIu32 "\n", function, data_type_number++, catalog_definition->father_data_page_number ); } libcnotify_printf( "%s: (%03" PRIu16 ") space usage\t\t\t\t: %" PRIu32 "\n", function, data_type_number++, catalog_definition->size ); byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->flags, value_32bit ); if( last_fixed_size_data_type >= 6 ) { if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { libcnotify_printf( "%s: (%03" PRIu16 ") flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, data_type_number++, value_32bit ); libesedb_debug_print_column_group_of_bits( value_32bit ); libcnotify_printf( "\n" ); } else if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX ) { libcnotify_printf( "%s: (%03" PRIu16 ") flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, data_type_number++, value_32bit ); libesedb_debug_print_index_group_of_bits( value_32bit ); libcnotify_printf( "\n" ); } else { libcnotify_printf( "%s: (%03" PRIu16 ") flags\t\t\t\t\t: 0x%08" PRIx32 "\n", function, data_type_number++, value_32bit ); } } if( last_fixed_size_data_type >= 7 ) { if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_COLUMN ) { libcnotify_printf( "%s: (%03" PRIu16 ") codepage\t\t\t\t\t: %" PRIu32 "", function, data_type_number++, catalog_definition->codepage ); if( catalog_definition->codepage != 0 ) { libcnotify_printf( " (%s) %s", libesedb_codepage_get_identifier( catalog_definition->codepage ), libesedb_codepage_get_description( catalog_definition->codepage ) ); } libcnotify_printf( "\n" ); } else if( catalog_definition->type == LIBESEDB_CATALOG_DEFINITION_TYPE_INDEX ) { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->locale_identifier, value_32bit ); libcnotify_printf( "%s: (%03" PRIu16 ") locale identifier\t\t\t\t: 0x%08" PRIx32 " (%s)\n", function, data_type_number++, value_32bit, libesedb_lcid_language_tag_get_identifier( (uint16_t) value_32bit ), libesedb_lcid_language_tag_get_description( (uint16_t) value_32bit ) ); } else { byte_stream_copy_to_uint32_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->number_of_pages, value_32bit ); libcnotify_printf( "%s: (%03" PRIu16 ") number of pages\t\t\t\t: %" PRIu32 "\n", function, data_type_number++, value_32bit ); } } if( last_fixed_size_data_type >= 8 ) { libcnotify_printf( "%s: (%03" PRIu16 ") root flag\t\t\t\t\t: 0x%02" PRIx8 "\n", function, data_type_number++, ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->root_flag ); } if( last_fixed_size_data_type >= 9 ) { byte_stream_copy_to_uint16_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->record_offset, record_offset ); libcnotify_printf( "%s: (%03" PRIu16 ") record offset\t\t\t\t: %" PRIu16 "\n", function, data_type_number++, record_offset ); } if( last_fixed_size_data_type >= 10 ) { libcnotify_printf( "%s: (%03" PRIu16 ") locale map (LCMAP) flags\t\t\t: 0x%08" PRIx32 "\n", function, data_type_number++, catalog_definition->lcmap_flags ); libesedb_debug_print_lcmap_flags( catalog_definition->lcmap_flags ); } if( last_fixed_size_data_type >= 11 ) { byte_stream_copy_to_uint16_little_endian( ( (esedb_data_definition_t *) fixed_size_data_type_value_data )->key_most, value_16bit ); libcnotify_printf( "%s: (%03" PRIu16 ") key most\t\t\t\t: 0x04%" PRIx16 "\n", function, data_type_number++, value_16bit ); } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( variable_size_data_types_offset > calculated_variable_size_data_types_offset ) { libcnotify_printf( "%s: fixed size data types trailing data:\n", function ); libcnotify_print_data( &( data[ calculated_variable_size_data_types_offset ] ), variable_size_data_types_offset - calculated_variable_size_data_types_offset, 0 ); } } #endif if( number_of_variable_size_data_types > 0 ) { variable_size_data_type_value_data_offset = variable_size_data_types_offset + ( number_of_variable_size_data_types * 2 ); if( variable_size_data_type_value_data_offset > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: variable size data type value data offset exceeds data.", function ); return( -1 ); } variable_size_data_type_value_data = &( data[ variable_size_data_type_value_data_offset ] ); remaining_data_size = data_size - variable_size_data_type_value_data_offset; data_type_number = 128; for( variable_size_data_type_iterator = 0; variable_size_data_type_iterator < number_of_variable_size_data_types; variable_size_data_type_iterator++ ) { if( variable_size_data_types_offset > ( data_size - 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: variable size data types offset value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( data[ variable_size_data_types_offset ] ), variable_size_data_type_size ); variable_size_data_types_offset += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") variable size data type size\t\t: 0x%04" PRIx16 " (%" PRIu16 ")\n", function, data_type_number, variable_size_data_type_size, ( ( variable_size_data_type_size & 0x8000 ) != 0 ) ? 0 : ( variable_size_data_type_size & 0x7fff ) - previous_variable_size_data_type_size ); } #endif /* The MSB signifies that the variable size data type is empty */ if( ( variable_size_data_type_size & 0x8000 ) != 0 ) { data_type_size = 0; } else { data_type_size = variable_size_data_type_size - previous_variable_size_data_type_size; if( ( previous_variable_size_data_type_size > remaining_data_size ) || ( data_type_size > ( remaining_data_size - previous_variable_size_data_type_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data type size value out of bounds.", function ); return( -1 ); } } switch( data_type_number ) { case 128: if( data_type_size > 0 ) { catalog_definition->name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_type_size ); if( catalog_definition->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name.", function ); return( -1 ); } catalog_definition->name_size = (size_t) data_type_size; if( memory_copy( catalog_definition->name, &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), catalog_definition->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name.", function ); memory_free( catalog_definition->name ); catalog_definition->name = NULL; catalog_definition->name_size = 0; return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( catalog_definition->name, catalog_definition->name_size, ascii_codepage, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( catalog_definition->name, catalog_definition->name_size, ascii_codepage, &value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of name string.", function ); return( -1 ); } catalog_definition->name_string = system_string_allocate( value_string_size ); if( catalog_definition->name_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name string.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) catalog_definition->name_string, value_string_size, catalog_definition->name, catalog_definition->name_size, ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) catalog_definition->name_string, value_string_size, catalog_definition->name, catalog_definition->name_size, ascii_codepage, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name string.", function ); memory_free( catalog_definition->name_string ); catalog_definition->name_string = NULL; return( -1 ); } libcnotify_printf( "%s: (%03" PRIu8 ") name\t\t\t\t\t: %" PRIs_SYSTEM "\n", function, data_type_number, catalog_definition->name_string ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") name\t\t\t\t\t: \n", function, data_type_number ); } #endif break; #if defined( HAVE_DEBUG_OUTPUT ) case 129: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") stats:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") stats\t\t\t\t\t: \n", function, data_type_number ); } } break; #endif case 130: if( data_type_size > 0 ) { catalog_definition->template_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_type_size ); if( catalog_definition->template_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create template name.", function ); return( -1 ); } catalog_definition->template_name_size = (size_t) data_type_size; if( memory_copy( catalog_definition->template_name, &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), catalog_definition->template_name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set template name.", function ); memory_free( catalog_definition->template_name ); catalog_definition->template_name = NULL; catalog_definition->template_name_size = 0; return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, &value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of template name string.", function ); return( -1 ); } value_string = 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 template name string.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) value_string, value_string_size, catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) value_string, value_string_size, catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set template name string.", function ); memory_free( value_string ); return( -1 ); } libcnotify_printf( "%s: (%03" PRIu8 ") template name\t\t\t\t: %" PRIs_SYSTEM "\n", function, data_type_number, value_string ); memory_free( value_string ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") template name\t\t\t\t: \n", function, data_type_number ); } #endif break; case 131: if( data_type_size > 0 ) { catalog_definition->default_value = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_type_size ); if( catalog_definition->default_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create default value.", function ); return( -1 ); } catalog_definition->default_value_size = (size_t) data_type_size; if( memory_copy( catalog_definition->default_value, &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), catalog_definition->default_value_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set default value.", function ); memory_free( catalog_definition->default_value ); catalog_definition->default_value = NULL; catalog_definition->default_value_size = 0; return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") default value:\n", function, data_type_number ); libcnotify_print_data( catalog_definition->default_value, catalog_definition->default_value_size, 0 ); } #endif } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") default value\t\t\t\t: \n", function, data_type_number ); } #endif break; #if defined( HAVE_DEBUG_OUTPUT ) case 132: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") KeyFldIDs:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") KeyFldIDs\t\t\t\t: \n", function, data_type_number ); } } break; case 133: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") VarSegMac:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") VarSegMac\t\t\t\t\t: \n", function, data_type_number ); } } break; case 134: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") ConditionalColumns:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") ConditionalColumns\t\t\t\t: \n", function, data_type_number ); } } break; case 135: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") TupleLimits:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") TupleLimits\t\t\t\t: \n", function, data_type_number ); } } break; case 136: if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu8 ") Version:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu8 ") Version\t\t\t\t: \n", function, data_type_number ); } } break; #endif default: #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( data_type_size > 0 ) { libcnotify_printf( "%s: (%03" PRIu16 ") variable size data type:\n", function, data_type_number ); libcnotify_print_data( &( variable_size_data_type_value_data[ previous_variable_size_data_type_size ] ), data_type_size, 0 ); } else { libcnotify_printf( "%s: (%03" PRIu16 ") variable size data type\t\t: \n", function, data_type_number ); } } #endif break; } if( data_type_size > 0 ) { previous_variable_size_data_type_size = variable_size_data_type_size; } data_type_number++; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Retrieves the catalog definition identifier * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_identifier( libesedb_catalog_definition_t *catalog_definition, uint32_t *identifier, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_identifier"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", 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 ); } *identifier = catalog_definition->identifier; return( 1 ); } /* Retrieves the catalog definition column type * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_column_type( libesedb_catalog_definition_t *catalog_definition, uint32_t *column_type, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_column_type"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( column_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column type.", function ); return( -1 ); } *column_type = catalog_definition->column_type; return( 1 ); } /* Retrieves the size of the UTF-8 encoded string string of the catalog definition name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf8_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf8_name_size"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( libuna_utf8_string_size_from_byte_stream( catalog_definition->name, catalog_definition->name_size, ascii_codepage, utf8_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 ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 encoded string of the catalog definition name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf8_name( libesedb_catalog_definition_t *catalog_definition, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf8_name"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, catalog_definition->name, catalog_definition->name_size, ascii_codepage, error ) != 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 size of the UTF-16 encoded string of the catalog definition name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf16_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf16_name_size"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( libuna_utf16_string_size_from_byte_stream( catalog_definition->name, catalog_definition->name_size, ascii_codepage, utf16_string_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( 1 ); } /* Retrieves the UTF-16 encoded string of the catalog definition name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf16_name( libesedb_catalog_definition_t *catalog_definition, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf16_name"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, catalog_definition->name, catalog_definition->name_size, ascii_codepage, error ) != 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 size of the UTF-8 encoded string string of the catalog definition template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf8_template_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf8_template_name_size"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->template_name == NULL ) { 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; } else { if( libuna_utf8_string_size_from_byte_stream( catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, utf8_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 ); return( -1 ); } } return( 1 ); } /* Retrieves the UTF-8 encoded string of the catalog definition template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf8_template_name( libesedb_catalog_definition_t *catalog_definition, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf8_template_name"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->template_name != NULL ) { if( libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, error ) != 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 size of the UTF-16 encoded string of the catalog definition template name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf16_template_name_size( libesedb_catalog_definition_t *catalog_definition, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf16_template_name_size"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->template_name == NULL ) { 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; } else { if( libuna_utf16_string_size_from_byte_stream( catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, utf16_string_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( 1 ); } /* Retrieves the UTF-16 encoded string of the catalog definition template name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libesedb_catalog_definition_get_utf16_template_name( libesedb_catalog_definition_t *catalog_definition, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_get_utf16_template_name"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->template_name != NULL ) { if( libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, catalog_definition->template_name, catalog_definition->template_name_size, ascii_codepage, error ) != 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 name of the table definition with a name * Returns 1 if equal, 0 if not or -1 on error */ int libesedb_catalog_definition_compare_name( libesedb_catalog_definition_t *catalog_definition, const uint8_t *name, size_t name_size, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_compare_name"; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog definition - 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( ( name_size == 0 ) || ( name_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name size value exceeds maximum.", function ); return( -1 ); } if( name_size == catalog_definition->name_size ) { if( memory_compare( catalog_definition->name, name, name_size ) == 0 ) { return( 1 ); } } return( 0 ); } /* Compares the name of the table definition with an UTF-8 encoded string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error */ int libesedb_catalog_definition_compare_name_with_utf8_string( libesedb_catalog_definition_t *catalog_definition, const uint8_t *utf8_string, size_t utf8_string_length, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_compare_name_with_utf8_string"; int result = 0; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog definition - missing name.", function ); return( -1 ); } /* TODO use ascii codepage */ result = libuna_utf8_string_compare_with_byte_stream( utf8_string, utf8_string_length, catalog_definition->name, catalog_definition->name_size, LIBUNA_CODEPAGE_WINDOWS_1252, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to compare UTF-8 string with catalog definition name.", function ); return( -1 ); } return( result ); } /* Compares the name of the table definition with an UTF-16 encoded string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error */ int libesedb_catalog_definition_compare_name_with_utf16_string( libesedb_catalog_definition_t *catalog_definition, const uint16_t *utf16_string, size_t utf16_string_length, libcerror_error_t **error ) { static char *function = "libesedb_catalog_definition_compare_name_with_utf16_string"; int result = 0; if( catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid catalog definition.", function ); return( -1 ); } if( catalog_definition->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid catalog definition - missing name.", function ); return( -1 ); } /* TODO use ascii codepage */ result = libuna_utf16_string_compare_with_byte_stream( utf16_string, utf16_string_length, catalog_definition->name, catalog_definition->name_size, LIBUNA_CODEPAGE_WINDOWS_1252, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to compare UTF-16 string with catalog definition name.", function ); return( -1 ); } return( result ); } libesedb-20240420/libesedb/libesedb_long_value.c0000644000175000017500000010107614610727250022272 0ustar00lordyestalordyesta/* * Long value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libesedb_compression.h" #include "libesedb_data_segment.h" #include "libesedb_definitions.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_libfvalue.h" #include "libesedb_long_value.h" #include "libesedb_record_value.h" /* Creates a long value * Make sure the value long_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_long_value_initialize( libesedb_long_value_t **long_value, libbfio_handle_t *file_io_handle, libesedb_io_handle_t *io_handle, libesedb_catalog_definition_t *column_catalog_definition, libfdata_list_t *data_segments_list, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_initialize"; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } if( *long_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid long value value already set.", function ); return( -1 ); } if( column_catalog_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column catalog definition.", function ); return( -1 ); } if( data_segments_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data segments list.", function ); return( -1 ); } internal_long_value = memory_allocate_structure( libesedb_internal_long_value_t ); if( internal_long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create long value.", function ); goto on_error; } if( memory_set( internal_long_value, 0, sizeof( libesedb_internal_long_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear long value.", function ); memory_free( internal_long_value ); return( -1 ); } if( libfcache_cache_initialize( &( internal_long_value->data_segments_cache ), LIBESEDB_MAXIMUM_CACHE_ENTRIES_LONG_VALUES_DATA, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data segments cache.", function ); goto on_error; } internal_long_value->file_io_handle = file_io_handle; internal_long_value->io_handle = io_handle; internal_long_value->column_catalog_definition = column_catalog_definition; internal_long_value->data_segments_list = data_segments_list; *long_value = (libesedb_long_value_t *) internal_long_value; return( 1 ); on_error: if( internal_long_value != NULL ) { if( internal_long_value->data_segments_cache != NULL ) { libfcache_cache_free( &( internal_long_value->data_segments_cache ), NULL ); } memory_free( internal_long_value ); } return( -1 ); } /* Frees a long value * Returns 1 if successful or -1 on error */ int libesedb_long_value_free( libesedb_long_value_t **long_value, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_free"; int result = 1; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } if( *long_value != NULL ) { internal_long_value = (libesedb_internal_long_value_t *) *long_value; *long_value = NULL; /* The file_io_handle and io_handle references are freed elsewhere */ if( libfdata_list_free( &( internal_long_value->data_segments_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data segments list.", function ); result = -1; } if( libfcache_cache_free( &( internal_long_value->data_segments_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data segments cache.", function ); result = -1; } if( internal_long_value->record_value != NULL ) { if( libfvalue_value_free( &( internal_long_value->record_value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record value.", function ); result = -1; } } memory_free( internal_long_value ); } return( result ); } /* Retrieve the data size * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_data_size( libesedb_long_value_t *long_value, size64_t *data_size, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_get_data_size"; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libfdata_list_get_size( internal_long_value->data_segments_list, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from data segments list.", function ); return( -1 ); } return( 1 ); } /* Retrieve the data * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_data( libesedb_long_value_t *long_value, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libesedb_data_segment_t *data_segment = NULL; libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_get_data"; size64_t data_segments_size = 0; size_t data_offset = 0; int data_segment_index = 0; int number_of_data_segments = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; 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( libfdata_list_get_size( internal_long_value->data_segments_list, &data_segments_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from data segments list.", function ); return( -1 ); } if( (size64_t) data_size < data_segments_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: data size value too small.", function ); return( -1 ); } if( libfdata_list_get_number_of_elements( internal_long_value->data_segments_list, &number_of_data_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from data segments list.", function ); return( -1 ); } for( data_segment_index = 0; data_segment_index < number_of_data_segments; data_segment_index++ ) { if( libfdata_list_get_element_value_by_index( internal_long_value->data_segments_list, (intptr_t *) internal_long_value->file_io_handle, (libfdata_cache_t *) internal_long_value->data_segments_cache, data_segment_index, (intptr_t **) &data_segment, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d.", function, data_segment_index ); return( -1 ); } if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data segment: %d.", function, data_segment_index ); return( -1 ); } if( memory_copy( &( data[ data_offset ] ), data_segment->data, data_segment->data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); return( -1 ); } data_offset += data_segment->data_size; } return( 1 ); } /* Retrieve the record value * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_record_value( libesedb_internal_long_value_t *internal_long_value, libfvalue_value_t **record_value, libcerror_error_t **error ) { libesedb_data_segment_t *data_segment = NULL; uint8_t *compressed_data = NULL; uint8_t *data = NULL; static char *function = "libesedb_long_value_get_record_value"; size64_t data_size = 0; size_t compressed_data_size = 0; size_t data_offset = 0; uint32_t column_type = 0; uint8_t record_value_type = 0; int data_segment_index = 0; int encoding = 0; int long_value_codepage = 0; int number_of_data_segments = 0; if( internal_long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } if( internal_long_value->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid long value - missing IO handle.", function ); return( -1 ); } if( record_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record value.", function ); return( -1 ); } if( internal_long_value->record_value == NULL ) { if( libfdata_list_get_size( internal_long_value->data_segments_list, &data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from data segments list.", function ); goto on_error; } if( ( data_size == 0 ) || ( data_size > (size64_t) MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data size value out of bounds.", function ); goto on_error; } data = (uint8_t *) memory_allocate( (size_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( libfdata_list_get_number_of_elements( internal_long_value->data_segments_list, &number_of_data_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from data segments list.", function ); goto on_error; } for( data_segment_index = 0; data_segment_index < number_of_data_segments; data_segment_index++ ) { if( libfdata_list_get_element_value_by_index( internal_long_value->data_segments_list, (intptr_t *) internal_long_value->file_io_handle, (libfdata_cache_t *) internal_long_value->data_segments_cache, data_segment_index, (intptr_t **) &data_segment, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d.", function, data_segment_index ); goto on_error; } if( data_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data segment: %d.", function, data_segment_index ); goto on_error; } if( memory_copy( &( data[ data_offset ] ), data_segment->data, data_segment->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; } data_offset += data_segment->data_size; } if( libesedb_catalog_definition_get_column_type( internal_long_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); goto on_error; } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_BINARY_DATA: case LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA: record_value_type = LIBFVALUE_VALUE_TYPE_BINARY_DATA; break; case LIBESEDB_COLUMN_TYPE_TEXT: case LIBESEDB_COLUMN_TYPE_LARGE_TEXT: record_value_type = LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); goto on_error; } if( ( column_type == LIBESEDB_COLUMN_TYPE_TEXT ) || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { long_value_codepage = (int) internal_long_value->column_catalog_definition->codepage; /* If the codepage is not set use the default codepage */ if( long_value_codepage == 0 ) { long_value_codepage = internal_long_value->io_handle->ascii_codepage; } if( ( data_size > 1 ) && ( data[ 0 ] == 0x18 ) ) { compressed_data = data; compressed_data_size = data_size; data = NULL; data_size = 0; if( libesedb_compression_lzxpress_decompress_get_size( compressed_data, compressed_data_size, (size_t *) &data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable retrieve uncompressed data size.", function ); goto on_error; } if( ( data_size == 0 ) || ( data_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); goto on_error; } 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 uncompressed data.", function ); goto on_error; } if( libesedb_compression_lzxpress_decompress( compressed_data, compressed_data_size, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable decompressed data.", function ); goto on_error; } memory_free( compressed_data ); compressed_data = NULL; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: uncompressed data:\n", function ); libcnotify_print_data( data, data_size, 0 ); } #endif } encoding = long_value_codepage; } else { encoding = LIBFVALUE_ENDIAN_LITTLE; } /* TODO create value */ if( libfvalue_value_type_initialize( &( internal_long_value->record_value ), record_value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record value.", function ); goto on_error; } if( libfvalue_value_set_data( internal_long_value->record_value, data, (size_t) data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_MANAGED | LIBFVALUE_VALUE_DATA_FLAG_CLONE_BY_REFERENCE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in record value.", function ); goto on_error; } /* The record value takes over management of data */ data = NULL; } *record_value = internal_long_value->record_value; return( 1 ); on_error: if( internal_long_value->record_value != NULL ) { libfvalue_value_free( &( internal_long_value->record_value ), NULL ); } if( compressed_data != NULL ) { memory_free( compressed_data ); } if( data != NULL ) { memory_free( data ); } return( -1 ); } /* Retrieve the number of data segments * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_number_of_data_segments( libesedb_long_value_t *long_value, int *number_of_data_segments, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_get_number_of_data_segments"; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libfdata_list_get_number_of_elements( internal_long_value->data_segments_list, number_of_data_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from data segments list.", function ); return( -1 ); } return( 1 ); } /* Retrieve the data segment size * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_data_segment_size( libesedb_long_value_t *long_value, int data_segment_index, size_t *data_size, libcerror_error_t **error ) { libesedb_data_segment_t *data_segment = NULL; libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_get_data_segment_size"; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libfdata_list_get_element_value_by_index( internal_long_value->data_segments_list, (intptr_t *) internal_long_value->file_io_handle, (libfdata_cache_t *) internal_long_value->data_segments_cache, data_segment_index, (intptr_t **) &data_segment, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d.", function, data_segment_index ); return( -1 ); } if( libesedb_data_segment_get_data_size( data_segment, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d data size.", function, data_segment_index ); return( -1 ); } return( 1 ); } /* Retrieve the data segment * Returns 1 if successful or -1 on error */ int libesedb_long_value_get_data_segment( libesedb_long_value_t *long_value, int data_segment_index, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libesedb_data_segment_t *data_segment = NULL; libesedb_internal_long_value_t *internal_long_value = NULL; static char *function = "libesedb_long_value_get_data_segment"; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libfdata_list_get_element_value_by_index( internal_long_value->data_segments_list, (intptr_t *) internal_long_value->file_io_handle, (libfdata_cache_t *) internal_long_value->data_segments_cache, data_segment_index, (intptr_t **) &data_segment, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d.", function, data_segment_index ); return( -1 ); } if( libesedb_data_segment_get_data( data_segment, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data segment: %d data.", function, data_segment_index ); return( -1 ); } return( 1 ); } /* Retrieves the size of the data as an UTF-8 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_long_value_get_utf8_string_size( libesedb_long_value_t *long_value, size_t *utf8_string_size, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_long_value_get_utf8_string_size"; uint32_t column_type = 0; int result = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libesedb_catalog_definition_get_column_type( internal_long_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libesedb_long_value_get_record_value( internal_long_value, &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record value.", function ); return( -1 ); } result = libesedb_record_value_get_utf8_string_size( record_value, 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 from record value.", function ); return( -1 ); } return( result ); } /* Retrieves the data as an UTF-8 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_long_value_get_utf8_string( libesedb_long_value_t *long_value, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_long_value_get_utf8_string"; uint32_t column_type = 0; int result = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libesedb_catalog_definition_get_column_type( internal_long_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libesedb_long_value_get_record_value( internal_long_value, &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record value.", function ); return( -1 ); } result = libesedb_record_value_get_utf8_string( record_value, utf8_string, 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 from record value.", function ); return( -1 ); } return( result ); } /* Retrieves the size of the data as an UTF-16 encoded string * The returned size includes the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_long_value_get_utf16_string_size( libesedb_long_value_t *long_value, size_t *utf16_string_size, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_long_value_get_utf16_string_size"; uint32_t column_type = 0; int result = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libesedb_catalog_definition_get_column_type( internal_long_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libesedb_long_value_get_record_value( internal_long_value, &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record value.", function ); return( -1 ); } result = libesedb_record_value_get_utf16_string_size( record_value, 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 from record value.", function ); return( -1 ); } return( result ); } /* Retrieves the data as an UTF-16 encoded string * The function uses the codepage in the column definition if necessary * The size should include the end of string character * Returns 1 if successful, 0 if value is NULL or -1 on error */ int libesedb_long_value_get_utf16_string( libesedb_long_value_t *long_value, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libesedb_internal_long_value_t *internal_long_value = NULL; libfvalue_value_t *record_value = NULL; static char *function = "libesedb_long_value_get_utf16_string"; uint32_t column_type = 0; int result = 0; if( long_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid long value.", function ); return( -1 ); } internal_long_value = (libesedb_internal_long_value_t *) long_value; if( libesedb_catalog_definition_get_column_type( internal_long_value->column_catalog_definition, &column_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve catalog definition column type.", function ); return( -1 ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported column type: %" PRIu32 ".", function, column_type ); return( -1 ); } if( libesedb_long_value_get_record_value( internal_long_value, &record_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record value.", function ); return( -1 ); } result = libesedb_record_value_get_utf16_string( record_value, utf16_string, 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 from record value.", function ); return( -1 ); } return( result ); } libesedb-20240420/libesedb/esedb_page_values.h0000644000175000017500000001261514610727250021750 0ustar00lordyestalordyesta/* * The page values definition of an Extensible Storage Engine (ESE) Database File (EDB) * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_PAGE_VALUES_H ) #define _ESEDB_PAGE_VALUES_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct esedb_root_page_header esedb_root_page_header_t; struct esedb_root_page_header { /* The initial number of pages * Consists of 4 bytes */ uint8_t initial_number_of_pages[ 4 ]; /* The parent father page (FDP) number * Consists of 4 bytes */ uint8_t parent_father_data_page_number[ 4 ]; /* Extent space * Consists of 4 bytes */ uint8_t extent_space[ 4 ]; /* The space tree page number * Consists of 4 bytes */ uint8_t space_tree_page_number[ 4 ]; }; typedef struct esedb_extended_root_page_header esedb_extended_root_page_header_t; struct esedb_extended_root_page_header { /* The initial number of pages * Consists of 4 bytes */ uint8_t initial_number_of_pages[ 4 ]; /* Unknonwn * Consists of 1 byte */ uint8_t unknown1; /* The parent father page (FDP) number * Consists of 4 bytes */ uint8_t parent_father_data_page_number[ 4 ]; /* Extent space * Consists of 4 bytes */ uint8_t extent_space[ 4 ]; /* The space tree page number * Consists of 4 bytes */ uint8_t space_tree_page_number[ 4 ]; /* Unknonwn * Consists of 4 bytes */ uint8_t unknown2[ 4 ]; /* Unknonwn * Consists of 4 bytes */ uint8_t unknown3[ 4 ]; }; typedef struct esedb_space_tree_page_entry esedb_space_tree_page_entry_t; struct esedb_space_tree_page_entry { /* Size of key entry * Consists of 2 bytes * Contains 4 */ uint8_t key_size[ 2 ]; /* The last page number * Consists of 4 bytes */ uint8_t last_page_number[ 4 ]; /* Amount of pages * Consists of 4 bytes */ uint8_t number_of_pages[ 4 ]; }; typedef struct esedb_data_definition_header esedb_data_definition_header_t; struct esedb_data_definition_header { /* The last fixed size data type * Consists of 1 byte */ uint8_t last_fixed_size_data_type; /* The last variable size data type * Consists of 1 byte */ uint8_t last_variable_size_data_type; /* The variable size data types offset * Consists of 2 bytes */ uint8_t variable_size_data_types_offset[ 2 ]; }; typedef struct esedb_data_definition esedb_data_definition_t; struct esedb_data_definition { /* Data type identifier: 1 (ObjidTable) * The father data page (FDP) object identifier * Consists of 4 bytes */ uint8_t father_data_page_object_identifier[ 4 ]; /* Data type identifier: 2 (Type) * The definition type * Consists of 2 bytes */ uint8_t type[ 2 ]; /* Data type identifier: 3 (Id) * The indentifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* Data type identifier: 4 (ColtypOrPgnoFDP) */ union { /* The father data page (FDP) number * Consists of 4 bytes */ uint8_t father_data_page_number[ 4 ]; /* The column type * Consists of 4 bytes */ uint8_t column_type[ 4 ]; }; /* Data type identifier: 5 (SpaceUsage) * The space usage (density percentage) * Consists of 4 bytes */ uint8_t space_usage[ 4 ]; /* Data type identifier: 6 (Flags) * Flags * Consists of 4 bytes */ uint8_t flags[ 4 ]; /* Data type identifier: 7 (PagesOrLocale) */ union { /* The (initial) number of pages * Consists of 4 bytes */ uint8_t number_of_pages[ 4 ]; /* The codepage * Consists of 4 bytes */ uint8_t codepage[ 4 ]; /* The locale identifier * Consists of 4 bytes */ uint8_t locale_identifier[ 4 ]; }; /* Data type identifier: 8 (RootFlag) * The root flag * Consists of 1 byte */ uint8_t root_flag; /* Data type identifier: 9 (RecordOffset) * The record offset * Consists of 2 bytes */ uint8_t record_offset[ 2 ]; /* Data type identifier: 10 (LCMapFlags) * LC Map flags * Consists of 4 bytes */ uint8_t lc_map_flags[ 4 ]; /* Data type identifier: 11 (KeyMost) * Key most * Consists of 2 bytes * Introduced in Windows Vista */ uint8_t key_most[ 2 ]; /* Data type identifier: 128 (Name) * The name */ /* Data type identifier: 129 (Stats) */ /* Data type identifier: 130 (TemplateTable) */ /* Data type identifier: 131 (DefaultValue) */ /* Data type identifier: 132 (KeyFldIDs) */ /* Data type identifier: 133 (VarSegMac) */ /* Data type identifier: 134 (ConditionalColumns) */ /* Data type identifier: 135 (TupleLimits) */ /* Data type identifier: 136 (Version) * Introduced in Windows Vista */ /* Data type identifier: 256 (CallbackData) */ /* Data type identifier: 257 (CallbackDependencies) */ }; #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_PAGE_VALUES_H ) */ libesedb-20240420/libesedb/libesedb_checksum.h0000644000175000017500000000276714610727250021755 0ustar00lordyestalordyesta/* * Checksum functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_CHECKSUM_H ) #define _LIBESEDB_CHECKSUM_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libesedb_checksum_calculate_little_endian_ecc32( uint32_t *ecc_checksum_value, uint32_t *xor_checksum_value, const uint8_t *buffer, size_t size, size_t offset, uint32_t initial_value, libcerror_error_t **error ); int libesedb_checksum_calculate_little_endian_xor32( uint32_t *checksum_value, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_CHECKSUM_H ) */ libesedb-20240420/libesedb/libesedb_column_type.h0000644000175000017500000000302414610727250022474 0ustar00lordyestalordyesta/* * Column type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_COLUMN_TYPE_H ) #define _LIBESEDB_COLUMN_TYPE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libesedb_column_type libesedb_column_type_t; struct libesedb_column_type { /* The column_type */ uint32_t column_type; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libesedb_column_type_get_identifier( uint32_t column_type ); const char *libesedb_column_type_get_description( uint32_t column_type ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_COLUMN_TYPE_H ) */ libesedb-20240420/libesedb/libesedb_page_value.h0000644000175000017500000000311414610727250022246 0ustar00lordyestalordyesta/* * Page value functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_PAGE_VALUE_H ) #define _LIBESEDB_PAGE_VALUE_H #include #include #include "libesedb_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libesedb_page_value libesedb_page_value_t; struct libesedb_page_value { /* The reference to the page value data */ uint8_t *data; /* The page value size */ uint16_t size; /* The offset of the page value */ uint16_t offset; /* The flags of the value */ uint8_t flags; }; int libesedb_page_value_initialize( libesedb_page_value_t **page_value, libcerror_error_t **error ); int libesedb_page_value_free( libesedb_page_value_t **page_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBESEDB_PAGE_VALUE_H ) */ libesedb-20240420/libesedb/libesedb_database.c0000644000175000017500000003310314610727250021676 0ustar00lordyestalordyesta/* * Database functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libesedb_block_descriptor.h" #include "libesedb_block_tree.h" #include "libesedb_database.h" #include "libesedb_debug.h" #include "libesedb_definitions.h" #include "libesedb_libbfio.h" #include "libesedb_libcerror.h" #include "libesedb_libcnotify.h" #include "libesedb_libfcache.h" #include "libesedb_libfdata.h" #include "libesedb_page.h" #include "libesedb_page_value.h" #include "libesedb_page_tree.h" #include "libesedb_page_tree_value.h" /* Creates a database * Make sure the value database is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libesedb_database_initialize( libesedb_database_t **database, libesedb_io_handle_t *io_handle, libfdata_vector_t *pages_vector, libfcache_cache_t *pages_cache, libcerror_error_t **error ) { static char *function = "libesedb_database_initialize"; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( *database != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid database 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 ); } *database = memory_allocate_structure( libesedb_database_t ); if( *database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create database.", function ); goto on_error; } if( memory_set( ( *database ), 0, sizeof( libesedb_database_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear database.", function ); memory_free( *database ); *database = NULL; return( -1 ); } if( libesedb_page_tree_initialize( &( ( *database )->page_tree ), io_handle, pages_vector, pages_cache, LIBESEDB_FDP_OBJECT_IDENTIFIER_DATABASE, LIBESEDB_PAGE_NUMBER_DATABASE, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree.", function ); goto on_error; } if( libesedb_block_tree_initialize( &( ( *database )->page_block_tree ), io_handle->file_size, io_handle->page_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page block tree.", function ); goto on_error; } return( 1 ); on_error: if( *database != NULL ) { if( ( *database )->page_tree != NULL ) { libesedb_page_tree_free( &( ( *database )->page_tree ), NULL ); } memory_free( *database ); *database = NULL; } return( -1 ); } /* Frees a database * Returns 1 if successful or -1 on error */ int libesedb_database_free( libesedb_database_t **database, libcerror_error_t **error ) { static char *function = "libesedb_database_free"; int result = 1; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( *database != NULL ) { if( libesedb_page_tree_free( &( ( *database )->page_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree.", function ); result = -1; } if( libesedb_block_tree_free( &( ( *database )->page_block_tree ), (int (*)(intptr_t **, libcerror_error_t **)) &libesedb_block_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page block tree.", function ); result = -1; } memory_free( *database ); *database = NULL; } return( result ); } /* Reads the database values from a leaf page * Returns 1 if successful or -1 on error */ int libesedb_database_read_values_from_leaf_page( libesedb_database_t *database, libesedb_page_t *page, int *current_leaf_value_index, libcerror_error_t **error ) { libesedb_page_tree_value_t *page_tree_value = NULL; libesedb_page_value_t *page_value = NULL; static char *function = "libesedb_database_read_values_from_leaf_page"; uint32_t page_flags = 0; uint16_t number_of_page_values = 0; uint16_t page_value_index = 0; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( database->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid database - missing page tree.", function ); return( -1 ); } if( current_leaf_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current leaf value index.", function ); return( -1 ); } if( libesedb_page_get_flags( page, &page_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page flags.", function ); goto on_error; } if( ( page_flags & LIBESEDB_PAGE_FLAG_IS_LEAF ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported page - not a leaf page.", function ); goto on_error; } if( libesedb_page_get_number_of_values( page, &number_of_page_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of page values.", function ); goto on_error; } for( page_value_index = 1; page_value_index < number_of_page_values; page_value_index++ ) { if( libesedb_page_get_value_by_index( page, page_value_index, &page_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } if( page_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing page value: %" PRIu16 ".", function, page_value_index ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: page value: %03" PRIu16 " page tag flags\t\t: 0x%02" PRIx8 "", function, page_value_index, page_value->flags ); libesedb_debug_print_page_tag_flags( page_value->flags ); libcnotify_printf( "\n" ); } #endif if( ( page_value->flags & LIBESEDB_PAGE_TAG_FLAG_IS_DEFUNCT ) != 0 ) { continue; } if( libesedb_page_tree_value_initialize( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create page tree value.", function ); goto on_error; } if( libesedb_page_tree_value_read_data( page_tree_value, page_value->data, (size_t) page_value->size, page_value->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read page tree value: %" PRIu16 ".", function, page_value_index ); goto on_error; } /* TODO implement */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: database value: %d data:\n", function, *current_leaf_value_index ); libcnotify_print_data( page_tree_value->data, page_tree_value->data_size, 0 ); } #endif if( *current_leaf_value_index == INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid current leaf value index value out of bounds.", function ); goto on_error; } *current_leaf_value_index += 1; if( libesedb_page_tree_value_free( &page_tree_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free page tree value.", function ); goto on_error; } } return( 1 ); on_error: if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } return( -1 ); } /* Reads the database * Returns 1 if successful or -1 on error */ int libesedb_database_read_file_io_handle( libesedb_database_t *database, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libesedb_page_t *page = NULL; static char *function = "libesedb_database_read_file_io_handle"; off64_t page_offset = 0; uint32_t leaf_page_number = 0; int current_leaf_value_index = 0; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( database->page_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid database - missing page tree.", function ); return( -1 ); } if( database->page_tree->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid database - invalid page tree - missing IO handle.", function ); return( -1 ); } if( libesedb_page_tree_get_get_first_leaf_page_number( database->page_tree, file_io_handle, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf page number from page tree.", function ); return( -1 ); } while( leaf_page_number != 0 ) { page_offset = ( leaf_page_number + 1 ) * database->page_tree->io_handle->page_size; if( libesedb_page_tree_check_if_page_block_first_read( database->page_tree, database->page_block_tree, leaf_page_number, page_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to check if first read of page number: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } #if ( SIZEOF_INT <= 4 ) if( leaf_page_number > (uint32_t) INT_MAX ) #else if( leaf_page_number > (unsigned int) INT_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid leaf page number value out of bounds.", function ); return( -1 ); } if( libfdata_vector_get_element_value_by_index( database->page_tree->pages_vector, (intptr_t *) file_io_handle, (libfdata_cache_t *) database->page_tree->pages_cache, (int) leaf_page_number - 1, (intptr_t **) &page, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } if( libesedb_database_read_values_from_leaf_page( database, page, ¤t_leaf_value_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read values from page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } if( libesedb_page_get_next_page_number( page, &leaf_page_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next page number from page: %" PRIu32 ".", function, leaf_page_number ); return( -1 ); } } return( 1 ); } libesedb-20240420/libesedb/libesedb_types.h0000644000175000017500000000400514610727250021302 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBESEDB_INTERNAL_TYPES_H ) #define _LIBESEDB_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb * The definitions in are copied here * for local use of libesedb */ #if defined( HAVE_LOCAL_LIBESEDB ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libesedb_column {} libesedb_column_t; typedef struct libesedb_file {} libesedb_file_t; typedef struct libesedb_index {} libesedb_index_t; typedef struct libesedb_long_value {} libesedb_long_value_t; typedef struct libesedb_multi_value {} libesedb_multi_value_t; typedef struct libesedb_record {} libesedb_record_t; typedef struct libesedb_table {} libesedb_table_t; #else typedef intptr_t libesedb_column_t; typedef intptr_t libesedb_file_t; typedef intptr_t libesedb_index_t; typedef intptr_t libesedb_long_value_t; typedef intptr_t libesedb_multi_value_t; typedef intptr_t libesedb_record_t; typedef intptr_t libesedb_table_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBESEDB ) */ #endif /* !defined( _LIBESEDB_INTERNAL_TYPES_H ) */ libesedb-20240420/msvscpp/0000755000175000017500000000000014610746415016063 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_tree_value/0000755000175000017500000000000014610746415023413 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_tree_value/esedb_test_page_tree_value.vcproj0000644000175000017500000001353714610727556032206 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfdata/0000755000175000017500000000000014610746415017631 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfdata/libfdata.vcproj0000644000175000017500000001531214610727311022620 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_long_value/0000755000175000017500000000000014610746415022417 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_long_value/esedb_test_long_value.vcproj0000644000175000017500000001352014610727556030206 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_space_tree/0000755000175000017500000000000014610746415022376 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_space_tree/esedb_test_space_tree.vcproj0000644000175000017500000001352014610727556030144 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_file/0000755000175000017500000000000014610746415021203 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_file/esedb_test_file.vcproj0000644000175000017500000001472514610727556025566 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_space_tree_value/0000755000175000017500000000000014610746415023572 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_space_tree_value/esedb_test_space_tree_value.vcproj0000644000175000017500000001354214610727556032540 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_block_tree_node/0000755000175000017500000000000014610746415023402 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_block_tree_node/esedb_test_block_tree_node.vcproj0000644000175000017500000001353714610727556032164 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_checksum/0000755000175000017500000000000014610746415022066 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_checksum/esedb_test_checksum.vcproj0000644000175000017500000001351214610727556027325 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_block_descriptor/0000755000175000017500000000000014610746415023614 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_block_descriptor/esedb_test_block_descriptor.vcproj0000644000175000017500000001354214610727556032604 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_database/0000755000175000017500000000000014610746415022030 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_database/esedb_test_database.vcproj0000644000175000017500000001351214610727556027231 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedbexport/0000755000175000017500000000000014610746415020407 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedbexport/esedbexport.vcproj0000644000175000017500000002152014610727311024152 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_table/0000755000175000017500000000000014610746415021353 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_table/esedb_test_table.vcproj0000644000175000017500000001350114610727556026075 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedbinfo/0000755000175000017500000000000014610746415020021 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedbinfo/esedbinfo.vcproj0000644000175000017500000001572214610727311023205 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_page/0000755000175000017500000000000014610746415021200 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page/esedb_test_page.vcproj0000644000175000017500000001407014610727556025551 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_column_type/0000755000175000017500000000000014610746415022622 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_column_type/esedb_test_column_type.vcproj0000644000175000017500000001352314610727556030617 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfguid/0000755000175000017500000000000014610746415017650 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfguid/libfguid.vcproj0000644000175000017500000001102714610727311022655 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_catalog_definition/0000755000175000017500000000000014610746415024106 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_catalog_definition/esedb_test_catalog_definition.vcproj0000644000175000017500000001355014610727556033367 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_tools_windows_search_compression/0000755000175000017500000000000014610746415027144 5ustar00lordyestalordyestaesedb_test_tools_windows_search_compression.vcproj0000644000175000017500000001377514610727556041415 0ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_tools_windows_search_compression libesedb-20240420/msvscpp/libclocale/0000755000175000017500000000000014610746415020154 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libclocale/libclocale.vcproj0000644000175000017500000001125214610727311023465 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_data_definition/0000755000175000017500000000000014610746415023405 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_data_definition/esedb_test_data_definition.vcproj0000644000175000017500000001353714610727556032172 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_support/0000755000175000017500000000000014610746415022000 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_support/esedb_test_support.vcproj0000644000175000017500000001473614610727556027162 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_index/0000755000175000017500000000000014610746415021373 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_index/esedb_test_index.vcproj0000644000175000017500000001350114610727556026135 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfcache/0000755000175000017500000000000014610746415017763 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfcache/libfcache.vcproj0000644000175000017500000001216514610727311023107 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/Makefile.am0000644000175000017500000000553414610730522020116 0ustar00lordyestalordyestaMSVSCPP_FILES = \ esedb_test_block_descriptor/esedb_test_block_descriptor.vcproj \ esedb_test_block_tree/esedb_test_block_tree.vcproj \ esedb_test_block_tree_node/esedb_test_block_tree_node.vcproj \ esedb_test_catalog/esedb_test_catalog.vcproj \ esedb_test_catalog_definition/esedb_test_catalog_definition.vcproj \ esedb_test_checksum/esedb_test_checksum.vcproj \ esedb_test_column/esedb_test_column.vcproj \ esedb_test_column_type/esedb_test_column_type.vcproj \ esedb_test_compression/esedb_test_compression.vcproj \ esedb_test_data_definition/esedb_test_data_definition.vcproj \ esedb_test_data_segment/esedb_test_data_segment.vcproj \ esedb_test_database/esedb_test_database.vcproj \ esedb_test_error/esedb_test_error.vcproj \ esedb_test_file/esedb_test_file.vcproj \ esedb_test_file_header/esedb_test_file_header.vcproj \ esedb_test_index/esedb_test_index.vcproj \ esedb_test_io_handle/esedb_test_io_handle.vcproj \ esedb_test_leaf_page_descriptor/esedb_test_leaf_page_descriptor.vcproj \ esedb_test_long_value/esedb_test_long_value.vcproj \ esedb_test_multi_value/esedb_test_multi_value.vcproj \ esedb_test_notify/esedb_test_notify.vcproj \ esedb_test_page/esedb_test_page.vcproj \ esedb_test_page_header/esedb_test_page_header.vcproj \ esedb_test_page_tree/esedb_test_page_tree.vcproj \ esedb_test_page_tree_key/esedb_test_page_tree_key.vcproj \ esedb_test_page_tree_value/esedb_test_page_tree_value.vcproj \ esedb_test_page_value/esedb_test_page_value.vcproj \ esedb_test_record/esedb_test_record.vcproj \ esedb_test_root_page_header/esedb_test_root_page_header.vcproj \ esedb_test_space_tree/esedb_test_space_tree.vcproj \ esedb_test_space_tree_value/esedb_test_space_tree_value.vcproj \ esedb_test_support/esedb_test_support.vcproj \ esedb_test_table/esedb_test_table.vcproj \ esedb_test_table_definition/esedb_test_table_definition.vcproj \ esedb_test_tools_info_handle/esedb_test_tools_info_handle.vcproj \ esedb_test_tools_output/esedb_test_tools_output.vcproj \ esedb_test_tools_signal/esedb_test_tools_signal.vcproj \ esedb_test_tools_windows_search_compression/esedb_test_tools_windows_search_compression.vcproj \ esedbexport/esedbexport.vcproj \ esedbinfo/esedbinfo.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcthreads/libcthreads.vcproj \ libesedb/libesedb.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfmapi/libfmapi.vcproj \ libfvalue/libfvalue.vcproj \ libfwnt/libfwnt.vcproj \ libmapidb/libmapidb.vcproj \ libuna/libuna.vcproj \ pyesedb/pyesedb.vcproj \ libesedb.sln EXTRA_DIST = \ $(MSVSCPP_FILES) DISTCLEANFILES = \ Makefile \ Makefile.in libesedb-20240420/msvscpp/libbfio/0000755000175000017500000000000014610746415017471 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libbfio/libbfio.vcproj0000644000175000017500000001621214610727311022320 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_column/0000755000175000017500000000000014610746415021561 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_column/esedb_test_column.vcproj0000644000175000017500000001350414610727556026514 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libesedb/0000755000175000017500000000000014610746415017634 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libesedb/libesedb.vcproj0000644000175000017500000003252414610727311022632 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_leaf_page_descriptor/0000755000175000017500000000000014610746415024425 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_leaf_page_descriptor/esedb_test_leaf_page_descriptor.vcproj0000644000175000017500000001370114610727556034223 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_block_tree/0000755000175000017500000000000014610746415022375 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_block_tree/esedb_test_block_tree.vcproj0000644000175000017500000001352014610727556030142 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_io_handle/0000755000175000017500000000000014610746415022206 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_io_handle/esedb_test_io_handle.vcproj0000644000175000017500000001351514610727556027570 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcfile/0000755000175000017500000000000014610746415017634 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcfile/libcfile.vcproj0000644000175000017500000001273514610727311022634 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libmapidb/0000755000175000017500000000000014610746415020006 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libmapidb/libmapidb.vcproj0000644000175000017500000001157314610727311023157 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_compression/0000755000175000017500000000000014610746415022625 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_compression/esedb_test_compression.vcproj0000644000175000017500000001352314610727556030625 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcdata/0000755000175000017500000000000014610746415017626 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcdata/libcdata.vcproj0000644000175000017500000001403414610727311022612 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_page_tree_key/0000755000175000017500000000000014610746415023067 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_tree_key/esedb_test_page_tree_key.vcproj0000644000175000017500000001365414610727556031336 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfmapi/0000755000175000017500000000000014610746415017646 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfmapi/libfmapi.vcproj0000644000175000017500000001615414610727311022657 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_file_header/0000755000175000017500000000000014610746415022513 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_file_header/esedb_test_file_header.vcproj0000644000175000017500000001411514610727556030377 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_tools_info_handle/0000755000175000017500000000000014610746415023752 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_tools_info_handle/esedb_test_tools_info_handle.vcproj0000644000175000017500000001366214610727556033103 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/pyesedb/0000755000175000017500000000000014610746415017516 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/pyesedb/pyesedb.vcproj0000644000175000017500000002022314610727556022402 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_page_value/0000755000175000017500000000000014610746415022374 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_value/esedb_test_page_value.vcproj0000644000175000017500000001352014610727556030140 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_root_page_header/0000755000175000017500000000000014610746415023553 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_root_page_header/esedb_test_root_page_header.vcproj0000644000175000017500000001354214610727556032502 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcthreads/0000755000175000017500000000000014610746415020347 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcthreads/libcthreads.vcproj0000644000175000017500000001404114610727311024052 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_tools_output/0000755000175000017500000000000014610746415023044 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_tools_output/esedb_test_tools_output.vcproj0000644000175000017500000001341514610727556031263 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcpath/0000755000175000017500000000000014610746415017651 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcpath/libcpath.vcproj0000644000175000017500000001207714610727311022665 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_tools_signal/0000755000175000017500000000000014610746415022761 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_tools_signal/esedb_test_tools_signal.vcproj0000644000175000017500000001341514610727556031115 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfwnt/0000755000175000017500000000000014610746415017530 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfwnt/libfwnt.vcproj0000644000175000017500000001535714610727311022427 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_table_definition/0000755000175000017500000000000014610746415023563 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_table_definition/esedb_test_table_definition.vcproj0000644000175000017500000001354214610727556032522 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_multi_value/0000755000175000017500000000000014610746415022612 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_multi_value/esedb_test_multi_value.vcproj0000644000175000017500000001352314610727556030577 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_catalog/0000755000175000017500000000000014610746415021676 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_catalog/esedb_test_catalog.vcproj0000644000175000017500000001422414610727556026746 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcsplit/0000755000175000017500000000000014610746415020050 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcsplit/libcsplit.vcproj0000644000175000017500000001215114610727311023254 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_record/0000755000175000017500000000000014610746415021542 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_record/esedb_test_record.vcproj0000644000175000017500000001350414610727556026456 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libuna/0000755000175000017500000000000014610746415017335 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libuna/libuna.vcproj0000644000175000017500000003603314610727311022033 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/Makefile.in0000644000175000017500000006236114610746266020144 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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@ MSVSCPP_FILES = \ esedb_test_block_descriptor/esedb_test_block_descriptor.vcproj \ esedb_test_block_tree/esedb_test_block_tree.vcproj \ esedb_test_block_tree_node/esedb_test_block_tree_node.vcproj \ esedb_test_catalog/esedb_test_catalog.vcproj \ esedb_test_catalog_definition/esedb_test_catalog_definition.vcproj \ esedb_test_checksum/esedb_test_checksum.vcproj \ esedb_test_column/esedb_test_column.vcproj \ esedb_test_column_type/esedb_test_column_type.vcproj \ esedb_test_compression/esedb_test_compression.vcproj \ esedb_test_data_definition/esedb_test_data_definition.vcproj \ esedb_test_data_segment/esedb_test_data_segment.vcproj \ esedb_test_database/esedb_test_database.vcproj \ esedb_test_error/esedb_test_error.vcproj \ esedb_test_file/esedb_test_file.vcproj \ esedb_test_file_header/esedb_test_file_header.vcproj \ esedb_test_index/esedb_test_index.vcproj \ esedb_test_io_handle/esedb_test_io_handle.vcproj \ esedb_test_leaf_page_descriptor/esedb_test_leaf_page_descriptor.vcproj \ esedb_test_long_value/esedb_test_long_value.vcproj \ esedb_test_multi_value/esedb_test_multi_value.vcproj \ esedb_test_notify/esedb_test_notify.vcproj \ esedb_test_page/esedb_test_page.vcproj \ esedb_test_page_header/esedb_test_page_header.vcproj \ esedb_test_page_tree/esedb_test_page_tree.vcproj \ esedb_test_page_tree_key/esedb_test_page_tree_key.vcproj \ esedb_test_page_tree_value/esedb_test_page_tree_value.vcproj \ esedb_test_page_value/esedb_test_page_value.vcproj \ esedb_test_record/esedb_test_record.vcproj \ esedb_test_root_page_header/esedb_test_root_page_header.vcproj \ esedb_test_space_tree/esedb_test_space_tree.vcproj \ esedb_test_space_tree_value/esedb_test_space_tree_value.vcproj \ esedb_test_support/esedb_test_support.vcproj \ esedb_test_table/esedb_test_table.vcproj \ esedb_test_table_definition/esedb_test_table_definition.vcproj \ esedb_test_tools_info_handle/esedb_test_tools_info_handle.vcproj \ esedb_test_tools_output/esedb_test_tools_output.vcproj \ esedb_test_tools_signal/esedb_test_tools_signal.vcproj \ esedb_test_tools_windows_search_compression/esedb_test_tools_windows_search_compression.vcproj \ esedbexport/esedbexport.vcproj \ esedbinfo/esedbinfo.vcproj \ libbfio/libbfio.vcproj \ libcdata/libcdata.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcthreads/libcthreads.vcproj \ libesedb/libesedb.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfmapi/libfmapi.vcproj \ libfvalue/libfvalue.vcproj \ libfwnt/libfwnt.vcproj \ libmapidb/libmapidb.vcproj \ libuna/libuna.vcproj \ pyesedb/pyesedb.vcproj \ libesedb.sln EXTRA_DIST = \ $(MSVSCPP_FILES) DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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 sources-local: splint-local: tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile 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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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 \ sources-am sources-local splint-am splint-local tags-am \ uninstall uninstall-am .PRECIOUS: 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: libesedb-20240420/msvscpp/libfvalue/0000755000175000017500000000000014610746415020034 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfvalue/libfvalue.vcproj0000644000175000017500000001761414610727311023235 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_page_tree/0000755000175000017500000000000014610746415022217 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_tree/esedb_test_page_tree.vcproj0000644000175000017500000001351514610727556027612 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_error/0000755000175000017500000000000014610746415021415 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_error/esedb_test_error.vcproj0000644000175000017500000001311314610727556026200 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_data_segment/0000755000175000017500000000000014610746415022717 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_data_segment/esedb_test_data_segment.vcproj0000644000175000017500000001436714610727556031020 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcnotify/0000755000175000017500000000000014610746415020225 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcnotify/libcnotify.vcproj0000644000175000017500000001123414610727311023607 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libcerror/0000755000175000017500000000000014610746415020046 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libcerror/libcerror.vcproj0000644000175000017500000001061014610727311023246 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libesedb.sln0000644000175000017500000015010514610727556020361 0ustar00lordyestalordyesta Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfcache", "libfcache\libfcache.vcproj", "{3D19EAAD-9195-468B-BC5B-D147A89CA4F5}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfguid", "libfguid\libfguid.vcproj", "{8C13E498-6369-4792-A0CF-B7134C54561B}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_block_descriptor", "esedb_test_block_descriptor\esedb_test_block_descriptor.vcproj", "{B6150876-2814-43CE-9ACD-29E734554366}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_block_tree", "esedb_test_block_tree\esedb_test_block_tree.vcproj", "{23364642-06BB-49D4-A960-847B08ADE6B6}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_block_tree_node", "esedb_test_block_tree_node\esedb_test_block_tree_node.vcproj", "{26334884-8C58-4F72-8ED5-763A5B37DC90}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_catalog", "esedb_test_catalog\esedb_test_catalog.vcproj", "{4065F2DD-616C-4C2A-BCA5-7CF87383DB12}" ProjectSection(ProjectDependencies) = postProject {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_catalog_definition", "esedb_test_catalog_definition\esedb_test_catalog_definition.vcproj", "{ACD71378-4A58-4141-9A66-A05C9101885B}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_checksum", "esedb_test_checksum\esedb_test_checksum.vcproj", "{BFF5364C-33F1-494D-A485-3533564D172D}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_column", "esedb_test_column\esedb_test_column.vcproj", "{AFFAB164-A537-4271-A3B2-816A3253AC35}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_column_type", "esedb_test_column_type\esedb_test_column_type.vcproj", "{E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_compression", "esedb_test_compression\esedb_test_compression.vcproj", "{176CDE95-D465-44F2-948C-67C2088B5807}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_data_definition", "esedb_test_data_definition\esedb_test_data_definition.vcproj", "{9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_data_segment", "esedb_test_data_segment\esedb_test_data_segment.vcproj", "{A9811C8C-E212-4354-A2AB-0D1F5C632987}" ProjectSection(ProjectDependencies) = postProject {F94DCC2D-2B49-453E-89B3-FD81992677D0} = {F94DCC2D-2B49-453E-89B3-FD81992677D0} {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} = {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_database", "esedb_test_database\esedb_test_database.vcproj", "{6ADF7681-DFAA-4CFF-9797-305E269B936D}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_error", "esedb_test_error\esedb_test_error.vcproj", "{7858071B-74A6-46C8-8A4C-DF4E1916A644}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_file", "esedb_test_file\esedb_test_file.vcproj", "{53632831-C7D9-4B47-8EAC-16B716277ABB}" ProjectSection(ProjectDependencies) = postProject {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_file_header", "esedb_test_file_header\esedb_test_file_header.vcproj", "{62443B2B-C021-4D11-8A21-07C6C2BA5B72}" ProjectSection(ProjectDependencies) = postProject {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_index", "esedb_test_index\esedb_test_index.vcproj", "{A48BD72B-3F94-42DD-9382-502ED60AB150}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_io_handle", "esedb_test_io_handle\esedb_test_io_handle.vcproj", "{4514F4B8-9225-4C90-91ED-D65BB183BDEC}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_leaf_page_descriptor", "esedb_test_leaf_page_descriptor\esedb_test_leaf_page_descriptor.vcproj", "{DE9B39FD-66E5-4157-8917-E6E40CC80D41}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_long_value", "esedb_test_long_value\esedb_test_long_value.vcproj", "{609F3B7C-7754-487E-87E7-D19276604C3B}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_multi_value", "esedb_test_multi_value\esedb_test_multi_value.vcproj", "{B6D2D5C7-4896-4FDE-931E-AE33556252CB}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_notify", "esedb_test_notify\esedb_test_notify.vcproj", "{677D81DB-C708-4BB4-87C3-8EC3A85C1260}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page", "esedb_test_page\esedb_test_page.vcproj", "{8161CE83-108A-4863-9B51-8F1DF5B5276B}" ProjectSection(ProjectDependencies) = postProject {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_header", "esedb_test_page_header\esedb_test_page_header.vcproj", "{415361F6-4A0B-49CF-B744-29F8A0998809}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_tree", "esedb_test_page_tree\esedb_test_page_tree.vcproj", "{41748683-3F34-4770-98C5-F80103B0067A}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_tree_key", "esedb_test_page_tree_key\esedb_test_page_tree_key.vcproj", "{C10A5D46-F063-48EE-BC09-A3E3358A0494}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_tree_value", "esedb_test_page_tree_value\esedb_test_page_tree_value.vcproj", "{65DB3CAA-EB74-4DF8-8933-43B9749EA04A}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_value", "esedb_test_page_value\esedb_test_page_value.vcproj", "{67A27024-4941-4F10-BB98-F0E43625FE9B}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_record", "esedb_test_record\esedb_test_record.vcproj", "{CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_root_page_header", "esedb_test_root_page_header\esedb_test_root_page_header.vcproj", "{EEFAD65F-7A5A-43CD-87D0-9E7D678958DB}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_space_tree", "esedb_test_space_tree\esedb_test_space_tree.vcproj", "{0301EB16-A952-46F6-8D64-CD318B49D8C2}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_space_tree_value", "esedb_test_space_tree_value\esedb_test_space_tree_value.vcproj", "{75750FF8-0CE1-4A6E-B6EE-D99B5343F432}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_support", "esedb_test_support\esedb_test_support.vcproj", "{22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}" ProjectSection(ProjectDependencies) = postProject {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_table", "esedb_test_table\esedb_test_table.vcproj", "{F4A505D3-9B12-4D25-850D-A46215904042}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_table_definition", "esedb_test_table_definition\esedb_test_table_definition.vcproj", "{66C2ADB0-19C4-4626-ABF4-F98643F56737}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_tools_info_handle", "esedb_test_tools_info_handle\esedb_test_tools_info_handle.vcproj", "{35ABBCF1-BE33-4FC0-B634-5B89DF08AB87}" ProjectSection(ProjectDependencies) = postProject {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_tools_output", "esedb_test_tools_output\esedb_test_tools_output.vcproj", "{9D57CE4C-A2B0-46A3-8B58-963470100928}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_tools_signal", "esedb_test_tools_signal\esedb_test_tools_signal.vcproj", "{130986AD-E94F-4A0E-9A62-1704C6337B20}" ProjectSection(ProjectDependencies) = postProject {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_tools_windows_search_compression", "esedb_test_tools_windows_search_compression\esedb_test_tools_windows_search_compression.vcproj", "{7DB537E6-E1AA-4C76-B6FE-9983693D33A1}" ProjectSection(ProjectDependencies) = postProject {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmapidb", "libmapidb\libmapidb.vcproj", "{68F145F0-053E-47A6-8F8C-740A42F2C62B}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclocale", "libclocale\libclocale.vcproj", "{CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedbexport", "esedbexport\esedbexport.vcproj", "{6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}" ProjectSection(ProjectDependencies) = postProject {CDB03E65-C81B-47E0-B70F-C880D841DD61} = {CDB03E65-C81B-47E0-B70F-C880D841DD61} {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} = {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {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} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedbinfo", "esedbinfo\esedbinfo.vcproj", "{A7545354-5D50-49F6-A3D0-1F97F6228955}" ProjectSection(ProjectDependencies) = postProject {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libesedb", "libesedb\libesedb.vcproj", "{A426611F-36ED-4F34-8CEC-12270B8954D9}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} = {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} {F94DCC2D-2B49-453E-89B3-FD81992677D0} = {F94DCC2D-2B49-453E-89B3-FD81992677D0} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} = {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbfio", "libbfio\libbfio.vcproj", "{41CFAFBF-A1C8-4704-AFEF-31979E6452B9}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdatetime", "libfdatetime\libfdatetime.vcproj", "{25C60507-39C6-4564-912D-DA2E7482A00F}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcfile", "libcfile\libcfile.vcproj", "{4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfwnt", "libfwnt\libfwnt.vcproj", "{9D37639F-1694-47DF-84BF-336D98E0639F}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcthreads", "libcthreads\libcthreads.vcproj", "{8AFAA2C6-E025-4B45-B96F-A27D04C6115A}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyesedb", "pyesedb\pyesedb.vcproj", "{E221DB4C-B254-47CB-993D-DC7FED580DA1}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpath", "libcpath\libcpath.vcproj", "{3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfmapi", "libfmapi\libfmapi.vcproj", "{CDB03E65-C81B-47E0-B70F-C880D841DD61}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuna", "libuna\libuna.vcproj", "{BC27FF34-C859-4A1A-95D6-FC89952E1910}" ProjectSection(ProjectDependencies) = postProject {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 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcerror", "libcerror\libcerror.vcproj", "{BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcnotify", "libcnotify\libcnotify.vcproj", "{5304AD69-D449-4589-B2C9-E4607E56A51D}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdata", "libfdata\libfdata.vcproj", "{F94DCC2D-2B49-453E-89B3-FD81992677D0}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} = {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdata", "libcdata\libcdata.vcproj", "{B9332DC8-7594-47DF-80C1-38922E0F4DFB}" ProjectSection(ProjectDependencies) = postProject {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcsplit", "libcsplit\libcsplit.vcproj", "{B86FB73A-4ACC-42DE-9545-586D93955B06}" ProjectSection(ProjectDependencies) = postProject {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 {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 {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 {B6150876-2814-43CE-9ACD-29E734554366}.Release|Win32.ActiveCfg = Release|Win32 {B6150876-2814-43CE-9ACD-29E734554366}.Release|Win32.Build.0 = Release|Win32 {B6150876-2814-43CE-9ACD-29E734554366}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B6150876-2814-43CE-9ACD-29E734554366}.VSDebug|Win32.Build.0 = VSDebug|Win32 {23364642-06BB-49D4-A960-847B08ADE6B6}.Release|Win32.ActiveCfg = Release|Win32 {23364642-06BB-49D4-A960-847B08ADE6B6}.Release|Win32.Build.0 = Release|Win32 {23364642-06BB-49D4-A960-847B08ADE6B6}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {23364642-06BB-49D4-A960-847B08ADE6B6}.VSDebug|Win32.Build.0 = VSDebug|Win32 {26334884-8C58-4F72-8ED5-763A5B37DC90}.Release|Win32.ActiveCfg = Release|Win32 {26334884-8C58-4F72-8ED5-763A5B37DC90}.Release|Win32.Build.0 = Release|Win32 {26334884-8C58-4F72-8ED5-763A5B37DC90}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {26334884-8C58-4F72-8ED5-763A5B37DC90}.VSDebug|Win32.Build.0 = VSDebug|Win32 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.Release|Win32.ActiveCfg = Release|Win32 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.Release|Win32.Build.0 = Release|Win32 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.VSDebug|Win32.Build.0 = VSDebug|Win32 {ACD71378-4A58-4141-9A66-A05C9101885B}.Release|Win32.ActiveCfg = Release|Win32 {ACD71378-4A58-4141-9A66-A05C9101885B}.Release|Win32.Build.0 = Release|Win32 {ACD71378-4A58-4141-9A66-A05C9101885B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {ACD71378-4A58-4141-9A66-A05C9101885B}.VSDebug|Win32.Build.0 = VSDebug|Win32 {BFF5364C-33F1-494D-A485-3533564D172D}.Release|Win32.ActiveCfg = Release|Win32 {BFF5364C-33F1-494D-A485-3533564D172D}.Release|Win32.Build.0 = Release|Win32 {BFF5364C-33F1-494D-A485-3533564D172D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {BFF5364C-33F1-494D-A485-3533564D172D}.VSDebug|Win32.Build.0 = VSDebug|Win32 {AFFAB164-A537-4271-A3B2-816A3253AC35}.Release|Win32.ActiveCfg = Release|Win32 {AFFAB164-A537-4271-A3B2-816A3253AC35}.Release|Win32.Build.0 = Release|Win32 {AFFAB164-A537-4271-A3B2-816A3253AC35}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {AFFAB164-A537-4271-A3B2-816A3253AC35}.VSDebug|Win32.Build.0 = VSDebug|Win32 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.Release|Win32.ActiveCfg = Release|Win32 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.Release|Win32.Build.0 = Release|Win32 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.VSDebug|Win32.Build.0 = VSDebug|Win32 {176CDE95-D465-44F2-948C-67C2088B5807}.Release|Win32.ActiveCfg = Release|Win32 {176CDE95-D465-44F2-948C-67C2088B5807}.Release|Win32.Build.0 = Release|Win32 {176CDE95-D465-44F2-948C-67C2088B5807}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {176CDE95-D465-44F2-948C-67C2088B5807}.VSDebug|Win32.Build.0 = VSDebug|Win32 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.Release|Win32.ActiveCfg = Release|Win32 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.Release|Win32.Build.0 = Release|Win32 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.VSDebug|Win32.Build.0 = VSDebug|Win32 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.Release|Win32.ActiveCfg = Release|Win32 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.Release|Win32.Build.0 = Release|Win32 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.VSDebug|Win32.Build.0 = VSDebug|Win32 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.Release|Win32.ActiveCfg = Release|Win32 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.Release|Win32.Build.0 = Release|Win32 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.VSDebug|Win32.Build.0 = VSDebug|Win32 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.Release|Win32.ActiveCfg = Release|Win32 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.Release|Win32.Build.0 = Release|Win32 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.VSDebug|Win32.Build.0 = VSDebug|Win32 {53632831-C7D9-4B47-8EAC-16B716277ABB}.Release|Win32.ActiveCfg = Release|Win32 {53632831-C7D9-4B47-8EAC-16B716277ABB}.Release|Win32.Build.0 = Release|Win32 {53632831-C7D9-4B47-8EAC-16B716277ABB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {53632831-C7D9-4B47-8EAC-16B716277ABB}.VSDebug|Win32.Build.0 = VSDebug|Win32 {62443B2B-C021-4D11-8A21-07C6C2BA5B72}.Release|Win32.ActiveCfg = Release|Win32 {62443B2B-C021-4D11-8A21-07C6C2BA5B72}.Release|Win32.Build.0 = Release|Win32 {62443B2B-C021-4D11-8A21-07C6C2BA5B72}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {62443B2B-C021-4D11-8A21-07C6C2BA5B72}.VSDebug|Win32.Build.0 = VSDebug|Win32 {A48BD72B-3F94-42DD-9382-502ED60AB150}.Release|Win32.ActiveCfg = Release|Win32 {A48BD72B-3F94-42DD-9382-502ED60AB150}.Release|Win32.Build.0 = Release|Win32 {A48BD72B-3F94-42DD-9382-502ED60AB150}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {A48BD72B-3F94-42DD-9382-502ED60AB150}.VSDebug|Win32.Build.0 = VSDebug|Win32 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.Release|Win32.ActiveCfg = Release|Win32 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.Release|Win32.Build.0 = Release|Win32 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.VSDebug|Win32.Build.0 = VSDebug|Win32 {DE9B39FD-66E5-4157-8917-E6E40CC80D41}.Release|Win32.ActiveCfg = Release|Win32 {DE9B39FD-66E5-4157-8917-E6E40CC80D41}.Release|Win32.Build.0 = Release|Win32 {DE9B39FD-66E5-4157-8917-E6E40CC80D41}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {DE9B39FD-66E5-4157-8917-E6E40CC80D41}.VSDebug|Win32.Build.0 = VSDebug|Win32 {609F3B7C-7754-487E-87E7-D19276604C3B}.Release|Win32.ActiveCfg = Release|Win32 {609F3B7C-7754-487E-87E7-D19276604C3B}.Release|Win32.Build.0 = Release|Win32 {609F3B7C-7754-487E-87E7-D19276604C3B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {609F3B7C-7754-487E-87E7-D19276604C3B}.VSDebug|Win32.Build.0 = VSDebug|Win32 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.Release|Win32.ActiveCfg = Release|Win32 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.Release|Win32.Build.0 = Release|Win32 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.VSDebug|Win32.Build.0 = VSDebug|Win32 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.Release|Win32.ActiveCfg = Release|Win32 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.Release|Win32.Build.0 = Release|Win32 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.VSDebug|Win32.Build.0 = VSDebug|Win32 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.Release|Win32.ActiveCfg = Release|Win32 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.Release|Win32.Build.0 = Release|Win32 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.VSDebug|Win32.Build.0 = VSDebug|Win32 {415361F6-4A0B-49CF-B744-29F8A0998809}.Release|Win32.ActiveCfg = Release|Win32 {415361F6-4A0B-49CF-B744-29F8A0998809}.Release|Win32.Build.0 = Release|Win32 {415361F6-4A0B-49CF-B744-29F8A0998809}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {415361F6-4A0B-49CF-B744-29F8A0998809}.VSDebug|Win32.Build.0 = VSDebug|Win32 {41748683-3F34-4770-98C5-F80103B0067A}.Release|Win32.ActiveCfg = Release|Win32 {41748683-3F34-4770-98C5-F80103B0067A}.Release|Win32.Build.0 = Release|Win32 {41748683-3F34-4770-98C5-F80103B0067A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {41748683-3F34-4770-98C5-F80103B0067A}.VSDebug|Win32.Build.0 = VSDebug|Win32 {C10A5D46-F063-48EE-BC09-A3E3358A0494}.Release|Win32.ActiveCfg = Release|Win32 {C10A5D46-F063-48EE-BC09-A3E3358A0494}.Release|Win32.Build.0 = Release|Win32 {C10A5D46-F063-48EE-BC09-A3E3358A0494}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {C10A5D46-F063-48EE-BC09-A3E3358A0494}.VSDebug|Win32.Build.0 = VSDebug|Win32 {65DB3CAA-EB74-4DF8-8933-43B9749EA04A}.Release|Win32.ActiveCfg = Release|Win32 {65DB3CAA-EB74-4DF8-8933-43B9749EA04A}.Release|Win32.Build.0 = Release|Win32 {65DB3CAA-EB74-4DF8-8933-43B9749EA04A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {65DB3CAA-EB74-4DF8-8933-43B9749EA04A}.VSDebug|Win32.Build.0 = VSDebug|Win32 {67A27024-4941-4F10-BB98-F0E43625FE9B}.Release|Win32.ActiveCfg = Release|Win32 {67A27024-4941-4F10-BB98-F0E43625FE9B}.Release|Win32.Build.0 = Release|Win32 {67A27024-4941-4F10-BB98-F0E43625FE9B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {67A27024-4941-4F10-BB98-F0E43625FE9B}.VSDebug|Win32.Build.0 = VSDebug|Win32 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.Release|Win32.ActiveCfg = Release|Win32 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.Release|Win32.Build.0 = Release|Win32 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.VSDebug|Win32.Build.0 = VSDebug|Win32 {EEFAD65F-7A5A-43CD-87D0-9E7D678958DB}.Release|Win32.ActiveCfg = Release|Win32 {EEFAD65F-7A5A-43CD-87D0-9E7D678958DB}.Release|Win32.Build.0 = Release|Win32 {EEFAD65F-7A5A-43CD-87D0-9E7D678958DB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {EEFAD65F-7A5A-43CD-87D0-9E7D678958DB}.VSDebug|Win32.Build.0 = VSDebug|Win32 {0301EB16-A952-46F6-8D64-CD318B49D8C2}.Release|Win32.ActiveCfg = Release|Win32 {0301EB16-A952-46F6-8D64-CD318B49D8C2}.Release|Win32.Build.0 = Release|Win32 {0301EB16-A952-46F6-8D64-CD318B49D8C2}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {0301EB16-A952-46F6-8D64-CD318B49D8C2}.VSDebug|Win32.Build.0 = VSDebug|Win32 {75750FF8-0CE1-4A6E-B6EE-D99B5343F432}.Release|Win32.ActiveCfg = Release|Win32 {75750FF8-0CE1-4A6E-B6EE-D99B5343F432}.Release|Win32.Build.0 = Release|Win32 {75750FF8-0CE1-4A6E-B6EE-D99B5343F432}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {75750FF8-0CE1-4A6E-B6EE-D99B5343F432}.VSDebug|Win32.Build.0 = VSDebug|Win32 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.Release|Win32.ActiveCfg = Release|Win32 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.Release|Win32.Build.0 = Release|Win32 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.VSDebug|Win32.Build.0 = VSDebug|Win32 {F4A505D3-9B12-4D25-850D-A46215904042}.Release|Win32.ActiveCfg = Release|Win32 {F4A505D3-9B12-4D25-850D-A46215904042}.Release|Win32.Build.0 = Release|Win32 {F4A505D3-9B12-4D25-850D-A46215904042}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {F4A505D3-9B12-4D25-850D-A46215904042}.VSDebug|Win32.Build.0 = VSDebug|Win32 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.Release|Win32.ActiveCfg = Release|Win32 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.Release|Win32.Build.0 = Release|Win32 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.VSDebug|Win32.Build.0 = VSDebug|Win32 {35ABBCF1-BE33-4FC0-B634-5B89DF08AB87}.Release|Win32.ActiveCfg = Release|Win32 {35ABBCF1-BE33-4FC0-B634-5B89DF08AB87}.Release|Win32.Build.0 = Release|Win32 {35ABBCF1-BE33-4FC0-B634-5B89DF08AB87}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {35ABBCF1-BE33-4FC0-B634-5B89DF08AB87}.VSDebug|Win32.Build.0 = VSDebug|Win32 {9D57CE4C-A2B0-46A3-8B58-963470100928}.Release|Win32.ActiveCfg = Release|Win32 {9D57CE4C-A2B0-46A3-8B58-963470100928}.Release|Win32.Build.0 = Release|Win32 {9D57CE4C-A2B0-46A3-8B58-963470100928}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {9D57CE4C-A2B0-46A3-8B58-963470100928}.VSDebug|Win32.Build.0 = VSDebug|Win32 {130986AD-E94F-4A0E-9A62-1704C6337B20}.Release|Win32.ActiveCfg = Release|Win32 {130986AD-E94F-4A0E-9A62-1704C6337B20}.Release|Win32.Build.0 = Release|Win32 {130986AD-E94F-4A0E-9A62-1704C6337B20}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {130986AD-E94F-4A0E-9A62-1704C6337B20}.VSDebug|Win32.Build.0 = VSDebug|Win32 {7DB537E6-E1AA-4C76-B6FE-9983693D33A1}.Release|Win32.ActiveCfg = Release|Win32 {7DB537E6-E1AA-4C76-B6FE-9983693D33A1}.Release|Win32.Build.0 = Release|Win32 {7DB537E6-E1AA-4C76-B6FE-9983693D33A1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {7DB537E6-E1AA-4C76-B6FE-9983693D33A1}.VSDebug|Win32.Build.0 = VSDebug|Win32 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.Release|Win32.ActiveCfg = Release|Win32 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.Release|Win32.Build.0 = Release|Win32 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.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 {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 {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 {A426611F-36ED-4F34-8CEC-12270B8954D9}.Release|Win32.ActiveCfg = Release|Win32 {A426611F-36ED-4F34-8CEC-12270B8954D9}.Release|Win32.Build.0 = Release|Win32 {A426611F-36ED-4F34-8CEC-12270B8954D9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {A426611F-36ED-4F34-8CEC-12270B8954D9}.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 {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 {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 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}.Release|Win32.ActiveCfg = Release|Win32 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}.Release|Win32.Build.0 = Release|Win32 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}.VSDebug|Win32.Build.0 = VSDebug|Win32 {E221DB4C-B254-47CB-993D-DC7FED580DA1}.Release|Win32.ActiveCfg = Release|Win32 {E221DB4C-B254-47CB-993D-DC7FED580DA1}.Release|Win32.Build.0 = Release|Win32 {E221DB4C-B254-47CB-993D-DC7FED580DA1}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {E221DB4C-B254-47CB-993D-DC7FED580DA1}.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 {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 {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 {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 {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 {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 {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 {B9332DC8-7594-47DF-80C1-38922E0F4DFB}.Release|Win32.ActiveCfg = Release|Win32 {B9332DC8-7594-47DF-80C1-38922E0F4DFB}.Release|Win32.Build.0 = Release|Win32 {B9332DC8-7594-47DF-80C1-38922E0F4DFB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B9332DC8-7594-47DF-80C1-38922E0F4DFB}.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 libesedb-20240420/msvscpp/esedb_test_notify/0000755000175000017500000000000014610746415021574 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_notify/esedb_test_notify.vcproj0000644000175000017500000001324214610727556026541 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/libfdatetime/0000755000175000017500000000000014610746415020514 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/libfdatetime/libfdatetime.vcproj0000644000175000017500000001366514610727311024377 0ustar00lordyestalordyesta libesedb-20240420/msvscpp/esedb_test_page_header/0000755000175000017500000000000014610746415022510 5ustar00lordyestalordyestalibesedb-20240420/msvscpp/esedb_test_page_header/esedb_test_page_header.vcproj0000644000175000017500000001352314610727556030373 0ustar00lordyestalordyesta libesedb-20240420/AUTHORS0000644000175000017500000000013414610727246015437 0ustar00lordyestalordyestaAcknowledgements: libesedb Copyright (C) 2009-2024, Joachim Metz libesedb-20240420/libcfile/0000755000175000017500000000000014610746413016137 5ustar00lordyestalordyestalibesedb-20240420/libcfile/libcfile_extern.h0000644000175000017500000000255514610746225021456 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCFILE_EXTERN_VARIABLE extern #else #define LIBCFILE_EXTERN_VARIABLE LIBCFILE_EXTERN #endif #else #define LIBCFILE_EXTERN /* extern */ #define LIBCFILE_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #endif /* !defined( _LIBCFILE_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcfile/libcfile_support.h0000644000175000017500000000452514610746225021664 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBCFILE_EXTERN \ int libcfile_get_codepage( int *codepage, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_set_codepage( int codepage, libcerror_error_t **error ); #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 ) */ LIBCFILE_EXTERN \ int libcfile_file_remove( const char *filename, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_remove_with_error_code( const char *filename, uint32_t *error_code, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCFILE_EXTERN \ int libcfile_file_remove_wide( const wchar_t *filename, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_remove_wide_with_error_code( const wchar_t *filename, uint32_t *error_code, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_SUPPORT_H ) */ libesedb-20240420/libcfile/libcfile_unused.h0000644000175000017500000000260014610746225021443 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_UNUSED_H ) #define _LIBCFILE_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 /* !defined( _LIBCFILE_UNUSED_H ) */ libesedb-20240420/libcfile/libcfile_notify.h0000644000175000017500000000307114610746225021453 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_NOTIFY_H ) #define _LIBCFILE_NOTIFY_H #include #include #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCFILE ) LIBCFILE_EXTERN \ void libcfile_notify_set_verbose( int verbose ); LIBCFILE_EXTERN \ int libcfile_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_NOTIFY_H ) */ libesedb-20240420/libcfile/libcfile_support.c0000644000175000017500000006223114610746225021655 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( HAVE_ERRNO_H ) #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #include "libcfile_definitions.h" #include "libcfile_libcerror.h" #include "libcfile_libclocale.h" #include "libcfile_libuna.h" #include "libcfile_support.h" #include "libcfile_winapi.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 ); } /* 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 libcfile_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libcfile_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 libcfile_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libcfile_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_LIBCFILE ) */ #if defined( WINAPI ) /* Determines if a file exists * 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 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"; size_t filename_length = 0; DWORD error_code = 0; DWORD file_attributes = 0; HANDLE handle = INVALID_HANDLE_VALUE; int is_device_filename = 0; int result = 1; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } filename_length = narrow_string_length( filename ); if( filename_length > 4 ) { if( ( filename[ 0 ] == '\\' ) && ( filename[ 1 ] == '\\' ) && ( filename[ 2 ] == '.' ) && ( filename[ 3 ] == '\\' ) ) { /* Ignore \\.\F:\ which is an alternative notation for F: */ if( ( filename_length < 7 ) || ( filename[ 5 ] != ':' ) || ( filename[ 6 ] != '\\' ) ) { is_device_filename = 1; } } } if( is_device_filename != 0 ) { #if ( WINVER <= 0x0500 ) handle = libcfile_CreateFileA( (LPCSTR) filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL ); #else handle = CreateFileA( (LPCSTR) filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL ); #endif if( handle == INVALID_HANDLE_VALUE ) { error_code = (uint32_t) 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_OPEN_FAILED, error_code, "%s: unable to open file: %s.", function, filename ); return( -1 ); } } else { #if ( WINVER <= 0x0500 ) result = libcfile_CloseHandle( handle ); #else result = CloseHandle( handle ); #endif if( result == 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 ); } result = 1; } } else { /* Note that GetFileAttributesA does not support Windows device file names. */ #if ( WINVER <= 0x0500 ) file_attributes = libcfile_GetFileAttributesA( (LPCSTR) filename ); #else file_attributes = GetFileAttributesA( (LPCSTR) filename ); #endif 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( HAVE_STAT ) /* 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_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 ) /* Determines if a file exists using get file attibutes * 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 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"; size_t filename_length = 0; DWORD error_code = 0; DWORD file_attributes = 0; HANDLE handle = INVALID_HANDLE_VALUE; int is_device_filename = 0; int result = 1; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } filename_length = wide_string_length( filename ); if( filename_length > 4 ) { if( ( filename[ 0 ] == (uint16_t) '\\' ) && ( filename[ 1 ] == (uint16_t) '\\' ) && ( filename[ 2 ] == (uint16_t) '.' ) && ( filename[ 3 ] == (uint16_t) '\\' ) ) { /* Ignore \\.\F:\ which is an alternative notation for F: */ if( ( filename_length < 7 ) || ( filename[ 5 ] != (uint16_t) ':' ) || ( filename[ 6 ] != (uint16_t) '\\' ) ) { is_device_filename = 1; } } } if( is_device_filename != 0 ) { #if ( WINVER <= 0x0500 ) handle = libcfile_CreateFileW( (LPCWSTR) filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL ); #else handle = CreateFileW( (LPCWSTR) filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL ); #endif if( handle == INVALID_HANDLE_VALUE ) { error_code = (uint32_t) 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_OPEN_FAILED, error_code, "%s: unable to open file: %ls.", function, filename ); return( -1 ); } } else { #if ( WINVER <= 0x0500 ) result = libcfile_CloseHandle( handle ); #else result = CloseHandle( handle ); #endif if( result == 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 ); } result = 1; } } else { /* Note that GetFileAttributesW does not support Windows device file names. */ #if ( WINVER <= 0x0500 ) file_attributes = libcfile_GetFileAttributesW( (LPCWSTR) filename ); #else file_attributes = GetFileAttributesW( (LPCWSTR) filename ); #endif 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( HAVE_STAT ) /* 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 + 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 = 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_SYSTEM ".", function, filename ); return( -1 ); } } else { result = 1; } return( result ); } #else #error Missing file exists wide function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Removes a file * Returns 1 if successful or -1 on error */ int libcfile_file_remove( const char *filename, libcerror_error_t **error ) { static char *function = "libcfile_file_remove"; uint32_t error_code = 0; if( libcfile_file_remove_with_error_code( filename, &error_code, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, "%s: unable to remove file.", function ); return( -1 ); } return( 1 ); } #if defined( WINAPI ) /* Removes a 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_remove_with_error_code( const char *filename, uint32_t *error_code, libcerror_error_t **error ) { static char *function = "libcfile_file_remove_with_error_code"; BOOL result = FALSE; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } #if ( WINVER <= 0x0500 ) result = libcfile_DeleteFileA( filename ); #else result = DeleteFileA( filename ); #endif if( result == 0 ) { *error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, *error_code, "%s: unable to remove file.", function ); return( -1 ); } return( 1 ); } #elif defined( HAVE_UNLINK ) /* Removes a file * This function uses the POSIX unlink function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_remove_with_error_code( const char *filename, uint32_t *error_code, libcerror_error_t **error ) { static char *function = "libcfile_file_remove_with_error_code"; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } if( unlink( filename ) != 0 ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, *error_code, "%s: unable to unlink file.", function ); return( -1 ); } return( 1 ); } #else #error Missing file remove function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Removes a file * Returns 1 if successful or -1 on error */ int libcfile_file_remove_wide( const wchar_t *filename, libcerror_error_t **error ) { static char *function = "libcfile_file_remove_wide"; uint32_t error_code = 0; if( libcfile_file_remove_wide_with_error_code( filename, &error_code, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, "%s: unable to remove file.", function ); return( -1 ); } return( 1 ); } #if defined( WINAPI ) /* Removes a 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_remove_wide_with_error_code( const wchar_t *filename, uint32_t *error_code, libcerror_error_t **error ) { static char *function = "libcfile_file_remove_wide_with_error_code"; BOOL result = FALSE; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } #if ( WINVER <= 0x0500 ) result = libcfile_DeleteFileW( filename ); #else result = DeleteFileW( filename ); #endif if( result == 0 ) { *error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, *error_code, "%s: unable to remove file.", function ); return( -1 ); } return( 1 ); } #elif defined( HAVE_UNLINK ) /* Removes a file * This function uses the POSIX unlink function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_remove_wide_with_error_code( const wchar_t *filename, uint32_t *error_code, libcerror_error_t **error ) { char *narrow_filename = NULL; static char *function = "libcfile_file_remove_wide_with_error_code"; 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 ); } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } filename_size = 1 + 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 ); goto on_error; } narrow_filename = 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 ); goto on_error; } 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 ); goto on_error; } if( unlink( narrow_filename ) != 0 ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_UNLINK_FAILED, *error_code, "%s: unable to unlink file.", function ); goto on_error; } memory_free( narrow_filename ); return( 1 ); on_error: if( narrow_filename != NULL ) { memory_free( narrow_filename ); } return( -1 ); } #else #error Missing file remove wide function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libcfile/libcfile_types.h0000644000175000017500000000273114610746225021311 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_TYPES_H ) #define _LIBCFILE_INTERNAL_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; #else typedef intptr_t libcfile_file_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBCFILE ) */ #endif /* !defined( _LIBCFILE_INTERNAL_TYPES_H ) */ libesedb-20240420/libcfile/Makefile.am0000644000175000017500000000165214610746225020200 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCFILE AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_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_libcnotify.h \ libcfile_libuna.h \ libcfile_notify.c libcfile_notify.h \ libcfile_support.c libcfile_support.h \ libcfile_system_string.c libcfile_system_string.h \ libcfile_types.h \ libcfile_unused.h \ libcfile_winapi.c libcfile_winapi.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) libesedb-20240420/libcfile/libcfile_notify.c0000644000175000017500000000530214610746225021445 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libcfile_libcerror.h" #include "libcfile_libcnotify.h" #include "libcfile_notify.h" #if !defined( HAVE_LOCAL_LIBCFILE ) /* Sets the verbose notification */ void libcfile_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libcfile_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libcfile_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 libcfile_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libcfile_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 libcfile_notify_stream_close( libcerror_error_t **error ) { static char *function = "libcfile_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 /* !defined( HAVE_LOCAL_LIBCFILE ) */ libesedb-20240420/libcfile/libcfile_system_string.h0000644000175000017500000000541214610746225023056 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_SYSTEM_STRING_H ) #define _LIBCFILE_SYSTEM_STRING_H #include #include #include "libcfile_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libcfile_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ); int libcfile_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); int libcfile_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ); int libcfile_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int libcfile_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ); int libcfile_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); int libcfile_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ); int libcfile_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_SYSTEM_STRING_H ) */ libesedb-20240420/libcfile/libcfile_file.h0000644000175000017500000001446414610746225021072 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_FILE_H ) #define _LIBCFILE_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 ) /* The (file) handle */ HANDLE handle; /* Value to indicate the filename indicate this is a device file */ uint8_t is_device_filename; /* Value to indicate asynchronous IO should be used. */ uint8_t use_asynchronous_io; #else /* The (file) descriptor */ int descriptor; #endif /* defined( WINAPI ) */ /* The access flags */ int access_flags; /* The size */ size64_t size; /* The current offset */ off64_t current_offset; /* The block size */ size_t block_size; /* The block data */ uint8_t *block_data; /* The block data offset */ size_t block_data_offset; /* The block data size */ size_t block_data_size; }; 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 ); LIBCFILE_EXTERN \ int libcfile_file_open_with_error_code( libcfile_file_t *file, const char *filename, int access_flags, uint32_t *error_code, 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 ); LIBCFILE_EXTERN \ int libcfile_file_open_wide_with_error_code( libcfile_file_t *file, const wchar_t *filename, int access_flags, uint32_t *error_code, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBCFILE_EXTERN \ int libcfile_file_close( libcfile_file_t *file, libcerror_error_t **error ); 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 ) ssize_t libcfile_internal_file_read_buffer_at_offset_with_error_code( libcfile_internal_file_t *internal_file, off64_t current_offset, uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ); #endif /* defined( WINAPI ) */ LIBCFILE_EXTERN \ ssize_t libcfile_file_read_buffer_with_error_code( libcfile_file_t *file, uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_file_write_buffer( libcfile_file_t *file, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_file_write_buffer_with_error_code( libcfile_file_t *file, const uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ); LIBCFILE_EXTERN \ off64_t libcfile_file_seek_offset( libcfile_file_t *file, off64_t offset, int whence, libcerror_error_t **error ); 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 ); LIBCFILE_EXTERN \ int libcfile_file_get_offset( libcfile_file_t *file, off64_t *offset, libcerror_error_t **error ); int libcfile_internal_file_get_size( libcfile_internal_file_t *internal_file, size64_t *size, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_is_device( libcfile_file_t *file, libcerror_error_t **error ); ssize_t libcfile_internal_file_io_control_read_with_error_code( libcfile_internal_file_t *internal_file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, uint32_t *error_code, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_file_io_control_read( libcfile_file_t *file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_file_io_control_read_with_error_code( libcfile_file_t *file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, uint32_t *error_code, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_set_access_behavior( libcfile_file_t *file, int access_behavior, libcerror_error_t **error ); int libcfile_internal_file_set_block_size( libcfile_internal_file_t *internal_file, size_t block_size, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_set_block_size( libcfile_file_t *file, size_t block_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_FILE_H ) */ libesedb-20240420/libcfile/libcfile_libcnotify.h0000644000175000017500000000266014610746225022310 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_LIBCNOTIFY_H ) #define _LIBCFILE_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 /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBCFILE_LIBCNOTIFY_H ) */ libesedb-20240420/libcfile/libcfile_system_string.c0000644000175000017500000006173014610746225023056 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "libcfile_libcerror.h" #include "libcfile_libclocale.h" #include "libcfile_libuna.h" #include "libcfile_system_string.h" #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4 #error Unsupported size of wchar_t #endif /* Determines the size of a narrow string from a system string * Returns 1 if successful or -1 on error */ int libcfile_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_size_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow string size.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string size.", function ); return( -1 ); } *narrow_string_size = system_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a narrow string * Returns 1 if successful or -1 on error */ int libcfile_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_copy_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid narrow string size value too small.", function ); return( -1 ); } if( system_string_copy( narrow_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } narrow_string[ system_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a narrow string * Returns 1 if successful or -1 on error */ int libcfile_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_size_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system string size.", function ); return( -1 ); } #else if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = narrow_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a narrow string * Returns 1 if successful or -1 on error */ int libcfile_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_copy_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set system string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < narrow_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, narrow_string, narrow_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } system_string[ narrow_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines the size of a wide string from a system string * Returns 1 if successful or -1 on error */ int libcfile_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_size_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string size.", function ); return( -1 ); } *wide_string_size = system_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a wide string * Returns 1 if successful or -1 on error */ int libcfile_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_copy_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid wide string size value too small.", function ); return( -1 ); } if( system_string_copy( wide_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } wide_string[ system_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a wide string * Returns 1 if successful or -1 on error */ int libcfile_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_size_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = wide_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a wide string * Returns 1 if successful or -1 on error */ int libcfile_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libcfile_system_string_copy_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < wide_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, wide_string, wide_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } system_string[ wide_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libcfile/libcfile_error.h0000644000175000017500000000340314610746225021273 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCFILE_INTERNAL_ERROR_H ) */ libesedb-20240420/libcfile/libcfile_libcerror.h0000644000175000017500000000263614610746225022134 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCFILE_LIBCERROR_H ) */ libesedb-20240420/libcfile/libcfile_file.c0000644000175000017500000031617514610746225021071 0ustar00lordyestalordyesta/* * File functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( HAVE_ERRNO_H ) #include #endif #if defined( HAVE_FCNTL_H ) #include #endif #if defined( WINAPI ) #include #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #include #endif #if defined( HAVE_SYS_IOCTL_H ) #include #endif #if defined( WINAPI ) #include #elif defined( HAVE_CYGWIN_FS_H ) #include #elif defined( HAVE_LINUX_FS_H ) /* Required for Linux platforms that use a sizeof( u64 ) * in linux/fs.h but have no typedef of it */ #if !defined( HAVE_U64 ) typedef size_t u64; #endif #include #else #if defined( HAVE_SYS_DISK_H ) #include #endif #if defined( HAVE_SYS_DISKLABEL_H ) #include #endif #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_libcnotify.h" #include "libcfile_system_string.h" #include "libcfile_types.h" #include "libcfile_winapi.h" /* Creates a file * Make sure the value file is referencing, is set to NULL * 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 ) 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 a file * 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 ) 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 ); } /* Opens a file * 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 ) { static char *function = "libcfile_file_open"; uint32_t error_code = 0; if( libcfile_file_open_with_error_code( file, filename, access_flags, &error_code, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); return( -1 ); } return( 1 ); } #if defined( WINAPI ) #if ( WINVER >= 0x0600 ) && ( WINVER < 0x0602 ) #define FileAlignmentInfo 0x11 typedef struct _FILE_ALIGNMENT_INFO FILE_ALIGNMENT_INFO; struct _FILE_ALIGNMENT_INFO { ULONG AlignmentRequirement; }; #endif /* Opens a 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_open_with_error_code( libcfile_file_t *file, const char *filename, int access_flags, uint32_t *error_code, libcerror_error_t **error ) { #if ( WINVER >= 0x0600 ) FILE_ALIGNMENT_INFO file_alignment_information; BOOL result = 0; #endif libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_with_error_code"; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; DWORD flags_and_attributes = 0; size_t filename_length = 0; 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->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( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", 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_SHARE_WRITE is set to allow reading files that are * currently being written FILE_SHARE_READ alone does not suffice */ file_io_shared_flags = FILE_SHARE_READ | FILE_SHARE_WRITE; } 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 = FILE_SHARE_READ; } 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; } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } filename_length = narrow_string_length( filename ); if( filename_length > 4 ) { if( ( filename[ 0 ] == '\\' ) && ( filename[ 1 ] == '\\' ) && ( filename[ 2 ] == '.' ) && ( filename[ 3 ] == '\\' ) ) { /* Ignore \\.\F:\ which is an alternative notation for F: */ if( ( filename_length < 7 ) || ( filename[ 5 ] != ':' ) || ( filename[ 6 ] != '\\' ) ) { internal_file->is_device_filename = 1; internal_file->use_asynchronous_io = 1; } } } flags_and_attributes = FILE_ATTRIBUTE_NORMAL; if( internal_file->use_asynchronous_io != 0 ) { flags_and_attributes |= FILE_FLAG_OVERLAPPED; } #if ( WINVER <= 0x0500 ) internal_file->handle = libcfile_CreateFileA( (LPCSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, flags_and_attributes, NULL ); #else internal_file->handle = CreateFileA( (LPCSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, flags_and_attributes, NULL ); #endif if( internal_file->handle == INVALID_HANDLE_VALUE ) { *error_code = (uint32_t) 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_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_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_SYSTEM ".", function, filename ); break; } return( -1 ); } if( internal_file->is_device_filename != 0 ) { read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: FSCTL_ALLOW_EXTENDED_DASD_IO.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } #if ( WINVER >= 0x0600 ) result = GetFileInformationByHandleEx( internal_file->handle, FileAlignmentInfo, (void *) &file_alignment_information, (DWORD) sizeof( FILE_ALIGNMENT_INFO ) ); if( result == FALSE ) { *error_code = (uint32_t) GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, *error_code, "%s: unable to retrieve file alignment information.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else if( file_alignment_information.AlignmentRequirement != 0 ) { if( libcfile_internal_file_set_block_size( internal_file, (size_t) 512, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set block size.", function ); return( -1 ); } } #endif /* ( WINVER >= 0x0600 ) */ } if( libcfile_internal_file_get_size( internal_file, &( internal_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 ); } internal_file->access_flags = access_flags; internal_file->current_offset = 0; return( 1 ); } #elif defined( HAVE_OPEN ) /* Opens a file * This function uses the POSIX open function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_open_with_error_code( libcfile_file_t *file, const char *filename, int access_flags, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_with_error_code"; int file_io_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->descriptor != -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - descriptor value already set.", 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( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_flags = O_RDWR | O_CREAT; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_flags = O_RDONLY; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_flags = O_WRONLY | O_CREAT; } 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } #if defined( O_CLOEXEC ) /* Prevent the file descriptor to remain open across an execve */ file_io_flags |= O_CLOEXEC; #endif #if 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 ) { *error_code = (uint32_t) errno; switch( *error_code ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_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_SYSTEM ".", function, filename ); break; } return( -1 ); } if( libcfile_internal_file_get_size( internal_file, &( internal_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 ); } internal_file->access_flags = access_flags; internal_file->current_offset = 0; return( 1 ); } #else #error Missing file open function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * 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 ) { static char *function = "libcfile_file_open_wide"; uint32_t error_code = 0; if( libcfile_file_open_wide_with_error_code( file, filename, access_flags, &error_code, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); return( -1 ); } return( 1 ); } #if defined( WINAPI ) /* Opens a 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_open_wide_with_error_code( libcfile_file_t *file, const wchar_t *filename, int access_flags, uint32_t *error_code, libcerror_error_t **error ) { #if ( WINVER >= 0x0600 ) FILE_ALIGNMENT_INFO file_alignment_information; BOOL result = 0; #endif libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide_with_error_code"; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; DWORD flags_and_attributes = 0; size_t filename_length = 0; 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->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( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", 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_SHARE_WRITE is set to allow reading files that are * currently being written FILE_SHARE_READ alone does not suffice */ file_io_shared_flags = FILE_SHARE_READ | FILE_SHARE_WRITE; } 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 = FILE_SHARE_READ; } 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; } if( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } filename_length = wide_string_length( filename ); if( filename_length > 4 ) { if( ( filename[ 0 ] == (wchar_t) '\\' ) && ( filename[ 1 ] == (wchar_t) '\\' ) && ( filename[ 2 ] == (wchar_t) '.' ) && ( filename[ 3 ] == (wchar_t) '\\' ) ) { /* Ignore \\.\F:\ which is an alternative notation for F: */ if( ( filename_length < 7 ) || ( filename[ 5 ] != (wchar_t) ':' ) || ( filename[ 6 ] != (wchar_t) '\\' ) ) { internal_file->is_device_filename = 1; internal_file->use_asynchronous_io = 1; } } } flags_and_attributes = FILE_ATTRIBUTE_NORMAL; if( internal_file->use_asynchronous_io != 0 ) { flags_and_attributes |= FILE_FLAG_OVERLAPPED; } #if ( WINVER <= 0x0500 ) internal_file->handle = libcfile_CreateFileW( (LPCWSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, flags_and_attributes, NULL ); #else internal_file->handle = CreateFileW( (LPCWSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, flags_and_attributes, NULL ); #endif if( internal_file->handle == INVALID_HANDLE_VALUE ) { *error_code = (uint32_t) 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_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_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_SYSTEM ".", function, filename ); break; } return( -1 ); } if( internal_file->is_device_filename != 0 ) { read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: FSCTL_ALLOW_EXTENDED_DASD_IO.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } #if ( WINVER >= 0x0600 ) result = GetFileInformationByHandleEx( internal_file->handle, FileAlignmentInfo, (void *) &file_alignment_information, (DWORD) sizeof( FILE_ALIGNMENT_INFO ) ); if( result == FALSE ) { *error_code = (uint32_t) GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, *error_code, "%s: unable to retrieve file alignment information.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else if( file_alignment_information.AlignmentRequirement != 0 ) { if( libcfile_internal_file_set_block_size( internal_file, (size_t) 512, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set block size.", function ); return( -1 ); } } #endif /* ( WINVER >= 0x0600 ) */ } if( libcfile_internal_file_get_size( internal_file, &( internal_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 ); } internal_file->access_flags = access_flags; internal_file->current_offset = 0; return( 1 ); } #elif defined( HAVE_OPEN ) /* 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_with_error_code( libcfile_file_t *file, const wchar_t *filename, int access_flags, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide_with_error_code"; char *narrow_filename = NULL; size_t filename_size = 0; size_t narrow_filename_size = 0; int file_io_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->descriptor != -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - descriptor value already set.", 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( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_flags = O_RDWR | O_CREAT; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_flags = O_RDONLY; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_flags = O_WRONLY | O_CREAT; } 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } filename_size = 1 + wide_string_length( filename ); if( libcfile_system_string_size_from_wide_string( filename, filename_size, &narrow_filename_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow character filename size.", function ); goto on_error; } narrow_filename = 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 ); goto on_error; } if( libcfile_system_string_copy_from_wide_string( narrow_filename, narrow_filename_size, filename, filename_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow character filename.", function ); goto on_error; } #if defined( O_CLOEXEC ) /* Prevent the file descriptor to remain open across an execve */ file_io_flags |= O_CLOEXEC; #endif #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 ); narrow_filename = NULL; if( internal_file->descriptor == -1 ) { *error_code = (uint32_t) errno; switch( *error_code ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_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_SYSTEM ".", function, filename ); break; } goto on_error; } if( libcfile_internal_file_get_size( internal_file, &( internal_file->size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size.", function ); goto on_error; } return( 1 ); on_error: if( narrow_filename != NULL ) { memory_free( narrow_filename ); } return( -1 ); } #else #error Missing file open wide function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( WINAPI ) /* Closes the file * This function uses the WINAPI function for Windows 2000 (0x0500) or later * or tries to dynamically call the function for Windows 2000 (0x0500) or earlier * 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; BOOL result = FALSE; 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 ) { #if ( WINVER <= 0x0500 ) result = libcfile_CloseHandle( internal_file->handle ); #else result = CloseHandle( internal_file->handle ); #endif if( result == 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; internal_file->is_device_filename = 0; internal_file->use_asynchronous_io = 0; internal_file->access_flags = 0; internal_file->size = 0; internal_file->current_offset = 0; } if( internal_file->block_data != NULL ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } } return( 0 ); } #elif defined( HAVE_CLOSE ) /* 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 ) { if( close( internal_file->descriptor ) != 0 ) { 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; internal_file->access_flags = 0; internal_file->size = 0; internal_file->current_offset = 0; } if( internal_file->block_data != NULL ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } } return( 0 ); } #else #error Missing file close function #endif /* Reads a buffer from the file * 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 ) { static char *function = "libcfile_file_read_buffer"; ssize_t read_count = 0; uint32_t error_code = 0; read_count = libcfile_file_read_buffer_with_error_code( file, buffer, size, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file.", function ); return( -1 ); } return( read_count ); } #if defined( WINAPI ) /* Reads a buffer from the file * This is an internal function to wrap ReadFile in synchronous and asynchronous mode * the current_offset is only used in asynchronous mode. * Returns the number of bytes read if successful, or -1 on error */ ssize_t libcfile_internal_file_read_buffer_at_offset_with_error_code( libcfile_internal_file_t *internal_file, off64_t current_offset, uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ) { OVERLAPPED overlapped_data; static char *function = "libcfile_internal_file_read_buffer_at_offset_with_error_code"; OVERLAPPED *overlapped = NULL; DWORD read_count = 0; BOOL io_pending = FALSE; BOOL result = FALSE; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid current offset value out of bounds.", 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } /* For Windows devices we need to use asynchronous IO here * otherwise the ReadFile function can return ERROR_INVALID_PARAMETER * if the device is read concurrently and the the block is too large * to fill. Using smaller block sizes decreases the likelyhood but * also impacts the performance. */ if( internal_file->use_asynchronous_io != 0 ) { if( memory_set( &overlapped_data, 0, sizeof( OVERLAPPED ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear overlapped data.", function ); return( -1 ); } overlapped = &overlapped_data; overlapped->Offset = (DWORD) ( 0x0ffffffffUL & current_offset ); overlapped->OffsetHigh = (DWORD) ( current_offset >> 32 ); } #if ( WINVER <= 0x0500 ) result = libcfile_ReadFile( internal_file->handle, buffer, (DWORD) size, &read_count, overlapped ); #else result = ReadFile( internal_file->handle, (VOID *) buffer, (DWORD) size, &read_count, overlapped ); #endif if( result == 0 ) { *error_code = (uint32_t) GetLastError(); switch( *error_code ) { case ERROR_HANDLE_EOF: break; case ERROR_IO_PENDING: io_pending = TRUE; 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 ); return( -1 ); } } if( io_pending == TRUE ) { #if ( WINVER <= 0x0500 ) result = libcfile_GetOverlappedResult( internal_file->handle, overlapped, &read_count, TRUE ); #else result = GetOverlappedResult( internal_file->handle, overlapped, &read_count, TRUE ); #endif if( result == 0 ) { *error_code = (uint32_t) 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 - overlapped result.", function ); return( -1 ); } } } return( (ssize_t) read_count ); } /* Reads a buffer from 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 number of bytes read if successful, or -1 on error */ ssize_t libcfile_file_read_buffer_with_error_code( libcfile_file_t *file, uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_read_buffer_with_error_code"; size_t buffer_offset = 0; size_t read_size = 0; size_t read_size_remainder = 0; ssize_t read_count = 0; BOOL result = FALSE; 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } if( internal_file->block_size != 0 ) { if( internal_file->block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing block data.", function ); return( -1 ); } } if( internal_file->current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file - current offset value out of bounds.", function ); return( -1 ); } if( ( size == 0 ) || ( (size64_t) internal_file->current_offset > internal_file->size ) ) { return( 0 ); } if( ( (size64_t) internal_file->current_offset + size ) > internal_file->size ) { size = (size_t) ( internal_file->size - internal_file->current_offset ); } if( internal_file->block_size != 0 ) { /* Read a block of data to align with the next block */ if( ( internal_file->block_data_offset > 0 ) && ( internal_file->block_data_size == 0 ) ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } read_count = libcfile_internal_file_read_buffer_at_offset_with_error_code( internal_file, internal_file->current_offset - internal_file->block_data_offset, internal_file->block_data, internal_file->block_size, error_code, error ); if( read_count != (ssize_t) internal_file->block_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: invalid read count: %" PRIzd " returned.", function, read_count ); return( -1 ); } internal_file->block_data_size = (size_t) read_count; } if( ( internal_file->block_data_offset > 0 ) && ( internal_file->block_data_offset < internal_file->block_data_size ) ) { read_size = internal_file->block_data_size - internal_file->block_data_offset; if( read_size > size ) { read_size = size; } if( memory_copy( buffer, &( internal_file->block_data[ internal_file->block_data_offset ] ), read_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy block data.", function ); return( -1 ); } buffer_offset += read_size; size -= read_size; internal_file->current_offset += read_size; internal_file->block_data_offset += read_size; } if( size == 0 ) { return( (ssize_t) buffer_offset ); } } read_size = size; if( internal_file->block_size != 0 ) { /* Read block aligned */ read_size_remainder = read_size % internal_file->block_size; read_size -= read_size_remainder; } if( read_size > 0 ) { read_count = libcfile_internal_file_read_buffer_at_offset_with_error_code( internal_file, internal_file->current_offset, &( buffer[ buffer_offset ] ), read_size, error_code, error ); if( ( internal_file->block_size == 0 ) && ( read_count < 0 ) ) { result = 0; } else if( ( internal_file->block_size != 0 ) && ( read_count != (ssize_t) read_size ) ) { result = 0; } else { result = 1; } if( result == 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, *error_code, "%s: unable to read from file.", function ); return( -1 ); } buffer_offset += (size_t) read_count; internal_file->current_offset += read_count; } /* Read the non-aligned remainder */ if( read_size_remainder > 0 ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } read_count = libcfile_internal_file_read_buffer_at_offset_with_error_code( internal_file, internal_file->current_offset, internal_file->block_data, internal_file->block_size, error_code, error ); if( read_count != (ssize_t) internal_file->block_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: invalid read count: %" PRIzd " returned.", function, read_count ); return( -1 ); } internal_file->block_data_offset = 0; internal_file->block_data_size = (size_t) read_count; if( memory_copy( &( buffer[ buffer_offset ] ), internal_file->block_data, read_size_remainder ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy block data.", function ); return( -1 ); } buffer_offset += read_size_remainder; internal_file->current_offset += read_size_remainder; internal_file->block_data_offset += read_size_remainder; } return( (ssize_t) buffer_offset ); } #elif defined( HAVE_READ ) /* 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_with_error_code( libcfile_file_t *file, uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_read_buffer_with_error_code"; size_t buffer_offset = 0; size_t read_size = 0; size_t read_size_remainder = 0; ssize_t read_count = 0; 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 = (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( 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } if( internal_file->block_size != 0 ) { if( internal_file->block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing block data.", function ); return( -1 ); } } if( internal_file->current_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file - current offset value out of bounds.", function ); return( -1 ); } if( ( size == 0 ) || ( (size64_t) internal_file->current_offset > internal_file->size ) ) { return( 0 ); } if( ( (size64_t) internal_file->current_offset + size ) > internal_file->size ) { size = (size_t) ( internal_file->size - internal_file->current_offset ); } if( internal_file->block_size != 0 ) { /* Read a block of data to align with the next block */ if( ( internal_file->block_data_offset > 0 ) && ( internal_file->block_data_size == 0 ) ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } read_count = read( internal_file->descriptor, internal_file->block_data, internal_file->block_size ); if( read_count != (ssize_t) internal_file->block_size ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, *error_code, "%s: unable to read from file.", function ); return( -1 ); } internal_file->block_data_size = (size_t) read_count; } if( ( internal_file->block_data_offset > 0 ) && ( internal_file->block_data_offset < internal_file->block_data_size ) ) { read_size = internal_file->block_data_size - internal_file->block_data_offset; if( read_size > size ) { read_size = size; } if( memory_copy( buffer, &( internal_file->block_data[ internal_file->block_data_offset ] ), read_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy block data.", function ); return( -1 ); } buffer_offset += read_size; size -= read_size; internal_file->block_data_offset += read_size; internal_file->current_offset += read_size; } if( size == 0 ) { return( (ssize_t) buffer_offset ); } } read_size = size; if( internal_file->block_size != 0 ) { /* Read block aligned */ read_size_remainder = read_size % internal_file->block_size; read_size -= read_size_remainder; } if( read_size > 0 ) { read_count = read( internal_file->descriptor, (void *) &( buffer[ buffer_offset ] ), read_size ); if( ( internal_file->block_size == 0 ) && ( read_count < 0 ) ) { result = 0; } else if( ( internal_file->block_size != 0 ) && ( read_count != (ssize_t) read_size ) ) { result = 0; } else { result = 1; } if( result == 0 ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, *error_code, "%s: unable to read from file.", function ); return( -1 ); } buffer_offset += (size_t) read_count; internal_file->current_offset += read_count; } /* Read the non-aligned remainder */ if( read_size_remainder > 0 ) { if( memory_set( internal_file->block_data, 0, internal_file->block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } read_count = read( internal_file->descriptor, internal_file->block_data, internal_file->block_size ); if( read_count != (ssize_t) internal_file->block_size ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, *error_code, "%s: unable to read from file.", function ); return( -1 ); } internal_file->block_data_offset = 0; internal_file->block_data_size = (size_t) read_count; if( memory_copy( &( buffer[ buffer_offset ] ), internal_file->block_data, read_size_remainder ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy block data.", function ); return( -1 ); } buffer_offset += read_size_remainder; internal_file->block_data_offset += read_size_remainder; internal_file->current_offset += read_size_remainder; } return( (ssize_t) buffer_offset ); } #else #error Missing file read function #endif /* Writes a buffer to the file * 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 ) { static char *function = "libcfile_file_write_buffer"; ssize_t write_count = 0; uint32_t error_code = 0; write_count = libcfile_file_write_buffer_with_error_code( file, buffer, size, &error_code, error ); if( write_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file.", function ); return( -1 ); } return( write_count ); } #if defined( WINAPI ) /* Writes a buffer to 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 number of bytes written if successful, or -1 on error */ ssize_t libcfile_file_write_buffer_with_error_code( libcfile_file_t *file, const uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_write_buffer_with_error_code"; ssize_t write_count = 0; BOOL result = FALSE; 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } #if ( WINVER <= 0x0500 ) result = libcfile_WriteFile( internal_file->handle, (VOID *) buffer, (DWORD) size, (DWORD *) &write_count, NULL ); #else result = WriteFile( internal_file->handle, (VOID *) buffer, (DWORD) size, (DWORD *) &write_count, NULL ); #endif if( result == 0 ) { *error_code = (uint32_t) 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 ); } internal_file->current_offset += write_count; if( (size64_t) internal_file->current_offset > internal_file->size ) { internal_file->size = (size64_t) internal_file->current_offset; } return( write_count ); } #elif defined( HAVE_WRITE ) /* 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_with_error_code( libcfile_file_t *file, const uint8_t *buffer, size_t size, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_write_buffer_with_error_code"; 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( 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } write_count = write( internal_file->descriptor, (void *) buffer, size ); if( write_count < 0 ) { *error_code = (uint32_t) errno; 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 ); } internal_file->current_offset += write_count; if( (size64_t) internal_file->current_offset > internal_file->size ) { internal_file->size = (size64_t) internal_file->current_offset; } return( write_count ); } #else #error Missing file write function #endif #if defined( WINAPI ) /* 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"; off64_t offset_remainder = 0; 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( internal_file->block_size != 0 ) { if( whence == SEEK_CUR ) { offset += internal_file->current_offset; } else if( whence == SEEK_END ) { offset += internal_file->size; } whence = SEEK_SET; offset_remainder = offset % internal_file->block_size; offset -= offset_remainder; } 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; } /* SetFilePointerEx cannot be used in combination with FILE_FLAG_OVERLAPPED. */ if( internal_file->use_asynchronous_io == 0 ) { #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 ); } } internal_file->current_offset = offset; if( internal_file->block_size != 0 ) { internal_file->current_offset += offset_remainder; internal_file->block_data_offset = (size_t) offset_remainder; internal_file->block_data_size = 0; } return( internal_file->current_offset ); } #elif defined( HAVE_LSEEK ) /* 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"; off64_t offset_remainder = 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( 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( internal_file->block_size != 0 ) { if( whence == SEEK_CUR ) { offset += internal_file->current_offset; } else if( whence == SEEK_END ) { offset += internal_file->size; } whence = SEEK_SET; offset_remainder = offset % internal_file->block_size; offset -= offset_remainder; } offset = lseek( internal_file->descriptor, (off_t) offset, whence ); 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 ); } internal_file->current_offset = offset; if( internal_file->block_size != 0 ) { internal_file->current_offset += offset_remainder; internal_file->block_data_offset = (size_t) offset_remainder; internal_file->block_data_size = 0; } return( internal_file->current_offset ); } #else #error Missing file lseek function #endif #if defined( WINAPI ) /* 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 ); } internal_file->current_offset = offset; #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 ) /* 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"; off_t offset = 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 SIZEOF_OFF_T >= 8 if( size > (size64_t) INT64_MAX ) #else if( size > (size64_t) INT32_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( ftruncate( internal_file->descriptor, (off_t) size ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, errno, "%s: unable to resize file.", function ); return( -1 ); } offset = lseek( internal_file->descriptor, 0, SEEK_CUR ); 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 ); } internal_file->current_offset = (off64_t) offset; 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 ) if( internal_file->handle == INVALID_HANDLE_VALUE ) #else if( internal_file->descriptor == -1 ) #endif { return( 0 ); } return( 1 ); } /* Retrieves the current offset in the file * 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 defined( WINAPI ) 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 ); } #else 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 ); } #endif if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } *offset = internal_file->current_offset; return( 1 ); } #if defined( WINAPI ) #if !defined( IOCTL_DISK_GET_LENGTH_INFO ) #define IOCTL_DISK_GET_LENGTH_INFO \ CTL_CODE( IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS ) typedef struct { LARGE_INTEGER Length; } GET_LENGTH_INFORMATION; #endif /* !defined( IOCTL_DISK_GET_LENGTH_INFO ) */ /* 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_internal_file_get_size( libcfile_internal_file_t *internal_file, size64_t *size, libcerror_error_t **error ) { DISK_GEOMETRY disk_geometry; GET_LENGTH_INFORMATION length_information; static char *function = "libcfile_internal_file_get_size"; LARGE_INTEGER large_integer_size = LIBCFILE_LARGE_INTEGER_ZERO; size_t read_count = 0; uint32_t error_code = 0; int result = 0; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } 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 ); } result = libcfile_file_is_device( (libcfile_file_t *) internal_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 a device.", function ); return( -1 ); } else if( result != 0 ) { read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, (uint8_t *) &length_information, sizeof( GET_LENGTH_INFORMATION ), &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: IOCTL_DISK_GET_LENGTH_INFO.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); if( error_code == ERROR_NOT_SUPPORTED ) { /* A floppy device does not support IOCTL_DISK_GET_LENGTH_INFO */ read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, (uint8_t *) &disk_geometry, sizeof( DISK_GEOMETRY ), &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: IOCTL_DISK_GET_DRIVE_GEOMETRY.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else { *size = disk_geometry.Cylinders.QuadPart; *size *= disk_geometry.TracksPerCylinder; *size *= disk_geometry.SectorsPerTrack; *size *= disk_geometry.BytesPerSector; } } } else { *size = (size64_t) length_information.Length.HighPart << 32; *size += (uint32_t) length_information.Length.LowPart; } } else { #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; *size += (uint32_t) large_integer_size.LowPart; #endif } return( 1 ); } #elif defined( HAVE_FSTAT ) /* 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_internal_file_get_size( libcfile_internal_file_t *internal_file, size64_t *size, libcerror_error_t **error ) { struct stat file_statistics; static char *function = "libcfile_internal_file_get_size"; size64_t safe_size = 0; ssize_t read_count = 0; off64_t current_offset = 0; off64_t offset = 0; #if defined( BLKGETSIZE64 ) || defined( DIOCGMEDIASIZE ) || defined( DIOCGDINFO ) || ( defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) ) uint32_t error_code = 0; #endif #if !defined( DIOCGMEDIASIZE ) && defined( DIOCGDINFO ) struct disklabel disk_label; #endif #if defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) uint64_t block_count = 0; uint32_t bytes_per_sector = 0; #endif if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } 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( 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 ); } if( fstat( internal_file->descriptor, &file_statistics ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file statistics.", function ); return( -1 ); } if( S_ISBLK( file_statistics.st_mode ) || S_ISCHR( file_statistics.st_mode ) ) { #if defined( BLKGETSIZE64 ) read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, (uint32_t) BLKGETSIZE64, NULL, 0, (uint8_t *) &safe_size, 8, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: BLKGETSIZE64.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } #elif defined( DIOCGMEDIASIZE ) read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, (uint32_t) DIOCGMEDIASIZE, NULL, 0, (uint8_t *) &safe_size, 8, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: DIOCGMEDIASIZE.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } #elif defined( DIOCGDINFO ) read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, (uint32_t) DIOCGDINFO, NULL, 0, (uint8_t *) &disk_label, sizeof( struct disklabel ), &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: DIOCGDINFO.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else { safe_size = disk_label.d_secperunit * disk_label.d_secsize; } #elif defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, (uint32_t) DKIOCGETBLOCKSIZE, NULL, 0, (uint8_t *) &bytes_per_sector, 4, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: DKIOCGETBLOCKSIZE.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else { read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, (uint32_t) DKIOCGETBLOCKCOUNT, NULL, 0, (uint8_t *) &block_count, 4, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to query device for: DKIOCGETBLOCKCOUNT.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } } #endif libcerror_error_free( error ); } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: block size: %" PRIu32 " block count: %" PRIu64 " ", function, bytes_per_sector, block_count ); } #endif safe_size = (size64_t) ( block_count * bytes_per_sector ); } } #endif /* defined( BLKGETSIZE64 ) || defined( DIOCGMEDIASIZE ) || defined( DIOCGDINFO ) || ( defined( DKIOCGETBLOCKCOUNT ) && defined( DKIOCGETBLOCKSIZE ) ) */ if( read_count <= 0 ) { /* Try to seek the end of the file and determine the size based on the offset */ if( libcfile_file_get_offset( (libcfile_file_t *) internal_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 ); } offset = libcfile_file_seek_offset( (libcfile_file_t *) internal_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 ); } safe_size = (size64_t) offset; offset = libcfile_file_seek_offset( (libcfile_file_t *) internal_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 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: device media size: %" PRIu64 "\n", function, safe_size ); } #endif } else { safe_size = (size64_t) file_statistics.st_size; } *size = safe_size; return( 1 ); } #else #error Missing file get size function #endif /* Retrieves the size of the file * 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"; 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( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = internal_file->size; return( 1 ); } #if defined( WINAPI ) /* Determines if a file is a device * 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 true, 0 if not or -1 on error */ int libcfile_file_is_device( libcfile_file_t *file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_is_device"; DWORD file_type = 0; 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 = (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 ); } /* TODO what about FILE_ATTRIBUTE_DEVICE using GetFileAttributes() */ /* Use the GetFileType function to rule out certain file types * like pipes, sockets, etc. */ #if ( WINVER <= 0x0500 ) file_type = libcfile_GetFileType( internal_file->handle ); #else file_type = GetFileType( internal_file->handle ); #endif if( file_type == FILE_TYPE_UNKNOWN ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine file type.", function ); return( -1 ); } else if( file_type == FILE_TYPE_DISK ) { if( internal_file->is_device_filename ) { result = 1; } } return( result ); } #elif defined( HAVE_FSTAT ) /* Determines if a file is a device * This function uses the POSIX fstat function or equivalent * Returns 1 if true, 0 if not or -1 on error */ int libcfile_file_is_device( libcfile_file_t *file, libcerror_error_t **error ) { struct stat file_statistics; libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_is_device"; 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 = (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( 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 ); } if( fstat( internal_file->descriptor, &file_statistics ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file statistics.", function ); return( -1 ); } if( S_ISBLK( file_statistics.st_mode ) || S_ISCHR( file_statistics.st_mode ) ) { result = 1; } return( result ); } #else #error Missing file is device function #endif #if defined( HAVE_IOCTL ) || defined( WINAPI ) /* Read data from a device file using IO control * This function uses the POSIX ioctl function or WINAPI DeviceIoControl * Returns the number of bytes read if successful or -1 on error */ ssize_t libcfile_internal_file_io_control_read_with_error_code( libcfile_internal_file_t *internal_file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, uint32_t *error_code, libcerror_error_t **error ) { static char *function = "libcfile_internal_file_io_control_read_with_error_code"; #if defined( WINAPI ) DWORD response_count = 0; #endif if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } #if defined( WINAPI ) 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 ); } #else 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 ); } #endif if( control_data == NULL ) { if( control_data_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid control data size value exceeds maximum.", function ); return( -1 ); } } else { #if ( UINT32_MAX < SSIZE_MAX ) if( control_data_size > (size_t) UINT32_MAX ) #else if( control_data_size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid control data size value exceeds maximum.", function ); return( -1 ); } } if( data == NULL ) { if( data_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } } else { #if ( UINT32_MAX < SSIZE_MAX ) if( data_size > (size_t) UINT32_MAX ) #else if( data_size > (size_t) SSIZE_MAX ) #endif { 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( error_code == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid error code.", function ); return( -1 ); } #if defined( WINAPI ) if( DeviceIoControl( internal_file->handle, (DWORD) control_code, control_data, (DWORD) control_data_size, data, (DWORD) data_size, &response_count, NULL ) == 0 ) { *error_code = (uint32_t) GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, *error_code, "%s: unable to IO control device.", function ); return( -1 ); } #if ( SSIZE_MAX < UINT32_MAX ) if( response_count > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid response count value out of bounds.", function ); return( -1 ); } #endif return( (ssize_t) response_count ); #elif defined( HAVE_IOCTL ) if( control_data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported control data.", function ); return( -1 ); } if( ioctl( internal_file->descriptor, (int) control_code, data ) == -1 ) { *error_code = (uint32_t) errno; libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, *error_code, "%s: unable to IO control device.", function ); return( -1 ); } return( (size_t) data_size ); #endif } #else #error Missing file IO control with data function #endif /* Read data from a device file using IO control * Returns the number of bytes read if successful or -1 on error */ ssize_t libcfile_file_io_control_read( libcfile_file_t *file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_io_control_read"; ssize_t read_count = 0; uint32_t 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; read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, control_code, control_data, control_data_size, data, data_size, &error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to to IO control device.", function ); return( -1 ); } return( read_count ); } /* Read data from a device file using IO control * Returns the number of bytes read if successful or -1 on error */ ssize_t libcfile_file_io_control_read_with_error_code( libcfile_file_t *file, uint32_t control_code, uint8_t *control_data, size_t control_data_size, uint8_t *data, size_t data_size, uint32_t *error_code, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_io_control_read_with_error_code"; 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; read_count = libcfile_internal_file_io_control_read_with_error_code( internal_file, control_code, control_data, control_data_size, data, data_size, error_code, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_IOCTL_FAILED, "%s: unable to to IO control device.", function ); return( -1 ); } return( read_count ); } /* On some versions of Linux the FADVISE definions seem to be missing from fcntl.h */ #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) #if !defined( POSIX_FADV_NORMAL ) #define POSIX_FADV_NORMAL 0 #endif #if !defined( POSIX_FADV_RANDOM ) #define POSIX_FADV_RANDOM 1 #endif #if !defined( POSIX_FADV_SEQUENTIAL ) #define POSIX_FADV_SEQUENTIAL 2 #endif #endif /* #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) */ /* Sets the expected access behavior so the system can optimize the access * Returns 1 if successful or -1 on error */ int libcfile_file_set_access_behavior( libcfile_file_t *file, int access_behavior, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_set_access_behavior"; #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) int advice = POSIX_FADV_NORMAL; int result = 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 defined( WINAPI ) 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 ); } #else 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 ); } #endif if( ( access_behavior != LIBCFILE_ACCESS_BEHAVIOR_NORMAL ) && ( access_behavior != LIBCFILE_ACCESS_BEHAVIOR_RANDOM ) && ( access_behavior != LIBCFILE_ACCESS_BEHAVIOR_SEQUENTIAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access behavior: %d.", function, access_behavior ); return( -1 ); } #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) if( access_behavior == LIBCFILE_ACCESS_BEHAVIOR_NORMAL ) { advice = POSIX_FADV_NORMAL; } else if( access_behavior == LIBCFILE_ACCESS_BEHAVIOR_RANDOM ) { advice = POSIX_FADV_RANDOM; } else if( access_behavior == LIBCFILE_ACCESS_BEHAVIOR_SEQUENTIAL ) { advice = POSIX_FADV_SEQUENTIAL; } result = posix_fadvise( internal_file->descriptor, 0, 0, advice ); /* Safely ignore if the device does not support fadvise. * Note that FreeBSD 10.0 had a bug and was returning -1 * and setting errno. */ if( ( result != 0 ) && ( result != ENODEV ) ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, errno, "%s: unable to advice file descriptor on access behavior.", function ); return( -1 ); } #endif /* defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) */ return( 1 ); } /* Sets the block size for the read and seek operations * A block size of 0 represents no block-based operations * The total size must be a multitude of block size * Returns 1 if successful or -1 on error */ int libcfile_internal_file_set_block_size( libcfile_internal_file_t *internal_file, size_t block_size, libcerror_error_t **error ) { static char *function = "libcfile_internal_file_set_block_size"; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } #if defined( WINAPI ) && ( UINT32_MAX < SSIZE_MAX ) if( block_size > (size_t) UINT32_MAX ) #else if( block_size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid block size value exceeds maximum.", function ); return( -1 ); } if( internal_file->block_data != NULL ) { if( block_size != internal_file->block_size ) { memory_free( internal_file->block_data ); internal_file->block_data = NULL; internal_file->block_data_size = 0; } } if( internal_file->block_data == NULL ) { if( block_size > 0 ) { internal_file->block_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * block_size ); if( internal_file->block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block data.", function ); return( -1 ); } if( memory_set( internal_file->block_data, 0, block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block data.", function ); return( -1 ); } } internal_file->block_size = block_size; } return( 1 ); } /* Sets the block size for the read and seek operations * A block size of 0 represents no block-based operations * The total size must be a multitude of block size * Returns 1 if successful or -1 on error */ int libcfile_file_set_block_size( libcfile_file_t *file, size_t block_size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_set_block_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 = (libcfile_internal_file_t *) file; if( ( internal_file->access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: setting block size not supported with write access.", function ); return( -1 ); } #if defined( WINAPI ) 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 ); } #else 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 ); } #endif #if defined( WINAPI ) && ( UINT32_MAX < SSIZE_MAX ) if( block_size > (size_t) UINT32_MAX ) #else if( block_size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid block size value exceeds maximum.", function ); return( -1 ); } if( ( block_size != 0 ) && ( ( internal_file->size % block_size ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid block size value out of bounds.", function ); return( -1 ); } if( libcfile_internal_file_set_block_size( internal_file, block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set block size.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libcfile/libcfile_libclocale.h0000644000175000017500000000266314610746225022242 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCFILE_LIBCLOCALE_H ) */ libesedb-20240420/libcfile/libcfile_winapi.h0000644000175000017500000000604314610746225021434 0ustar00lordyestalordyesta/* * WINAPI fallback functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCFILE_WINAPI_H ) #define _LIBCFILE_WINAPI_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcfile_CloseHandle( HANDLE file_handle ); HANDLE libcfile_CreateFileA( LPCSTR filename, DWORD desired_access, DWORD share_mode, SECURITY_ATTRIBUTES *security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) HANDLE libcfile_CreateFileW( LPCWSTR filename, DWORD desired_access, DWORD share_mode, SECURITY_ATTRIBUTES *security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ BOOL libcfile_GetOverlappedResult( HANDLE file_handle, OVERLAPPED *overlapped, DWORD *read_count, BOOL wait_io_complete ); BOOL libcfile_ReadFile( HANDLE file_handle, VOID *buffer, DWORD read_size, DWORD *read_count, OVERLAPPED *overlapped ); BOOL libcfile_WriteFile( HANDLE file_handle, VOID *buffer, DWORD write_size, DWORD *write_count, OVERLAPPED *overlapped ); BOOL libcfile_SetFilePointerEx( HANDLE file_handle, LARGE_INTEGER distance_to_move_large_integer, LARGE_INTEGER *new_file_pointer_large_integer, DWORD move_method ); BOOL libcfile_SetEndOfFile( HANDLE file_handle ); BOOL libcfile_GetFileSizeEx( HANDLE file_handle, LARGE_INTEGER *file_size_large_integer ); DWORD libcfile_GetFileType( HANDLE file_handle ); DWORD libcfile_GetFileAttributesA( LPCSTR filename ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) DWORD libcfile_GetFileAttributesW( LPCWSTR filename ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ BOOL libcfile_DeleteFileA( LPCSTR filename ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) BOOL libcfile_DeleteFileW( LPCWSTR filename ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCFILE_WINAPI_H ) */ libesedb-20240420/libcfile/Makefile.in0000644000175000017500000007634614610746265020231 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_libcnotify.h libcfile_libuna.h libcfile_notify.c \ libcfile_notify.h libcfile_support.c libcfile_support.h \ libcfile_system_string.c libcfile_system_string.h \ libcfile_types.h libcfile_unused.h libcfile_winapi.c \ libcfile_winapi.h @HAVE_LOCAL_LIBCFILE_TRUE@am_libcfile_la_OBJECTS = libcfile_error.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_file.lo libcfile_notify.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_system_string.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_winapi.lo libcfile_la_OBJECTS = $(am_libcfile_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCFILE_TRUE@am_libcfile_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcfile_error.Plo \ ./$(DEPDIR)/libcfile_file.Plo ./$(DEPDIR)/libcfile_notify.Plo \ ./$(DEPDIR)/libcfile_support.Plo \ ./$(DEPDIR)/libcfile_system_string.Plo \ ./$(DEPDIR)/libcfile_winapi.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcfile_la_SOURCES) DIST_SOURCES = $(am__libcfile_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCFILE_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBUNA_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_libcnotify.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libuna.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_notify.c libcfile_notify.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.c libcfile_support.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_system_string.c libcfile_system_string.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_types.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_unused.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_winapi.c libcfile_winapi.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcfile.la: $(libcfile_la_OBJECTS) $(libcfile_la_DEPENDENCIES) $(EXTRA_libcfile_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_notify.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_system_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_winapi.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcfile_error.Plo -rm -f ./$(DEPDIR)/libcfile_file.Plo -rm -f ./$(DEPDIR)/libcfile_notify.Plo -rm -f ./$(DEPDIR)/libcfile_support.Plo -rm -f ./$(DEPDIR)/libcfile_system_string.Plo -rm -f ./$(DEPDIR)/libcfile_winapi.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcfile_error.Plo -rm -f ./$(DEPDIR)/libcfile_file.Plo -rm -f ./$(DEPDIR)/libcfile_notify.Plo -rm -f ./$(DEPDIR)/libcfile_support.Plo -rm -f ./$(DEPDIR)/libcfile_system_string.Plo -rm -f ./$(DEPDIR)/libcfile_winapi.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libcfile/libcfile_error.c0000644000175000017500000000553614610746225021277 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libcfile_error_sprint( libcfile_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libcfile_error_backtrace_sprint( libcfile_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ libesedb-20240420/libcfile/libcfile_libuna.h0000644000175000017500000000331014610746225021411 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBCFILE_LIBUNA_H ) */ libesedb-20240420/libcfile/libcfile_winapi.c0000644000175000017500000004372414610746225021436 0ustar00lordyestalordyesta/* * WINAPI fallback functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( WINAPI ) #include #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #include #endif #include "libcfile_winapi.h" #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of CloseHandle * Returns TRUE if successful or FALSE on error */ BOOL libcfile_CloseHandle( HANDLE file_handle ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "CloseHandle" ); 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 ); } /* Cross Windows safe version of CreateFileA * Returns a handle if successful or INVALID_HANDLE_VALUE on error */ HANDLE libcfile_CreateFileA( LPCSTR filename, DWORD desired_access, DWORD share_mode, SECURITY_ATTRIBUTES *security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file ) { FARPROC function = NULL; HANDLE result = INVALID_HANDLE_VALUE; HMODULE library_handle = NULL; if( filename == NULL ) { return( INVALID_HANDLE_VALUE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( INVALID_HANDLE_VALUE ); } function = GetProcAddress( library_handle, (LPCSTR) "CreateFileA" ); if( function != NULL ) { result = (HANDLE) function( filename, desired_access, share_mode, security_attributes, creation_disposition, flags_and_attributes, template_file ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcfile_CloseHandle( result ); return( INVALID_HANDLE_VALUE ); } return( result ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Cross Windows safe version of CreateFileW * Returns a handle if successful or INVALID_HANDLE_VALUE on error */ HANDLE libcfile_CreateFileW( LPCWSTR filename, DWORD desired_access, DWORD share_mode, SECURITY_ATTRIBUTES *security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file ) { FARPROC function = NULL; HANDLE result = INVALID_HANDLE_VALUE; HMODULE library_handle = NULL; if( filename == NULL ) { return( INVALID_HANDLE_VALUE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( INVALID_HANDLE_VALUE ); } function = GetProcAddress( library_handle, (LPCSTR) "CreateFileW" ); if( function != NULL ) { result = (HANDLE) function( filename, desired_access, share_mode, security_attributes, creation_disposition, flags_and_attributes, template_file ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcfile_CloseHandle( result ); return( INVALID_HANDLE_VALUE ); } return( result ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Cross Windows safe version of GetOverlappedResult * Returns TRUE if successful or FALSE on error */ BOOL libcfile_GetOverlappedResult( HANDLE file_handle, OVERLAPPED *overlapped, DWORD *read_count, BOOL wait_io_complete ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } if( overlapped == NULL ) { return( FALSE ); } if( read_count == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "GetOverlappedResult" ); if( function != NULL ) { result = function( file_handle, overlapped, read_count, wait_io_complete ); } /* 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 ReadFile * Returns TRUE if successful or FALSE on error */ BOOL libcfile_ReadFile( HANDLE file_handle, VOID *buffer, DWORD read_size, DWORD *read_count, OVERLAPPED *overlapped ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } if( buffer == NULL ) { return( FALSE ); } if( read_count == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "ReadFile" ); if( function != NULL ) { result = function( file_handle, buffer, read_size, read_count, overlapped ); } /* 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 WriteFile * Returns TRUE if successful or FALSE on error */ BOOL libcfile_WriteFile( HANDLE file_handle, VOID *buffer, DWORD write_size, DWORD *write_count, OVERLAPPED *overlapped ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } if( buffer == NULL ) { return( FALSE ); } if( write_count == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "WriteFile" ); if( function != NULL ) { result = function( file_handle, buffer, write_size, write_count, overlapped ); } /* 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 ); } #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( _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 { function = GetProcAddress( library_handle, (LPCSTR) "SetFilePointer" ); if( function != NULL ) { #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 distance_to_move_lower_long = function( 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 ) ) { #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 ); } /* 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( _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 ); } /* 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( _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 { function = GetProcAddress( library_handle, (LPCSTR) "GetFileSize" ); if( function != NULL ) { file_size_lower_dword = function( file_handle, &file_size_upper_dword ); error_number = GetLastError(); if( ( file_size_lower_dword != INVALID_FILE_SIZE ) || ( error_number == NO_ERROR ) ) { #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 ); } /* Cross Windows safe version of GetFileType * Returns the file type if successful or FILE_TYPE_UNKNOWN on error */ DWORD libcfile_GetFileType( HANDLE file_handle ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = FILE_TYPE_UNKNOWN; if( file_handle == NULL ) { return( FILE_TYPE_UNKNOWN ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FILE_TYPE_UNKNOWN ); } function = GetProcAddress( library_handle, (LPCSTR) "GetFileType" ); 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 = FILE_TYPE_UNKNOWN; } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of GetFileAttributesA * Returns the file attributs if successful or INVALID_FILE_ATTRIBUTES on error */ DWORD libcfile_GetFileAttributesA( LPCSTR filename ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( filename == NULL ) { return( INVALID_FILE_ATTRIBUTES ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( INVALID_FILE_ATTRIBUTES ); } function = GetProcAddress( library_handle, (LPCSTR) "GetFileAttributesA" ); if( function != NULL ) { result = function( filename ); } /* 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 = INVALID_FILE_ATTRIBUTES; } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of GetFileAttributesW * Returns the file attributs if successful or INVALID_FILE_ATTRIBUTES on error */ DWORD libcfile_GetFileAttributesW( LPCWSTR filename ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( filename == NULL ) { return( INVALID_FILE_ATTRIBUTES ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( INVALID_FILE_ATTRIBUTES ); } function = GetProcAddress( library_handle, (LPCSTR) "GetFileAttributesW" ); if( function != NULL ) { result = function( filename ); } /* 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 = INVALID_FILE_ATTRIBUTES; } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of DeleteFileA * Returns TRUE if successful or FALSE on error */ BOOL libcfile_DeleteFileA( LPCSTR filename ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( filename == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "DeleteFileA" ); if( function != NULL ) { result = function( filename ); } /* 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 /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of DeleteFileW * Returns TRUE if successful or FALSE on error */ BOOL libcfile_DeleteFileW( LPCWSTR filename ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( filename == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "DeleteFileW" ); if( function != NULL ) { result = function( filename ); } /* 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 /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libcfile/libcfile_definitions.h0000644000175000017500000000547714610746225022472 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libcfile version string */ #define LIBCFILE_VERSION_STRING "20240414" /* 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 */ enum LIBCFILE_ACCESS_FLAGS { LIBCFILE_ACCESS_FLAG_READ = 0x01, LIBCFILE_ACCESS_FLAG_WRITE = 0x02, 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 ) /* The access behavior types */ enum LIBCFILE_ACCESS_BEHAVIOR { LIBCFILE_ACCESS_BEHAVIOR_NORMAL, LIBCFILE_ACCESS_BEHAVIOR_RANDOM, LIBCFILE_ACCESS_BEHAVIOR_SEQUENTIAL }; #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 libesedb-20240420/README0000644000175000017500000000153014610727625015251 0ustar00lordyestalordyestalibesedb is a library to access the Extensible Storage Engine (ESE) Database File (EDB) format. The ESE database format is used in may different applications like Windows Search, Windows Mail, Exchange, Active Directory, etc. Project information: * Status: experimental * Licence: LGPLv3+ Work in progress: * Refactor to allow libesedb handle +10G databases Planned: * Multi-threading support Also see: * Forensic analysis of the Windows Search database: https://github.com/libyal/documentation/blob/master/Forensic%20analysis%20of%20the%20Windows%20Search%20database.pdf * Extensible Storage Engine (ESE) Database File Knowledge Base: https://github.com/libyal/esedb-kb For more information see: * Project documentation: https://github.com/libyal/libesedb/wiki/Home * How to build from source: https://github.com/libyal/libesedb/wiki/Building libesedb-20240420/libmapidb/0000755000175000017500000000000014610746414016312 5ustar00lordyestalordyestalibesedb-20240420/libmapidb/libmapidb_unused.h0000644000175000017500000000261014610746246021773 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_UNUSED_H ) #define _LIBMAPIDB_UNUSED_H #include #if !defined( LIBMAPIDB_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBMAPIDB_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBMAPIDB_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBMAPIDB_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBMAPIDB_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBMAPIDB_UNUSED_H ) */ libesedb-20240420/libmapidb/libmapidb_libcnotify.h0000644000175000017500000000254314610746246022637 0ustar00lordyestalordyesta/* * The internal libcnotify header * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_LIBCNOTIFY_H ) #define _LIBMAPIDB_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 libesedb-20240420/libmapidb/libmapidb_folder.h0000644000175000017500000000277714610746246021761 0ustar00lordyestalordyesta/* * Folder functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_INTERNAL_FOLDER_H ) #define _LIBMAPIDB_INTERNAL_FOLDER_H #include #include #include "libmapidb_extern.h" #include "libmapidb_libcerror.h" #include "libmapidb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libmapidb_internal_folder libmapidb_internal_folder_t; struct libmapidb_internal_folder { /* Dummy */ int dummy; }; LIBMAPIDB_EXTERN \ int libmapidb_folder_initialize( libmapidb_folder_t **folder, libcerror_error_t **error ); LIBMAPIDB_EXTERN \ int libmapidb_folder_free( libmapidb_folder_t **folder, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBMAPIDB_INTERNAL_FOLDER_H ) */ libesedb-20240420/libmapidb/libmapidb_error.h0000644000175000017500000000343214610746246021624 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_INTERNAL_ERROR_H ) #define _LIBMAPIDB_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBMAPIDB ) #include #endif #include "libmapidb_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBMAPIDB ) LIBMAPIDB_EXTERN \ void libmapidb_error_free( libmapidb_error_t **error ); LIBMAPIDB_EXTERN \ int libmapidb_error_fprint( libmapidb_error_t *error, FILE *stream ); LIBMAPIDB_EXTERN \ int libmapidb_error_sprint( libmapidb_error_t *error, char *string, size_t size ); LIBMAPIDB_EXTERN \ int libmapidb_error_backtrace_fprint( libmapidb_error_t *error, FILE *stream ); LIBMAPIDB_EXTERN \ int libmapidb_error_backtrace_sprint( libmapidb_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBMAPIDB ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBMAPIDB_INTERNAL_ERROR_H ) */ libesedb-20240420/libmapidb/Makefile.am0000644000175000017500000000141514610746246020352 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBMAPIDB AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ noinst_LTLIBRARIES = libmapidb.la libmapidb_la_SOURCES = \ libmapidb_database.c libmapidb_database.h \ libmapidb_definitions.h \ libmapidb_error.c libmapidb_error.h \ libmapidb_extern.h \ libmapidb_folder.c libmapidb_folder.h \ libmapidb_libcerror.h \ libmapidb_libcnotify.h \ libmapidb_support.c libmapidb_support.h \ libmapidb_types.h \ libmapidb_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libmapidb ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libmapidb_la_SOURCES) libesedb-20240420/libmapidb/libmapidb_database.h0000644000175000017500000000330314610746246022234 0ustar00lordyestalordyesta/* * Database functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_INTERNAL_DATABASE_H ) #define _LIBMAPIDB_INTERNAL_DATABASE_H #include #include #include "libmapidb_extern.h" #include "libmapidb_libcerror.h" #include "libmapidb_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libmapidb_internal_database libmapidb_internal_database_t; struct libmapidb_internal_database { /* Dummy */ int dummy; }; LIBMAPIDB_EXTERN \ int libmapidb_database_initialize( libmapidb_database_t **database, libcerror_error_t **error ); LIBMAPIDB_EXTERN \ int libmapidb_database_free( libmapidb_database_t **database, libcerror_error_t **error ); LIBMAPIDB_EXTERN \ int libmapidb_database_get_root_folder( libmapidb_database_t *database, libmapidb_folder_t **root_folder, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBMAPIDB_INTERNAL_DATABASE_H ) */ libesedb-20240420/libmapidb/libmapidb_types.h0000644000175000017500000000311514610746246021635 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_INTERNAL_TYPES_H ) #define _LIBMAPIDB_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBMAPIDB for local use of libmapidb * The definitions in are copied here * for local use of libmapidb */ #if defined( HAVE_LOCAL_LIBMAPIDB ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libmapidb_database {} libmapidb_database_t; typedef struct libmapidb_folder {} libmapidb_folder_t; #else typedef intptr_t libmapidb_database_t; typedef intptr_t libmapidb_folder_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBMAPIDB ) */ #endif /* !defined( _LIBMAPIDB_INTERNAL_TYPES_H ) */ libesedb-20240420/libmapidb/libmapidb_folder.c0000644000175000017500000000622414610746246021743 0ustar00lordyestalordyesta/* * Folder functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libmapidb_definitions.h" #include "libmapidb_folder.h" #include "libmapidb_libcerror.h" #include "libmapidb_types.h" /* Creates a folder * Make sure the value folder is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libmapidb_folder_initialize( libmapidb_folder_t **folder, libcerror_error_t **error ) { libmapidb_internal_folder_t *internal_folder = NULL; static char *function = "libmapidb_folder_initialize"; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } if( *folder != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid folder value already set.", function ); return( -1 ); } internal_folder = memory_allocate_structure( libmapidb_internal_folder_t ); if( internal_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create folder.", function ); goto on_error; } if( memory_set( internal_folder, 0, sizeof( libmapidb_internal_folder_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear folder.", function ); goto on_error; } *folder = (libmapidb_folder_t *) internal_folder; return( 1 ); on_error: if( internal_folder != NULL ) { memory_free( internal_folder ); } return( -1 ); } /* Frees a folder * Returns 1 if successful or -1 on error */ int libmapidb_folder_free( libmapidb_folder_t **folder, libcerror_error_t **error ) { libmapidb_internal_folder_t *internal_folder = NULL; static char *function = "libmapidb_folder_free"; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } if( *folder != NULL ) { internal_folder = (libmapidb_internal_folder_t *) *folder; *folder = NULL; memory_free( internal_folder ); } return( 1 ); } libesedb-20240420/libmapidb/libmapidb_database.c0000644000175000017500000000636014610746246022235 0ustar00lordyestalordyesta/* * Database functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libmapidb_database.h" #include "libmapidb_definitions.h" #include "libmapidb_libcerror.h" #include "libmapidb_types.h" /* Creates a database * Make sure the value database is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libmapidb_database_initialize( libmapidb_database_t **database, libcerror_error_t **error ) { libmapidb_internal_database_t *internal_database = NULL; static char *function = "libmapidb_database_initialize"; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( *database != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid database value already set.", function ); return( -1 ); } internal_database = memory_allocate_structure( libmapidb_internal_database_t ); if( internal_database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create database.", function ); goto on_error; } if( memory_set( internal_database, 0, sizeof( libmapidb_internal_database_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear database.", function ); goto on_error; } *database = (libmapidb_database_t *) internal_database; return( 1 ); on_error: if( internal_database != NULL ) { memory_free( internal_database ); } return( -1 ); } /* Frees a database * Returns 1 if successful or -1 on error */ int libmapidb_database_free( libmapidb_database_t **database, libcerror_error_t **error ) { libmapidb_internal_database_t *internal_database = NULL; static char *function = "libmapidb_database_free"; if( database == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid database.", function ); return( -1 ); } if( *database != NULL ) { internal_database = (libmapidb_internal_database_t *) *database; *database = NULL; memory_free( internal_database ); } return( 1 ); } libesedb-20240420/libmapidb/libmapidb_libcerror.h0000644000175000017500000000264114610746246022457 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_LIBCERROR_H ) #define _LIBMAPIDB_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBMAPIDB_LIBCERROR_H ) */ libesedb-20240420/libmapidb/Makefile.in0000644000175000017500000007463214610746266020400 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = libmapidb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmapidb_la_LIBADD = am__libmapidb_la_SOURCES_DIST = libmapidb_database.c \ libmapidb_database.h libmapidb_definitions.h libmapidb_error.c \ libmapidb_error.h libmapidb_extern.h libmapidb_folder.c \ libmapidb_folder.h libmapidb_libcerror.h \ libmapidb_libcnotify.h libmapidb_support.c libmapidb_support.h \ libmapidb_types.h libmapidb_unused.h @HAVE_LOCAL_LIBMAPIDB_TRUE@am_libmapidb_la_OBJECTS = \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_database.lo \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_error.lo \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_folder.lo \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_support.lo libmapidb_la_OBJECTS = $(am_libmapidb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBMAPIDB_TRUE@am_libmapidb_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libmapidb_database.Plo \ ./$(DEPDIR)/libmapidb_error.Plo \ ./$(DEPDIR)/libmapidb_folder.Plo \ ./$(DEPDIR)/libmapidb_support.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmapidb_la_SOURCES) DIST_SOURCES = $(am__libmapidb_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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_LIBMAPIDB_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ -I../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ @LIBCNOTIFY_CPPFLAGS@ @HAVE_LOCAL_LIBMAPIDB_TRUE@noinst_LTLIBRARIES = libmapidb.la @HAVE_LOCAL_LIBMAPIDB_TRUE@libmapidb_la_SOURCES = \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_database.c libmapidb_database.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_definitions.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_error.c libmapidb_error.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_extern.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_folder.c libmapidb_folder.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_libcerror.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_libcnotify.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_support.c libmapidb_support.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_types.h \ @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_unused.h DISTCLEANFILES = \ Makefile \ 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 libmapidb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libmapidb/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmapidb.la: $(libmapidb_la_OBJECTS) $(libmapidb_la_DEPENDENCIES) $(EXTRA_libmapidb_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libmapidb_la_rpath) $(libmapidb_la_OBJECTS) $(libmapidb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmapidb_database.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmapidb_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmapidb_folder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmapidb_support.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libmapidb_database.Plo -rm -f ./$(DEPDIR)/libmapidb_error.Plo -rm -f ./$(DEPDIR)/libmapidb_folder.Plo -rm -f ./$(DEPDIR)/libmapidb_support.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libmapidb_database.Plo -rm -f ./$(DEPDIR)/libmapidb_error.Plo -rm -f ./$(DEPDIR)/libmapidb_folder.Plo -rm -f ./$(DEPDIR)/libmapidb_support.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libmapidb ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libmapidb_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: libesedb-20240420/libmapidb/libmapidb_support.h0000644000175000017500000000225714610746246022213 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_SUPPORT_H ) #define _LIBMAPIDB_SUPPORT_H #include #include #include "libmapidb_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBMAPIDB ) LIBMAPIDB_EXTERN \ const char *libmapidb_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBMAPIDB_SUPPORT_H ) */ libesedb-20240420/libmapidb/libmapidb_extern.h0000644000175000017500000000257214610746246022004 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBMAPIDB_INTERNAL_EXTERN_H ) #define _LIBMAPIDB_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBMAPIDB for local use of libmapidb */ #if !defined( HAVE_LOCAL_LIBMAPIDB ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBMAPIDB_EXTERN_VARIABLE extern #else #define LIBMAPIDB_EXTERN_VARIABLE LIBMAPIDB_EXTERN #endif #else #define LIBMAPIDB_EXTERN /* extern */ #define LIBMAPIDB_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBMAPIDB ) */ #endif /* !defined( _LIBMAPIDB_INTERNAL_EXTERN_H ) */ libesedb-20240420/libmapidb/libmapidb_definitions.h0000644000175000017500000000300014610746246022775 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( LIBMAPIDB_INTERNAL_DEFINITIONS_H ) #define LIBMAPIDB_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBMAPIDB for local use of libmapidb */ #if !defined( HAVE_LOCAL_LIBMAPIDB ) #include /* The definitions in are copied here * for local use of libmapidb */ #else #include #define LIBMAPIDB_VERSION 20240420 /* The libmapidb version string */ #define LIBMAPIDB_VERSION_STRING "20240420" /* The endian definitions */ #define LIBMAPIDB_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBMAPIDB_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE #endif /* !defined( HAVE_LOCAL_LIBMAPIDB ) */ #endif libesedb-20240420/libmapidb/libmapidb_error.c0000644000175000017500000000555414610746246021626 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libmapidb_error.h" #include "libmapidb_libcerror.h" #if !defined( HAVE_LOCAL_LIBMAPIDB ) /* Free an error and its elements */ void libmapidb_error_free( libmapidb_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 libmapidb_error_fprint( libmapidb_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libmapidb_error_sprint( libmapidb_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libmapidb_error_backtrace_fprint( libmapidb_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libmapidb_error_backtrace_sprint( libmapidb_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBMAPIDB ) */ libesedb-20240420/libmapidb/libmapidb_support.c0000644000175000017500000000222414610746246022200 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libmapidb_definitions.h" #include "libmapidb_libcerror.h" #include "libmapidb_support.h" #if !defined( HAVE_LOCAL_LIBMAPIDB ) /* Returns the library version as a string */ const char *libmapidb_get_version( void ) { return( (const char *) LIBMAPIDB_VERSION_STRING ); } #endif libesedb-20240420/INSTALL0000644000175000017500000003662614610746265015441 0ustar00lordyestalordyestaInstallation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 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 command './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. HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. 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 limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/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. libesedb-20240420/libcdata/0000755000175000017500000000000014610746413016131 5ustar00lordyestalordyestalibesedb-20240420/libcdata/libcdata_list_element.h0000644000175000017500000000743714610746222022622 0ustar00lordyestalordyesta/* * List element functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_LIST_ELEMENT_H ) #define _LIBCDATA_LIST_ELEMENT_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_internal_list_element libcdata_internal_list_element_t; struct libcdata_internal_list_element { /* The list the element is part of */ intptr_t *parent_list; /* The previous list element */ libcdata_list_element_t *previous_element; /* The next list element */ libcdata_list_element_t *next_element; /* The value */ intptr_t *value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_list_element_initialize( libcdata_list_element_t **element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_free( libcdata_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_list_element_get_parent_list( libcdata_list_element_t *element, intptr_t **parent_list, libcerror_error_t **error ); int libcdata_list_element_set_parent_list( libcdata_list_element_t *element, intptr_t *parent_list, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_get_previous_element( libcdata_list_element_t *element, libcdata_list_element_t **previous_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_set_previous_element( libcdata_list_element_t *element, libcdata_list_element_t *previous_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_get_next_element( libcdata_list_element_t *element, libcdata_list_element_t **next_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_set_next_element( libcdata_list_element_t *element, libcdata_list_element_t *next_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_get_elements( libcdata_list_element_t *element, libcdata_list_element_t **previous_element, libcdata_list_element_t **next_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_set_elements( libcdata_list_element_t *element, libcdata_list_element_t *previous_element, libcdata_list_element_t *next_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_get_value( libcdata_list_element_t *element, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_element_set_value( libcdata_list_element_t *element, intptr_t *value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_LIST_ELEMENT_H ) */ libesedb-20240420/libcdata/libcdata_array.h0000644000175000017500000001215714610746222021247 0ustar00lordyestalordyesta/* * Array functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_ARRAY_H ) #define _LIBCDATA_ARRAY_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_internal_array libcdata_internal_array_t; struct libcdata_internal_array { /* The number of allocated entries */ int number_of_allocated_entries; /* The number of entries */ int number_of_entries; /* The entries */ intptr_t **entries; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_array_initialize( libcdata_array_t **array, int number_of_entries, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_free( libcdata_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_empty( libcdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_array_clear( libcdata_internal_array_t *internal_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_clear( libcdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_clone( libcdata_array_t **destination_array, libcdata_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination_entry, intptr_t *source_entry, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_array_resize( libcdata_internal_array_t *internal_array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_resize( libcdata_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_reverse( libcdata_array_t *array, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_get_number_of_entries( libcdata_array_t *array, int *number_of_entries, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_get_entry_by_index( libcdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_get_entry_by_value( libcdata_array_t *array, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), intptr_t **existing_entry, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_set_entry_by_index( libcdata_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_prepend_entry( libcdata_array_t *array, intptr_t *entry, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_append_entry( libcdata_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_array_insert_entry( libcdata_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 ); LIBCDATA_EXTERN \ int libcdata_array_remove_entry( libcdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_ARRAY_H ) */ libesedb-20240420/libcdata/libcdata_definitions.h0000644000175000017500000000410314610746222022434 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( LIBCDATA_INTERNAL_DEFINITIONS_H ) #define LIBCDATA_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if !defined( HAVE_LOCAL_LIBCDATA ) #include /* The definitions in are copied here * for local use of libcdata */ #else #define LIBCDATA_VERSION 20240414 /* The libcdata version string */ #define LIBCDATA_VERSION_STRING "20240414" /* The comparison function definitions */ enum LIBCDATA_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBCDATA_COMPARE_LESS, /* The first and second values are equal */ LIBCDATA_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBCDATA_COMPARE_GREATER }; /* The insert flag definitions */ enum LIBCDATA_INSERT_FLAGS { /* Allow duplicate entries */ LIBCDATA_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES = 0x01 }; #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ /* Limiting the maximum size of the array entries to 128 MiB */ #define LIBCDATA_ARRAY_ENTRIES_MEMORY_LIMIT 128 * 1024 * 1024 #endif /* !defined( LIBCDATA_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libcdata/libcdata_libcerror.h0000644000175000017500000000263614610746222022115 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_LIBCERROR_H ) #define _LIBCDATA_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCDATA_LIBCERROR_H ) */ libesedb-20240420/libcdata/libcdata_unused.h0000644000175000017500000000260014610746222021424 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_UNUSED_H ) #define _LIBCDATA_UNUSED_H #include #if !defined( LIBCDATA_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCDATA_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCDATA_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCDATA_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCDATA_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCDATA_UNUSED_H ) */ libesedb-20240420/libcdata/libcdata_btree.h0000644000175000017500000000731614610746222021233 0ustar00lordyestalordyesta/* * Balanced tree type functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_BTREE_H ) #define _LIBCDATA_BTREE_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif /* The balanced tree uses the list and tree node * The value of a tree node contains a list where each value in the list corresponds with either a sub node or a leaf value * The values array is used for sequential access to the leaf values */ typedef struct libcdata_internal_btree libcdata_internal_btree_t; struct libcdata_internal_btree { /* The values array */ libcdata_array_t *values_array; /* The root node */ libcdata_tree_node_t *root_node; /* The maximum number of values */ int maximum_number_of_values; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_btree_initialize( libcdata_btree_t **tree, int maximum_number_of_sub_nodes, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_free( libcdata_btree_t **tree, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); /* TODO clone function */ LIBCDATA_EXTERN \ int libcdata_btree_get_number_of_values( libcdata_btree_t *tree, int *number_of_values, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_get_value_by_index( libcdata_btree_t *tree, int value_index, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_get_value_by_value( libcdata_btree_t *tree, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, intptr_t **existing_value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_insert_value( libcdata_btree_t *tree, int *value_index, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, intptr_t **existing_value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_replace_value( libcdata_btree_t *tree, libcdata_tree_node_t *upper_node, int *value_index, intptr_t *value, int *replacement_value_index, intptr_t *replacement_value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_btree_remove_value( libcdata_btree_t *tree, libcdata_tree_node_t *upper_node, int *value_index, intptr_t *value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_BTREE_H ) */ libesedb-20240420/libcdata/libcdata_btree.c0000644000175000017500000005352614610746222021232 0ustar00lordyestalordyesta/* * Balanced tree type functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_array.h" #include "libcdata_btree.h" #include "libcdata_btree_node.h" #include "libcdata_btree_values_list.h" #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_list.h" #include "libcdata_list_element.h" #include "libcdata_tree_node.h" #include "libcdata_types.h" /* Creates a tree * Make sure the value tree is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_btree_initialize( libcdata_btree_t **tree, int maximum_number_of_values, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; static char *function = "libcdata_btree_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( maximum_number_of_values <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid maximum number of values value out of bounds.", function ); return( -1 ); } internal_tree = memory_allocate_structure( libcdata_internal_btree_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( libcdata_internal_btree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree.", function ); memory_free( internal_tree ); return( -1 ); } if( libcdata_array_initialize( &( internal_tree->values_array ), 0, 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; } if( libcdata_tree_node_initialize( &( internal_tree->root_node ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root node.", function ); goto on_error; } internal_tree->maximum_number_of_values = maximum_number_of_values; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_tree->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *tree = (libcdata_btree_t *) internal_tree; return( 1 ); on_error: if( internal_tree != NULL ) { if( internal_tree->values_array != NULL ) { libcdata_array_free( &( internal_tree->values_array ), NULL, NULL ); } memory_free( internal_tree ); } return( -1 ); } /* Frees a tree, its sub nodes * Uses the value_free_function to free the value * Returns 1 if successful or -1 on error */ int libcdata_btree_free( libcdata_btree_t **tree, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; static char *function = "libcdata_btree_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 = (libcdata_internal_btree_t *) *tree; *tree = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_tree->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif if( libcdata_tree_node_free( &( internal_tree->root_node ), (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_values_list_free, 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( libcdata_array_free( &( internal_tree->values_array ), value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free values array.", function ); result = -1; } memory_free( internal_tree ); } return( result ); } /* TODO add clone function ? */ /* Retrieves the number of values in the tree * Returns 1 if successful or -1 on error */ int libcdata_btree_get_number_of_values( libcdata_btree_t *tree, int *number_of_values, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; static char *function = "libcdata_btree_get_number_of_values"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libcdata_internal_btree_t *) tree; if( libcdata_array_get_number_of_entries( internal_tree->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 array entries.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific value * Returns 1 if successful or -1 on error */ int libcdata_btree_get_value_by_index( libcdata_btree_t *tree, int value_index, intptr_t **value, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; static char *function = "libcdata_btree_get_value_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 = (libcdata_internal_btree_t *) tree; if( libcdata_array_get_entry_by_index( internal_tree->values_array, value_index, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from array.", function, value_index ); return( -1 ); } return( 1 ); } /* Retrieves a value from the tree * * Uses the value_compare_function to determine the similarity of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libcdata_btree_get_value_by_value( libcdata_btree_t *tree, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, intptr_t **existing_value, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; libcdata_list_element_t *existing_list_element = NULL; static char *function = "libcdata_btree_get_value_by_value"; 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 = (libcdata_internal_btree_t *) tree; result = libcdata_btree_node_get_upper_node_by_value( internal_tree->root_node, value, value_compare_function, upper_node, &existing_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper node by value.", function ); return( -1 ); } else if( result != 0 ) { if( libcdata_list_element_get_value( existing_list_element, existing_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from values list element.", function ); return( -1 ); } } else { if( existing_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing value.", function ); return( -1 ); } *existing_value = NULL; } return( result ); } /* Inserts a value into a tree * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if the value already exists or -1 on error */ int libcdata_btree_insert_value( libcdata_btree_t *tree, int *value_index, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, intptr_t **existing_value, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; libcdata_list_t *values_list = NULL; libcdata_list_element_t *existing_list_element = NULL; static char *function = "libcdata_btree_insert_value"; int number_of_values_list_elements = 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 = (libcdata_internal_btree_t *) tree; if( upper_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid upper node.", 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( existing_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing value.", function ); return( -1 ); } result = libcdata_btree_node_get_upper_node_by_value( internal_tree->root_node, value, value_compare_function, upper_node, &existing_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper node in root node.", function ); return( -1 ); } else if( result != 0 ) { if( libcdata_list_element_get_value( existing_list_element, existing_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from values list element.", function ); return( -1 ); } return( 0 ); } *existing_value = NULL; if( libcdata_btree_node_insert_value( *upper_node, value, value_compare_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert value in upper node.", function ); return( -1 ); } if( libcdata_tree_node_get_value( *upper_node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } if( libcdata_list_get_number_of_elements( values_list, &number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values list elements.", function ); return( -1 ); } if( number_of_values_list_elements >= internal_tree->maximum_number_of_values ) { if( libcdata_btree_node_split( *upper_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to split upper node.", function ); return( -1 ); } /* TODO do merge of upper node with its parent node */ /* TODO loop until number_of_values_list_elements < internal_tree->maximum_number_of_values */ /* Make sure existing list element updated after the split */ result = libcdata_btree_node_get_sub_node_by_value( *upper_node, value, value_compare_function, upper_node, &existing_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split sub node by value.", function ); return( -1 ); } result = libcdata_btree_node_get_sub_node_by_value( *upper_node, value, value_compare_function, upper_node, &existing_list_element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split sub node by value.", function ); return( -1 ); } } if( libcdata_array_append_entry( internal_tree->values_array, value_index, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value to values array.", function ); return( -1 ); } return( 1 ); } /* Replaces a value in the tree * Returns 1 if successful or -1 on error */ int libcdata_btree_replace_value( libcdata_btree_t *tree, libcdata_tree_node_t *upper_node, int *value_index, intptr_t *value, int *replacement_value_index, intptr_t *replacement_value, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; intptr_t *check_value = NULL; static char *function = "libcdata_btree_replace_value"; int number_of_sub_nodes = 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 = (libcdata_internal_btree_t *) tree; if( upper_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid upper node.", 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( replacement_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value index.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( upper_node, &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 sub nodes.", function ); return( -1 ); } if( number_of_sub_nodes != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: cannot replace upper node with sub nodes.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree->values_array, *value_index, &check_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from array.", function, *value_index ); return( -1 ); } if( value != check_value ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value: %d value out of bounds.", function, *value_index ); return( -1 ); } if( libcdata_btree_node_replace_value( upper_node, value, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to replace value: %d.", function, *value_index ); return( -1 ); } if( libcdata_array_set_entry_by_index( internal_tree->values_array, *value_index, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to set value: %d in values array.", function, *value_index ); return( -1 ); } *replacement_value_index = *value_index; *value_index = -1; return( 1 ); } /* Removes a value from the tree * Returns 1 if successful or -1 on error */ int libcdata_btree_remove_value( libcdata_btree_t *tree, libcdata_tree_node_t *upper_node, int *value_index, intptr_t *value, libcerror_error_t **error ) { libcdata_internal_btree_t *internal_tree = NULL; intptr_t *check_value = NULL; static char *function = "libcdata_btree_remove_value"; int number_of_sub_nodes = 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 = (libcdata_internal_btree_t *) tree; if( upper_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid upper node.", 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( libcdata_tree_node_get_number_of_sub_nodes( upper_node, &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 sub nodes.", function ); return( -1 ); } if( number_of_sub_nodes != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: cannot replace upper node with sub nodes.", function ); return( -1 ); } if( libcdata_array_get_entry_by_index( internal_tree->values_array, *value_index, &check_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value: %d from array.", function, *value_index ); return( -1 ); } if( value != check_value ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value: %d value out of bounds.", function, *value_index ); return( -1 ); } if( libcdata_btree_node_remove_value( upper_node, value, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove value: %d from upper node.", function, *value_index ); return( -1 ); } /* TODO reshuffle values array ? * Better to mark and ignore deleted items, otherwise index values need to be updated as well */ if( libcdata_array_set_entry_by_index( internal_tree->values_array, *value_index, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to set value: %d in values array.", function, *value_index ); return( -1 ); } *value_index = -1; return( 1 ); } libesedb-20240420/libcdata/libcdata_support.c0000644000175000017500000000220014610746222021624 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libcdata_definitions.h" #include "libcdata_support.h" #if !defined( HAVE_LOCAL_LIBCDATA ) /* Returns the library version as a string */ const char *libcdata_get_version( void ) { return( (const char *) LIBCDATA_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ libesedb-20240420/libcdata/libcdata_list.c0000644000175000017500000020761314610746222021102 0ustar00lordyestalordyesta/* * List functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_list.h" #include "libcdata_list_element.h" #include "libcdata_types.h" /* Creates a list * Make sure the value list is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_list_initialize( libcdata_list_t **list, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; static char *function = "libcdata_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 ); } internal_list = memory_allocate_structure( libcdata_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( libcdata_internal_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list.", function ); memory_free( internal_list ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_list->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *list = (libcdata_list_t *) internal_list; return( 1 ); on_error: if( internal_list != NULL ) { memory_free( internal_list ); } 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 libcdata_list_free( libcdata_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; static char *function = "libcdata_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 = (libcdata_internal_list_t *) *list; *list = NULL; if( libcdata_list_empty( (libcdata_list_t*) internal_list, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty list.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_list->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif memory_free( internal_list ); } 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 libcdata_list_empty( libcdata_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; static char *function = "libcdata_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 ); } internal_list = (libcdata_internal_list_t *) list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( internal_list->number_of_elements > 0 ) { number_of_elements = internal_list->number_of_elements; list_element = internal_list->first_element; for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_list_element_get_next_element( list_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); result = -1; break; } internal_list->first_element = next_element; if( internal_list->last_element == list_element ) { internal_list->last_element = next_element; } internal_list->number_of_elements -= 1; if( next_element != NULL ) { if( libcdata_list_element_set_previous_element( next_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of list element: %d.", function, element_index + 1 ); result = -1; } } if( libcdata_list_element_set_next_element( list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of list element: %d.", function, element_index ); result = -1; } if( libcdata_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 list element: %d.", function, element_index ); result = -1; } list_element = next_element; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); result = -1; } #endif 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 libcdata_list_clone( libcdata_list_t **destination_list, libcdata_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_list_t *internal_destination_list = NULL; libcdata_internal_list_t *internal_source_list = NULL; libcdata_internal_list_element_t *internal_source_list_element = NULL; intptr_t *destination_value = NULL; static char *function = "libcdata_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 ); } internal_source_list = (libcdata_internal_list_t *) source_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_source_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_list_initialize( (libcdata_list_t **) &internal_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( internal_destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination list.", function ); goto on_error; } if( internal_source_list->first_element != NULL ) { internal_source_list_element = (libcdata_internal_list_element_t *) internal_source_list->first_element; for( element_index = 0; element_index < internal_source_list->number_of_elements; element_index++ ) { if( internal_source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing source list element: %d.", function, element_index ); goto on_error; } if( value_clone_function( &destination_value, internal_source_list_element->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value: %d.", function, element_index ); goto on_error; } if( libcdata_list_append_value( (libcdata_list_t *) internal_destination_list, destination_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value: %d to destination list.", function, element_index ); goto on_error; } destination_value = NULL; internal_source_list_element = (libcdata_internal_list_element_t *) internal_source_list_element->next_element; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_source_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libcdata_list_free( (libcdata_list_t **) &internal_destination_list, value_free_function, error ); return( -1 ); } #endif *destination_list = (libcdata_list_t *) internal_destination_list; return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_source_list->read_write_lock, NULL ); #endif if( destination_value != NULL ) { value_free_function( &destination_value, NULL ); } if( internal_destination_list != NULL ) { libcdata_list_free( (libcdata_list_t **) &internal_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 libcdata_list_get_number_of_elements( libcdata_list_t *list, int *number_of_elements, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; static char *function = "libcdata_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 = (libcdata_internal_list_t *) list; 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *number_of_elements = internal_list->number_of_elements; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves the first elements in the list * Returns 1 if successful or -1 on error */ int libcdata_list_get_first_element( libcdata_list_t *list, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; static char *function = "libcdata_list_get_first_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 = (libcdata_internal_list_t *) list; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *element = internal_list->first_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the first element in the list * Returns 1 if successful or -1 on error */ int libcdata_internal_list_set_first_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_list_element_t *backup_first_element = NULL; static char *function = "libcdata_internal_list_set_first_element"; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } backup_first_element = internal_list->first_element; if( element != NULL ) { if( libcdata_list_element_set_next_element( element, internal_list->first_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of element.", function ); goto on_error; } } if( internal_list->first_element != NULL ) { if( libcdata_list_element_set_previous_element( internal_list->first_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of first element.", function ); goto on_error; } } internal_list->first_element = element; return( 1 ); on_error: if( element != NULL ) { libcdata_list_element_set_next_element( element, NULL, NULL ); } if( backup_first_element != NULL ) { libcdata_list_element_set_next_element( backup_first_element, NULL, NULL ); } internal_list->first_element = backup_first_element; return( -1 ); } /* Retrieves the last elements in the list * Returns 1 if successful or -1 on error */ int libcdata_list_get_last_element( libcdata_list_t *list, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; static char *function = "libcdata_list_get_last_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 = (libcdata_internal_list_t *) list; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *element = internal_list->last_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the last element in the list * Returns 1 if successful or -1 on error */ int libcdata_internal_list_set_last_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_list_element_t *backup_last_element = NULL; static char *function = "libcdata_internal_list_set_last_element"; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } backup_last_element = internal_list->last_element; if( element != NULL ) { if( libcdata_list_element_set_previous_element( element, internal_list->last_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of element.", function ); goto on_error; } } if( internal_list->last_element != NULL ) { if( libcdata_list_element_set_next_element( internal_list->last_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of last element.", function ); goto on_error; } } internal_list->last_element = element; return( 1 ); on_error: if( element != NULL ) { libcdata_list_element_set_previous_element( element, NULL, NULL ); } if( backup_last_element != NULL ) { libcdata_list_element_set_next_element( backup_last_element, NULL, NULL ); } internal_list->last_element = backup_last_element; return( -1 ); } /* Retrieves a specific element from the list * Returns 1 if successful or -1 on error */ int libcdata_list_get_element_by_index( libcdata_list_t *list, int element_index, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_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 ); } internal_list = (libcdata_internal_list_t *) list; if( ( element_index < 0 ) || ( element_index >= internal_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( element_index < ( internal_list->number_of_elements / 2 ) ) { list_element = internal_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 ); goto on_error; } if( libcdata_list_element_get_next_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); goto on_error; } } } else { list_element = internal_list->last_element; for( element_iterator = ( internal_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 ); goto on_error; } if( libcdata_list_element_get_previous_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from list element: %d.", function, element_index ); goto on_error; } } } if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing list element.", function ); goto on_error; } *element = list_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_list->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves a specific value from the list * Returns 1 if successful or -1 on error */ int libcdata_list_get_value_by_index( libcdata_list_t *list, int element_index, intptr_t **value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_list_get_value_by_index"; if( libcdata_list_get_element_by_index( list, element_index, &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 list.", function, element_index ); return( -1 ); } if( libcdata_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 from list element: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Prepends a list element to the list * Returns 1 if successful or -1 on error */ int libcdata_list_prepend_element( libcdata_list_t *list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_list_prepend_element"; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; #endif if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libcdata_internal_list_t *) list; if( internal_list->number_of_elements == 0 ) { if( internal_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( internal_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 ); } } else { if( internal_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first element.", function ); return( -1 ); } if( internal_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last element.", 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( libcdata_list_element_get_elements( element, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from list element.", function ); return( -1 ); } if( ( previous_element != NULL ) || ( next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: list element already part of a list.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; #endif result = libcdata_list_element_set_next_element( element, internal_list->first_element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of list element.", function ); result = -1; } if( result == 1 ) { if( internal_list->first_element != NULL ) { result = libcdata_list_element_set_previous_element( internal_list->first_element, element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of first element.", function ); libcdata_list_element_set_next_element( element, NULL, NULL ); result = -1; } } } if( result == 1 ) { internal_list->first_element = element; if( internal_list->last_element == NULL ) { internal_list->last_element = element; } internal_list->number_of_elements += 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_list_element_set_next_element( element, NULL, NULL ); libcdata_list_element_set_previous_element( backup_first_element, NULL, NULL ); internal_list->first_element = backup_first_element; internal_list->last_element = backup_last_element; internal_list->number_of_elements -= 1; } return( -1 ); #endif } /* Prepends a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libcdata_list_prepend_value( libcdata_list_t *list, intptr_t *value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_list_prepend_value"; if( libcdata_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( libcdata_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( libcdata_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 ) { libcdata_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Appends a list element to the list * Returns 1 if successful or -1 on error */ int libcdata_list_append_element( libcdata_list_t *list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_list_append_element"; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; #endif if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libcdata_internal_list_t *) list; if( internal_list->number_of_elements == 0 ) { if( internal_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( internal_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 ); } } else { if( internal_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first element.", function ); return( -1 ); } if( internal_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last element.", function ); return( -1 ); } } if( libcdata_list_element_get_elements( element, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from list element.", function ); return( -1 ); } if( ( previous_element != NULL ) || ( next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: list element already part of a list.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; #endif result = libcdata_list_element_set_previous_element( element, internal_list->last_element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of list element.", function ); result = -1; } if( result == 1 ) { if( internal_list->last_element != NULL ) { result = libcdata_list_element_set_next_element( internal_list->last_element, element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of last element.", function ); libcdata_list_element_set_previous_element( element, NULL, NULL ); result = -1; } } } if( result == 1 ) { if( internal_list->first_element == NULL ) { internal_list->first_element = element; } internal_list->last_element = element; internal_list->number_of_elements += 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_list_element_set_previous_element( element, NULL, NULL ); libcdata_list_element_set_next_element( backup_last_element, NULL, NULL ); internal_list->first_element = backup_first_element; internal_list->last_element = backup_last_element; internal_list->number_of_elements -= 1; } return( -1 ); #endif } /* Appends a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libcdata_list_append_value( libcdata_list_t *list, intptr_t *value, libcerror_error_t **error ) { libcdata_list_element_t *element = NULL; static char *function = "libcdata_list_append_value"; if( libcdata_list_element_initialize( &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( libcdata_list_element_set_value( 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; } if( libcdata_list_append_element( 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; } return( 1 ); on_error: if( element != NULL ) { libcdata_list_element_free( &element, NULL, NULL ); } return( -1 ); } /* Retrieves the element which the element should be inserted before * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * On return element will be set to NULL if the element should be inserted at the end of the list. * * Returns 1 if successful, 0 if a list element containing the value already exists or -1 on error */ int libcdata_internal_list_insert_element_find_element( libcdata_internal_list_t *internal_list, intptr_t *value_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, int *element_index, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; intptr_t *list_element_value = NULL; static char *function = "libcdata_internal_list_insert_element_find_element"; int compare_result = 0; int result = 1; int safe_element_index = 0; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 & ~( LIBCDATA_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( 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 ); } list_element = internal_list->first_element; compare_result = LIBCDATA_COMPARE_GREATER; for( safe_element_index = 0; safe_element_index < internal_list->number_of_elements; safe_element_index++ ) { if( libcdata_list_element_get_value( list_element, &list_element_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, safe_element_index ); return( -1 ); } compare_result = value_compare_function( value_to_insert, list_element_value, error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare list element: %d.", function, safe_element_index ); return( -1 ); } else if( compare_result == LIBCDATA_COMPARE_EQUAL ) { if( ( insert_flags & LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { result = 0; break; } } else if( compare_result == LIBCDATA_COMPARE_LESS ) { break; } else if( compare_result != LIBCDATA_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, compare_result ); return( -1 ); } if( libcdata_list_element_get_next_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, safe_element_index ); return( -1 ); } } if( ( compare_result == LIBCDATA_COMPARE_EQUAL ) || ( compare_result == LIBCDATA_COMPARE_LESS ) ) { *element_index = safe_element_index; *element = list_element; } else { *element_index = internal_list->number_of_elements; *element = NULL; } return( result ); } /* Inserts the element before the list element * If list_element is NULL the element is inserted before or as the first element in the list * Returns 1 if successful, or -1 on error */ int libcdata_internal_list_insert_element_before_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *list_element, libcdata_list_element_t *element_to_insert, libcerror_error_t **error ) { libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_internal_list_insert_element_before_element"; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element_to_insert == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element to insert.", function ); return( -1 ); } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; if( list_element != NULL ) { if( libcdata_list_element_get_previous_element( list_element, &previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from list element.", function ); return( -1 ); } } if( internal_list->number_of_elements == 0 ) { internal_list->first_element = element_to_insert; internal_list->last_element = element_to_insert; } else if( list_element == NULL ) { if( libcdata_internal_list_set_last_element( internal_list, element_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set last list element.", function ); goto on_error; } } else { if( libcdata_list_element_set_elements( element_to_insert, previous_element, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous and next element of element to insert.", function ); goto on_error; } if( internal_list->first_element == list_element ) { internal_list->first_element = element_to_insert; } else { if( libcdata_list_element_set_next_element( previous_element, element_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of previous list element.", function ); goto on_error; } } if( libcdata_list_element_set_previous_element( list_element, element_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of list element.", function ); goto on_error; } } internal_list->number_of_elements += 1; return( 1 ); on_error: if( element_to_insert != NULL ) { libcdata_list_element_set_elements( element_to_insert, NULL, NULL, NULL ); } if( previous_element != NULL ) { libcdata_list_element_set_next_element( previous_element, list_element, NULL ); } if( list_element != NULL ) { libcdata_list_element_set_previous_element( list_element, previous_element, NULL ); } internal_list->first_element = backup_first_element; internal_list->last_element = backup_last_element; 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 LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libcdata_list_insert_element( libcdata_list_t *list, libcdata_list_element_t *element_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libcdata_list_element_t *existing_element = NULL; static char *function = "libcdata_list_insert_element"; int result = 0; result = libcdata_list_insert_element_with_existing( list, element_to_insert, value_compare_function, insert_flags, &existing_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element into list.", function ); return( -1 ); } return( result ); } /* 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 LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libcdata_list_insert_element_with_existing( libcdata_list_t *list, libcdata_list_element_t *element_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcdata_list_element_t **existing_element, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; libcdata_list_element_t *safe_existing_element = NULL; intptr_t *value_to_insert = NULL; static char *function = "libcdata_list_insert_element_with_existing"; int element_index = 0; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; #endif if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libcdata_internal_list_t *) list; if( internal_list->number_of_elements == 0 ) { if( internal_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( internal_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 ); } } else { if( internal_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first element.", function ); return( -1 ); } if( internal_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last element.", function ); return( -1 ); } } if( element_to_insert == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element to insert.", 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 & ~( LIBCDATA_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( existing_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing element.", function ); return( -1 ); } *existing_element = NULL; if( libcdata_list_element_get_elements( element_to_insert, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from element to insert.", function ); return( -1 ); } if( ( previous_element != NULL ) || ( next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid element to insert - already part of a list.", function ); return( -1 ); } if( libcdata_list_element_get_value( element_to_insert, &value_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from element to insert.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; #endif /* defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) */ result = libcdata_internal_list_insert_element_find_element( internal_list, value_to_insert, value_compare_function, insert_flags, &element_index, &safe_existing_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find element in list.", function ); result = -1; } else if( result == 0 ) { *existing_element = safe_existing_element; } else { if( safe_existing_element != NULL ) { if( libcdata_list_element_get_elements( safe_existing_element, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from list element: %d.", function, element_index ); result = -1; } } if( result == 1 ) { if( libcdata_internal_list_insert_element_before_element( internal_list, safe_existing_element, element_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element before list element.", function ); result = -1; } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_list_element_set_elements( element_to_insert, NULL, NULL, NULL ); if( safe_existing_element != NULL ) { libcdata_list_element_set_elements( safe_existing_element, previous_element, next_element, NULL ); } else if( backup_last_element != NULL ) { libcdata_list_element_set_next_element( backup_last_element, NULL, NULL ); } internal_list->first_element = backup_first_element; internal_list->last_element = backup_last_element; internal_list->number_of_elements -= 1; } return( -1 ); #endif /* defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) */ } /* 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 LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libcdata_list_insert_value( libcdata_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 ) { intptr_t *existing_value = NULL; static char *function = "libcdata_list_insert_value"; int result = 0; result = libcdata_list_insert_value_with_existing( list, value, value_compare_function, insert_flags, &existing_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert value into list.", function ); return( -1 ); } return( result ); } /* 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 LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libcdata_list_insert_value_with_existing( libcdata_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, intptr_t **existing_value, libcerror_error_t **error ) { libcdata_list_element_t *element = NULL; libcdata_list_element_t *existing_element = NULL; static char *function = "libcdata_list_insert_value_with_existing"; int result = 1; if( existing_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing value.", function ); return( -1 ); } *existing_value = NULL; if( libcdata_list_element_initialize( &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( libcdata_list_element_set_value( 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 = libcdata_list_insert_element_with_existing( list, element, value_compare_function, insert_flags, &existing_element, 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( libcdata_list_element_free( &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; } if( libcdata_list_element_get_value( existing_element, existing_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from existing list element.", function ); goto on_error; } } return( result ); on_error: if( element != NULL ) { libcdata_list_element_free( &element, NULL, NULL ); } return( -1 ); } /* Removes a list element from the list * Returns 1 if successful or -1 on error */ int libcdata_list_remove_element( libcdata_list_t *list, libcdata_list_element_t *element_to_remove, libcerror_error_t **error ) { libcdata_internal_list_t *internal_list = NULL; libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_list_remove_element"; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; #endif if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libcdata_internal_list_t *) list; if( internal_list->number_of_elements == 0 ) { if( internal_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( internal_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 ); } } else { if( internal_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first element.", function ); return( -1 ); } if( internal_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last element.", function ); return( -1 ); } } if( element_to_remove == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element to remove.", function ); return( -1 ); } if( libcdata_list_element_get_elements( element_to_remove, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from element to remove.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_element = internal_list->first_element; backup_last_element = internal_list->last_element; #endif result = libcdata_list_element_set_elements( element_to_remove, NULL, NULL, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous and next element of element to remove.", function ); result = -1; } if( result == 1 ) { if( next_element != NULL ) { result = libcdata_list_element_set_previous_element( next_element, previous_element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of next element.", function ); libcdata_list_element_set_elements( element_to_remove, previous_element, next_element, NULL ); result = -1; } } } if( result == 1 ) { if( previous_element != NULL ) { result = libcdata_list_element_set_next_element( previous_element, next_element, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of previous element.", function ); if( next_element != NULL ) { libcdata_list_element_set_previous_element( next_element, element_to_remove, NULL ); } libcdata_list_element_set_elements( element_to_remove, previous_element, next_element, NULL ); result = -1; } } } if( result == 1 ) { if( element_to_remove == internal_list->first_element ) { internal_list->first_element = next_element; } if( element_to_remove == internal_list->last_element ) { internal_list->last_element = previous_element; } internal_list->number_of_elements -= 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_list_element_set_elements( element_to_remove, previous_element, next_element, NULL ); if( next_element != NULL ) { libcdata_list_element_set_previous_element( next_element, element_to_remove, NULL ); } if( previous_element != NULL ) { libcdata_list_element_set_next_element( previous_element, element_to_remove, NULL ); } internal_list->first_element = backup_first_element; internal_list->last_element = backup_last_element; internal_list->number_of_elements += 1; } return( -1 ); #endif } libesedb-20240420/libcdata/libcdata_extern.h0000644000175000017500000000255514610746222021437 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_INTERNAL_EXTERN_H ) #define _LIBCDATA_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if !defined( HAVE_LOCAL_LIBCDATA ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCDATA_EXTERN_VARIABLE extern #else #define LIBCDATA_EXTERN_VARIABLE LIBCDATA_EXTERN #endif #else #define LIBCDATA_EXTERN /* extern */ #define LIBCDATA_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBCDATA_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcdata/libcdata_list.h0000644000175000017500000001446014610746222021103 0ustar00lordyestalordyesta/* * List functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_LIST_H ) #define _LIBCDATA_LIST_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_internal_list libcdata_internal_list_t; struct libcdata_internal_list { /* The number of elements */ int number_of_elements; /* The first element */ libcdata_list_element_t *first_element; /* The last element */ libcdata_list_element_t *last_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_list_initialize( libcdata_list_t **list, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_free( libcdata_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_empty( libcdata_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_clone( libcdata_list_t **destination_list, libcdata_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_get_number_of_elements( libcdata_list_t *list, int *number_of_elements, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_get_first_element( libcdata_list_t *list, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_list_set_first_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_get_last_element( libcdata_list_t *list, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_list_set_last_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_get_element_by_index( libcdata_list_t *list, int element_index, libcdata_list_element_t **element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_get_value_by_index( libcdata_list_t *list, int element_index, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_prepend_element( libcdata_list_t *list, libcdata_list_element_t *element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_prepend_value( libcdata_list_t *list, intptr_t *value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_append_element( libcdata_list_t *list, libcdata_list_element_t *element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_append_value( libcdata_list_t *list, intptr_t *value, libcerror_error_t **error ); int libcdata_internal_list_insert_element_find_element( libcdata_internal_list_t *internal_list, intptr_t *value_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, int *element_index, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_list_insert_element_before_element( libcdata_internal_list_t *internal_list, libcdata_list_element_t *list_element, libcdata_list_element_t *element_to_insert, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_insert_element( libcdata_list_t *list, libcdata_list_element_t *element_to_insert, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_insert_element_with_existing( libcdata_list_t *list, libcdata_list_element_t *element_to_insert, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcdata_list_element_t **existing_element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_insert_value( libcdata_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 ); LIBCDATA_EXTERN \ int libcdata_list_insert_value_with_existing( libcdata_list_t *list, intptr_t *value, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, intptr_t **existing_value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_list_remove_element( libcdata_list_t *list, libcdata_list_element_t *element_to_remove, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_LIST_H ) */ libesedb-20240420/libcdata/libcdata_btree_values_list.h0000644000175000017500000000316014610746222023636 0ustar00lordyestalordyesta/* * Balanced tree values list functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_BTREE_VALUES_LIST_H ) #define _LIBCDATA_BTREE_VALUES_LIST_H #include #include #include "libcdata_libcerror.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif int libcdata_btree_values_list_free( libcdata_list_t **values_list, libcerror_error_t **error ); int libcdata_btree_values_list_remove_element( libcdata_list_t *values_list, libcdata_list_element_t **values_list_element, libcerror_error_t **error ); int libcdata_btree_values_list_replace_element_with_previous( libcdata_list_t *values_list, libcdata_list_element_t **values_list_element, intptr_t **replacement_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_BTREE_VALUES_LIST_H ) */ libesedb-20240420/libcdata/Makefile.am0000644000175000017500000000214314610746222020163 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCDATA AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libcdata.la libcdata_la_SOURCES = \ libcdata_array.c libcdata_array.h \ libcdata_btree.c libcdata_btree.h \ libcdata_btree_node.c libcdata_btree_node.h \ libcdata_btree_values_list.c libcdata_btree_values_list.h \ libcdata_definitions.h \ libcdata_error.c libcdata_error.h \ libcdata_extern.h \ libcdata_libcerror.h \ libcdata_libcthreads.h \ libcdata_list.c libcdata_list.h \ libcdata_list_element.c libcdata_list_element.h \ libcdata_range_list.c libcdata_range_list.h \ libcdata_range_list_value.c libcdata_range_list_value.h \ libcdata_support.c libcdata_support.h \ libcdata_tree_node.c libcdata_tree_node.h \ libcdata_types.h \ libcdata_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdata_la_SOURCES) libesedb-20240420/libcdata/libcdata_btree_node.h0000644000175000017500000000562014610746222022234 0ustar00lordyestalordyesta/* * Balanced tree node functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_BTREE_NODE_H ) #define _LIBCDATA_BTREE_NODE_H #include #include #include "libcdata_libcerror.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif int libcdata_btree_node_get_sub_node_by_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **sub_node, libcdata_list_element_t **values_list_element, libcerror_error_t **error ); int libcdata_btree_node_get_upper_node_by_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, libcdata_list_element_t **values_list_element, libcerror_error_t **error ); int libcdata_btree_node_append_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ); int libcdata_btree_node_insert_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_btree_node_replace_value( libcdata_tree_node_t *node, intptr_t *value, intptr_t *replacement_value, libcerror_error_t **error ); int libcdata_btree_node_flatten_node( libcdata_tree_node_t **node, libcerror_error_t **error ); int libcdata_btree_node_remove_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **sub_node, libcerror_error_t **error ); int libcdata_btree_node_remove_value( libcdata_tree_node_t *node, intptr_t *value, intptr_t *replacement_value, libcerror_error_t **error ); int libcdata_btree_node_split( libcdata_tree_node_t *node, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_BTREE_NODE_H ) */ libesedb-20240420/libcdata/libcdata_range_list_value.h0000644000175000017500000000534514610746222023455 0ustar00lordyestalordyesta/* * Range list value * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_RANGE_LIST_VALUE_H ) #define _LIBCDATA_RANGE_LIST_VALUE_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_range_list_value libcdata_range_list_value_t; struct libcdata_range_list_value { /* The (range) start value */ uint64_t start; /* The (range) end */ uint64_t end; /* The (range) size */ uint64_t size; /* The value */ intptr_t *value; }; int libcdata_range_list_value_initialize( libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ); int libcdata_range_list_value_free( libcdata_range_list_value_t **range_list_value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_range_list_value_clone( libcdata_range_list_value_t **destination_range_list_value, libcdata_range_list_value_t *source_range_list_value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_range_list_value_merge( libcdata_range_list_value_t *destination_range_list_value, libcdata_range_list_value_t *source_range_list_value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_range_list_value_check_range_overlap( libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_RANGE_LIST_VALUE_H ) */ libesedb-20240420/libcdata/libcdata_range_list.h0000644000175000017500000003000714610746222022252 0ustar00lordyestalordyesta/* * Range list * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_RANGE_LIST_H ) #define _LIBCDATA_RANGE_LIST_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_range_list_value.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_internal_range_list libcdata_internal_range_list_t; struct libcdata_internal_range_list { /* The number of elements */ int number_of_elements; /* The first element */ libcdata_list_element_t *first_element; /* The last element */ libcdata_list_element_t *last_element; /* The current list element */ libcdata_list_element_t *current_element; /* The current list element index */ int current_element_index; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_range_list_initialize( libcdata_range_list_t **range_list, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_free( libcdata_range_list_t **range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_free_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t **range_list_element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_empty( libcdata_range_list_t *range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_clone( libcdata_range_list_t **destination_range_list, libcdata_range_list_t *source_range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_number_of_elements( libcdata_range_list_t *range_list, int *number_of_elements, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_first_element( libcdata_range_list_t *range_list, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_range_list_set_first_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_last_element( libcdata_range_list_t *range_list, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_range_list_set_last_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_internal_range_list_append_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_internal_range_list_append_value( libcdata_internal_range_list_t *internal_range_list, libcdata_range_list_value_t *value, libcerror_error_t **error ); int libcdata_internal_range_list_remove_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcerror_error_t **error ); int libcdata_internal_range_list_remove_range_value( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t **range_list_element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_insert_range_find_element( libcdata_internal_range_list_t *internal_range_list, uint64_t range_start, uint64_t range_end, int *element_index, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_range_list_check_range_overlap( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, libcerror_error_t **error ); int libcdata_internal_range_list_insert_range_before_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, libcdata_list_element_t **new_range_list_element, libcerror_error_t **error ); int libcdata_internal_range_list_insert_element_after_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_list_element_t *element, libcerror_error_t **error ); int libcdata_internal_range_list_insert_value_after_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *value, libcerror_error_t **error ); int libcdata_internal_range_list_merge_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_merge_overlapping_ranges( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcdata_range_list_t *backup_range_list, libcerror_error_t **error ); int libcdata_internal_range_list_insert_range_merge( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcdata_range_list_t *backup_range_list, libcerror_error_t **error ); int libcdata_internal_range_list_insert_range_revert_merge( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_t *backup_range_list, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_insert_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_insert_range_list( libcdata_range_list_t *range_list, libcdata_range_list_t *source_range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_remove_shrink_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_remove_split_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_remove_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ); int libcdata_internal_range_list_get_element_by_index( libcdata_internal_range_list_t *internal_range_list, int element_index, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_range_list_get_element_at_offset( libcdata_internal_range_list_t *internal_range_list, uint64_t range_offset, libcdata_list_element_t **element, libcerror_error_t **error ); int libcdata_internal_range_list_get_value_by_index( libcdata_internal_range_list_t *internal_range_list, int element_index, libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ); int libcdata_internal_range_list_get_value_at_offset( libcdata_internal_range_list_t *internal_range_list, uint64_t range_offset, libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_range_by_index( libcdata_range_list_t *range_list, int element_index, uint64_t *range_start, uint64_t *range_size, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_range_at_offset( libcdata_range_list_t *range_list, uint64_t range_offset, uint64_t *range_start, uint64_t *range_size, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_range_is_present( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_range_has_overlapping_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_range_list_get_spanning_range( libcdata_range_list_t *range_list, uint64_t *range_start, uint64_t *range_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_RANGE_LIST_H ) */ libesedb-20240420/libcdata/libcdata_range_list.c0000644000175000017500000035665514610746222022271 0ustar00lordyestalordyesta/* * Range list * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_list_element.h" #include "libcdata_range_list.h" #include "libcdata_range_list_value.h" #include "libcdata_types.h" #include "libcdata_unused.h" /* Creates a range list * Make sure the value range_list is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_range_list_initialize( libcdata_range_list_t **range_list, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_initialize"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( *range_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid range list value already set.", function ); return( -1 ); } internal_range_list = memory_allocate_structure( libcdata_internal_range_list_t ); if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create range list.", function ); goto on_error; } if( memory_set( internal_range_list, 0, sizeof( libcdata_internal_range_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear range list.", function ); memory_free( internal_range_list ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_range_list->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *range_list = (libcdata_range_list_t *) internal_range_list; return( 1 ); on_error: if( internal_range_list != NULL ) { memory_free( internal_range_list ); } return( -1 ); } /* Frees a range list including the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libcdata_range_list_free( libcdata_range_list_t **range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_free"; int result = 1; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( *range_list != NULL ) { internal_range_list = (libcdata_internal_range_list_t *) *range_list; *range_list = NULL; if( libcdata_range_list_empty( (libcdata_range_list_t *) internal_range_list, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty range list.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_range_list->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif memory_free( internal_range_list ); } return( result ); } /* Frees a range list element * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_free_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t **range_list_element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_free_element"; int result = 1; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list element.", function ); return( -1 ); } if( *range_list_element != NULL ) { if( libcdata_list_element_get_value( *range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from range list element.", function ); return( -1 ); } if( libcdata_range_list_value_free( &range_list_value, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free range list value.", function ); result = -1; } if( libcdata_list_element_free( range_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 ); result = -1; } } return( result ); } /* Empties a range list and frees the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libcdata_range_list_empty( libcdata_range_list_t *range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; static char *function = "libcdata_range_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( internal_range_list->number_of_elements > 0 ) { number_of_elements = internal_range_list->number_of_elements; list_element = internal_range_list->first_element; for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_list_element_get_next_element( list_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); result = -1; break; } internal_range_list->first_element = next_element; if( internal_range_list->last_element == list_element ) { internal_range_list->last_element = next_element; } internal_range_list->number_of_elements -= 1; if( next_element != NULL ) { if( libcdata_list_element_set_previous_element( next_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of list element: %d.", function, element_index + 1 ); result = -1; } } if( libcdata_list_element_set_next_element( list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of list element: %d.", function, element_index ); result = -1; } if( libcdata_internal_range_list_free_element( internal_range_list, &list_element, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free range list element: %d.", function, element_index ); result = -1; } list_element = next_element; } internal_range_list->current_element = NULL; internal_range_list->current_element_index = 0; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); result = -1; } #endif return( result ); } /* Clones the range list * * 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 libcdata_range_list_clone( libcdata_range_list_t **destination_range_list, libcdata_range_list_t *source_range_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 ) { libcdata_internal_list_element_t *internal_source_list_element = NULL; libcdata_internal_range_list_t *internal_destination_range_list = NULL; libcdata_internal_range_list_t *internal_source_range_list = NULL; libcdata_range_list_value_t *destination_range_list_value = NULL; static char *function = "libcdata_range_list_clone"; int element_index = 0; if( destination_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination range list.", function ); return( -1 ); } if( *destination_range_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination range list value already set.", function ); return( -1 ); } if( source_range_list == NULL ) { *destination_range_list = NULL; return( 1 ); } internal_source_range_list = (libcdata_internal_range_list_t *) source_range_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_source_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_range_list_initialize( (libcdata_range_list_t **) &internal_destination_range_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination range list.", function ); goto on_error; } if( internal_destination_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination range list.", function ); goto on_error; } if( internal_source_range_list->first_element != NULL ) { internal_source_list_element = (libcdata_internal_list_element_t *) internal_source_range_list->first_element; for( element_index = 0; element_index < internal_source_range_list->number_of_elements; element_index++ ) { if( internal_source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing source list element: %d.", function, element_index ); goto on_error; } if( libcdata_range_list_value_clone( &destination_range_list_value, (libcdata_range_list_value_t *) internal_source_list_element->value, value_free_function, value_clone_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination range list value: %d.", function, element_index ); goto on_error; } if( libcdata_internal_range_list_append_value( internal_destination_range_list, destination_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to append value: %d to destination range list.", function, element_index ); goto on_error; } destination_range_list_value = NULL; internal_source_list_element = (libcdata_internal_list_element_t *) internal_source_list_element->next_element; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_source_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libcdata_range_list_free( (libcdata_range_list_t **) &internal_destination_range_list, value_free_function, NULL ); return( -1 ); } #endif *destination_range_list = (libcdata_range_list_t *) internal_destination_range_list; return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_source_range_list->read_write_lock, NULL ); #endif if( destination_range_list_value != NULL ) { libcdata_range_list_value_free( &destination_range_list_value, value_free_function, NULL ); } if( internal_destination_range_list != NULL ) { libcdata_range_list_free( (libcdata_range_list_t **) &internal_destination_range_list, value_free_function, NULL ); } return( -1 ); } /* Retrieves the number of elements in the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_number_of_elements( libcdata_range_list_t *range_list, int *number_of_elements, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_get_number_of_elements"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *number_of_elements = internal_range_list->number_of_elements; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves the first elements in the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_first_element( libcdata_range_list_t *range_list, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_get_first_element"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *element = internal_range_list->first_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the first element in the range list * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_set_first_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_next_element = NULL; static char *function = "libcdata_internal_range_list_set_first_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( element != NULL ) { if( libcdata_list_element_get_next_element( element, &backup_next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element of element.", function ); return( -1 ); } } backup_first_element = internal_range_list->first_element; if( element != NULL ) { if( libcdata_list_element_set_next_element( element, internal_range_list->first_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of element.", function ); goto on_error; } } if( internal_range_list->first_element != NULL ) { if( libcdata_list_element_set_previous_element( internal_range_list->first_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of first element.", function ); goto on_error; } } internal_range_list->first_element = element; return( 1 ); on_error: if( element != NULL ) { libcdata_list_element_set_next_element( element, backup_next_element, NULL ); } if( backup_first_element != NULL ) { libcdata_list_element_set_next_element( backup_first_element, NULL, NULL ); } internal_range_list->first_element = backup_first_element; return( -1 ); } /* Retrieves the last elements in the range list * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_last_element( libcdata_range_list_t *range_list, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; static char *function = "libcdata_range_list_get_last_element"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *element = internal_range_list->last_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the last element in the list * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_set_last_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_list_element_t *backup_last_element = NULL; libcdata_list_element_t *backup_previous_element = NULL; static char *function = "libcdata_internal_range_list_set_last_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( element != NULL ) { if( libcdata_list_element_get_previous_element( element, &backup_previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element of element.", function ); return( -1 ); } } backup_last_element = internal_range_list->last_element; if( element != NULL ) { if( libcdata_list_element_set_previous_element( element, internal_range_list->last_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of element.", function ); goto on_error; } } if( internal_range_list->last_element != NULL ) { if( libcdata_list_element_set_next_element( internal_range_list->last_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of last element.", function ); goto on_error; } } internal_range_list->last_element = element; return( 1 ); on_error: if( element != NULL ) { libcdata_list_element_set_previous_element( element, backup_previous_element, NULL ); } if( backup_last_element != NULL ) { libcdata_list_element_set_next_element( backup_last_element, NULL, NULL ); } internal_range_list->last_element = backup_last_element; return( -1 ); } /* Append a list element to the list * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_append_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *element, libcerror_error_t **error ) { static char *function = "libcdata_internal_range_list_append_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range 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( internal_range_list->first_element == NULL ) { internal_range_list->first_element = element; } if( libcdata_internal_range_list_set_last_element( internal_range_list, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set last element.", function ); return( -1 ); } internal_range_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 libcdata_internal_range_list_append_value( libcdata_internal_range_list_t *internal_range_list, libcdata_range_list_value_t *value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_internal_range_list_append_value"; if( libcdata_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( libcdata_list_element_set_value( list_element, (intptr_t *) 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; } if( libcdata_internal_range_list_append_element( internal_range_list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to range list.", function ); goto on_error; } return( 1 ); on_error: if( list_element != NULL ) { libcdata_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Removes an element from the range list * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_remove_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcerror_error_t **error ) { libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_internal_range_list_remove_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_list_element_get_elements( range_list_element, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from range list element.", function ); return( -1 ); } if( range_list_element == internal_range_list->first_element ) { internal_range_list->first_element = next_element; } if( range_list_element == internal_range_list->last_element ) { internal_range_list->last_element = previous_element; } if( next_element != NULL ) { if( libcdata_list_element_set_previous_element( next_element, previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of next element.", function ); return( -1 ); } } if( previous_element != NULL ) { if( libcdata_list_element_set_next_element( previous_element, next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of previous element.", function ); return( -1 ); } } if( libcdata_list_element_set_elements( range_list_element, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous and next element of range list element.", function ); return( -1 ); } internal_range_list->current_element = NULL; internal_range_list->current_element_index = 0; internal_range_list->number_of_elements -= 1; return( 1 ); } /* Removes an element from the range list and frees the element * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_remove_range_value( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t **range_list_element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_remove_range_value"; int result = 1; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list element.", function ); return( -1 ); } if( libcdata_internal_range_list_remove_element( internal_range_list, *range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove range list element.", function ); return( -1 ); } if( libcdata_list_element_get_value( *range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range list value from range list element.", function ); return( -1 ); } if( libcdata_list_element_free( range_list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free range list element.", function ); result = -1; } if( libcdata_range_list_value_free( &range_list_value, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free range list value.", function ); result = -1; } return( result ); } /* Retrieves the element which the range should be inserted before or merged within * * On return element will be set to NULL if the range should be inserted at the end of the list. * * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_insert_range_find_element( libcdata_internal_range_list_t *internal_range_list, uint64_t range_start, uint64_t range_end LIBCDATA_ATTRIBUTE_UNUSED, int *element_index, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_list_element_t *current_element = NULL; libcdata_list_element_t *previous_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_insert_range_find_element"; int current_element_index = 0; int last_element_index = 0; LIBCDATA_UNREFERENCED_PARAMETER( range_end ) if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", 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( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } current_element = internal_range_list->last_element; current_element_index = internal_range_list->number_of_elements; if( internal_range_list->number_of_elements > 0 ) { /* Check the last element first, most often the list will be filled linear */ current_element_index--; if( libcdata_list_element_get_value( current_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, current_element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element: %d.", function, current_element_index ); return( -1 ); } if( range_start > range_list_value->end ) { current_element = NULL; current_element_index++; } else if( internal_range_list->number_of_elements > 1 ) { last_element_index = current_element_index; if( ( current_element_index != internal_range_list->current_element_index ) && ( internal_range_list->current_element != NULL ) ) { /* Check the current element */ current_element = internal_range_list->current_element; current_element_index = internal_range_list->current_element_index; if( libcdata_list_element_get_value( current_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, current_element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element: %d.", function, current_element_index ); return( -1 ); } } if( range_start > range_list_value->end ) { while( current_element_index < last_element_index ) { if( libcdata_list_element_get_next_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, current_element_index ); return( -1 ); } current_element_index++; if( libcdata_list_element_get_value( current_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, current_element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element: %d.", function, current_element_index ); return( -1 ); } if( range_start <= range_list_value->end ) { break; } } } else { while( current_element_index > 0 ) { previous_element = current_element; if( libcdata_list_element_get_previous_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from list element: %d.", function, current_element_index ); return( -1 ); } current_element_index--; if( libcdata_list_element_get_value( current_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, current_element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element: %d.", function, current_element_index ); return( -1 ); } if( range_start > range_list_value->end ) { current_element = previous_element; current_element_index++; break; } } } } } if( current_element != NULL ) { internal_range_list->current_element = current_element; internal_range_list->current_element_index = current_element_index; } *element = current_element; *element_index = current_element_index; return( 1 ); } /* Checks if the range overlaps with the value of the range list element * Returns 1 if the range overlaps, 0 if not or -1 on error */ int libcdata_internal_range_list_check_range_overlap( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, libcerror_error_t **error ) { libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_check_range_overlap"; int result = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_list_element != NULL ) { if( libcdata_list_element_get_value( range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from range list element.", function ); return( -1 ); } result = libcdata_range_list_value_check_range_overlap( range_list_value, range_start, range_end, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if range overlaps with range list value.", function ); return( -1 ); } } return( result ); } /* Inserts the range before the range list element * If range_list_element is NULL the element is inserted before or as the first element in the list * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_insert_range_before_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, libcdata_list_element_t **new_range_list_element, libcerror_error_t **error ) { libcdata_list_element_t *backup_first_element = NULL; libcdata_list_element_t *backup_last_element = NULL; libcdata_list_element_t *new_element = NULL; libcdata_list_element_t *previous_element = NULL; libcdata_range_list_value_t *new_range_list_value = NULL; static char *function = "libcdata_internal_range_list_insert_range_before_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( new_range_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid new range list element.", function ); return( -1 ); } if( range_list_element != NULL ) { if( libcdata_list_element_get_previous_element( range_list_element, &previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from range list element.", function ); return( -1 ); } } if( libcdata_range_list_value_initialize( &new_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create range list value.", function ); goto on_error; } backup_first_element = internal_range_list->first_element; backup_last_element = internal_range_list->last_element; if( new_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value.", function ); goto on_error; } new_range_list_value->start = range_start; new_range_list_value->size = range_end - range_start; new_range_list_value->end = range_end; new_range_list_value->value = value; if( libcdata_list_element_initialize( &new_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( libcdata_list_element_set_value( new_element, (intptr_t *) new_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in list element.", function ); goto on_error; } if( internal_range_list->number_of_elements == 0 ) { internal_range_list->first_element = new_element; internal_range_list->last_element = new_element; } else if( range_list_element == NULL ) { if( libcdata_internal_range_list_set_last_element( internal_range_list, new_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set last element.", function ); goto on_error; } } else { if( libcdata_list_element_set_elements( new_element, previous_element, range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous and next element of element.", function ); goto on_error; } if( internal_range_list->first_element == range_list_element ) { internal_range_list->first_element = new_element; } else { if( libcdata_list_element_set_next_element( previous_element, new_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of previous element.", function ); goto on_error; } } if( libcdata_list_element_set_previous_element( range_list_element, new_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of range list element.", function ); goto on_error; } } internal_range_list->current_element = NULL; internal_range_list->current_element_index = 0; internal_range_list->number_of_elements += 1; *new_range_list_element = new_element; return( 1 ); on_error: if( new_element != NULL ) { libcdata_list_element_set_elements( new_element, NULL, NULL, NULL ); libcdata_list_element_free( &new_element, NULL, NULL ); } if( new_range_list_value != NULL ) { libcdata_range_list_value_free( &new_range_list_value, NULL, NULL ); } if( previous_element != NULL ) { libcdata_list_element_set_next_element( previous_element, range_list_element, NULL ); } if( range_list_element != NULL ) { libcdata_list_element_set_previous_element( range_list_element, previous_element, NULL ); } internal_range_list->first_element = backup_first_element; internal_range_list->last_element = backup_last_element; return( -1 ); } /* Inserts the element in the range list after the range list element * If range_list_element is NULL the element is inserted as the first element in the list * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_insert_element_after_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_list_element_t *element, libcerror_error_t **error ) { libcdata_list_element_t *next_element = NULL; libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_internal_range_list_insert_element_after_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_list_element_get_elements( element, &previous_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous and next element from list element.", function ); return( -1 ); } if( ( previous_element != NULL ) || ( next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: list element already part of a list.", function ); return( -1 ); } if( internal_range_list->number_of_elements == 0 ) { if( internal_range_list->first_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list - first element already set.", function ); return( -1 ); } if( internal_range_list->last_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list - last element already set.", function ); return( -1 ); } internal_range_list->first_element = element; internal_range_list->last_element = element; } else { if( internal_range_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list - missing first element.", function ); return( -1 ); } if( internal_range_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list - missing last element.", function ); return( -1 ); } if( range_list_element == NULL ) { if( libcdata_internal_range_list_set_first_element( internal_range_list, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set first element.", function ); return( -1 ); } } else { if( libcdata_list_element_get_next_element( range_list_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from range list element.", function ); return( -1 ); } if( libcdata_list_element_set_elements( element, range_list_element, next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous and next element of list element.", function ); return( -1 ); } if( range_list_element == internal_range_list->last_element ) { internal_range_list->last_element = element; } else if( next_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid range list element - missing next element.", function ); return( -1 ); } else { if( libcdata_list_element_set_previous_element( next_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous element of next element.", function ); return( -1 ); } } if( libcdata_list_element_set_next_element( range_list_element, element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next element of range list element.", function ); return( -1 ); } } } internal_range_list->number_of_elements += 1; return( 1 ); } /* Inserts the range list value in the range list after the range list element * If range_list_element is NULL the value is inserted before the first element in the list * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_insert_value_after_element( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_internal_range_list_insert_value_after_element"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_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( libcdata_list_element_set_value( list_element, (intptr_t *) value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in list element.", function ); goto on_error; } if( libcdata_internal_range_list_insert_element_after_element( internal_range_list, range_list_element, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element after range list element.", function ); goto on_error; } list_element = NULL; return( 1 ); on_error: if( list_element != NULL ) { libcdata_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Merges the range into the range list element * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_merge_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_merge_range"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_list_element_get_value( range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from range list element.", function ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value.", function ); return( -1 ); } if( range_list_value->value != NULL ) { if( value_merge_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value merge function.", function ); return( -1 ); } } if( range_list_value->value == NULL ) { range_list_value->value = value; } else { if( value_merge_function( range_list_value->value, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge value.", function ); return( -1 ); } } if( range_start < range_list_value->start ) { range_list_value->size += range_list_value->start - range_start; range_list_value->start = range_start; } if( range_end > range_list_value->end ) { range_list_value->size += range_end - range_list_value->end; range_list_value->end = range_end; } return( 1 ); } /* Merges successive overlapping ranges * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_merge_overlapping_ranges( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcdata_range_list_t *backup_range_list, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *next_element = NULL; libcdata_range_list_value_t *next_range_list_value = NULL; static char *function = "libcdata_internal_range_list_merge_overlapping_ranges"; int result = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_list_element_get_next_element( range_list_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from range list element.", function ); return( -1 ); } while( next_element != NULL ) { list_element = next_element; if( libcdata_list_element_get_next_element( list_element, &next_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element.", function ); return( -1 ); } if( libcdata_list_element_get_value( list_element, (intptr_t **) &next_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from next element.", function ); return( -1 ); } if( next_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing next range list value.", function ); return( -1 ); } result = libcdata_internal_range_list_check_range_overlap( internal_range_list, range_list_element, next_range_list_value->start, next_range_list_value->end, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if next range overlaps with range list element.", function ); return( -1 ); } else if( result == 0 ) { break; } if( libcdata_internal_range_list_append_value( (libcdata_internal_range_list_t *) backup_range_list, next_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to append value to backup range list.", function ); return( -1 ); } if( libcdata_internal_range_list_remove_element( internal_range_list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove list element.", function ); return( -1 ); } if( libcdata_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 ); return( -1 ); } if( libcdata_internal_range_list_merge_range( internal_range_list, range_list_element, next_range_list_value->start, next_range_list_value->end, next_range_list_value->value, value_merge_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge next range with range list element.", function ); return( -1 ); } } return( 1 ); } /* Inserts a range by merging the range into the range list element and successive overlapping ranges * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_insert_range_merge( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, uint64_t range_start, uint64_t range_end, intptr_t *value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcdata_range_list_t *backup_range_list, libcerror_error_t **error ) { libcdata_range_list_value_t *backup_range_list_value = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_insert_range_merge"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( libcdata_list_element_get_value( range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from range list element.", function ); goto on_error; } if( libcdata_range_list_value_initialize( &backup_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create backup range list value.", function ); goto on_error; } backup_range_list_value->start = range_list_value->start; backup_range_list_value->end = range_list_value->end; backup_range_list_value->size = range_list_value->size; if( libcdata_internal_range_list_append_value( (libcdata_internal_range_list_t *) backup_range_list, backup_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to append value to backup range list.", function ); goto on_error; } backup_range_list_value = NULL; if( libcdata_internal_range_list_merge_range( internal_range_list, range_list_element, range_start, range_end, value, value_merge_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge range with range list element.", function ); goto on_error; } if( libcdata_internal_range_list_merge_overlapping_ranges( internal_range_list, range_list_element, value_merge_function, backup_range_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge range list element with overlapping ranges.", function ); goto on_error; } return( 1 ); on_error: if( backup_range_list_value != NULL ) { libcdata_range_list_value_free( &backup_range_list_value, NULL, NULL ); } return( -1 ); } /* Reverts a previously merge of the range list element and successive overlapping ranges * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_insert_range_revert_merge( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_t *backup_range_list, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_backup_range_list = NULL; libcdata_list_element_t *backup_range_list_element = NULL; libcdata_range_list_value_t *backup_range_list_value = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_insert_range_revert_merge"; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( backup_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid backup range list.", function ); return( -1 ); } internal_backup_range_list = (libcdata_internal_range_list_t *) backup_range_list; if( internal_backup_range_list->first_element == NULL ) { return( 1 ); } if( libcdata_list_element_get_value( internal_backup_range_list->first_element, (intptr_t **) &backup_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from first backup range list element.", function ); return( -1 ); } if( libcdata_list_element_get_value( range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from range list element.", function ); return( -1 ); } range_list_value->start = backup_range_list_value->start; range_list_value->end = backup_range_list_value->end; range_list_value->size = backup_range_list_value->size; while( internal_backup_range_list->first_element != NULL ) { if( libcdata_list_element_get_next_element( internal_backup_range_list->first_element, &backup_range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from first backup range list element.", function ); return( -1 ); } if( backup_range_list_element == NULL ) { break; } if( libcdata_internal_range_list_remove_element( internal_backup_range_list, backup_range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove backup range list element.", function ); return( -1 ); } if( libcdata_internal_range_list_insert_element_after_element( internal_range_list, range_list_element, backup_range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element after range list element.", function ); return( -1 ); } backup_range_list_element = NULL; } return( 1 ); } /* Inserts a range * * The values are merged using the value_merge_function. * If the source value is NULL the merge function is not called. * * After a merge and on error the values are freed using * the value_free_function * * Returns 1 if successful, 0 if the range was merged or -1 on error */ int libcdata_range_list_insert_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, intptr_t *value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_list_element_t *new_element = NULL; libcdata_range_list_t *backup_range_list = NULL; static char *function = "libcdata_range_list_insert_range"; uint64_t range_end = 0; int element_index = 0; int result = 1; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( range_start > (uint64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range start value exceeds maximum.", function ); return( -1 ); } if( range_size > (uint64_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 ); } range_end = range_start + range_size; if( range_end < range_start ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range end value out of bounds.", function ); return( -1 ); } if( libcdata_range_list_initialize( &backup_range_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create backup range list.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); libcdata_range_list_free( &backup_range_list, NULL, NULL ); return( -1 ); } #endif if( libcdata_internal_range_list_insert_range_find_element( internal_range_list, range_start, range_end, &element_index, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find element in list.", function ); result = -1; } if( result == 1 ) { result = libcdata_internal_range_list_check_range_overlap( internal_range_list, list_element, range_start, range_end, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if range overlaps with range list element: %d.", function, element_index ); result = -1; } } if( result == 0 ) { result = 1; if( libcdata_internal_range_list_insert_range_before_element( internal_range_list, list_element, range_start, range_end, value, &new_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert range before range list element.", function ); result = -1; } } else if( result != -1 ) { result = 0; if( libcdata_internal_range_list_insert_range_merge( internal_range_list, list_element, range_start, range_end, value, value_merge_function, backup_range_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to merge range with list element: %d.", function, element_index ); result = -1; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif libcdata_range_list_free( &backup_range_list, value_free_function, NULL ); return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 0 ) { libcdata_internal_range_list_insert_range_revert_merge( internal_range_list, list_element, backup_range_list, NULL ); } else if( result == 1 ) { libcdata_internal_range_list_remove_range_value( internal_range_list, &new_element, NULL, NULL ); } libcdata_range_list_free( &backup_range_list, NULL, NULL ); return( -1 ); #endif } /* Inserts a range list * * The values are merged using the value_merge_function. * If the source value is NULL the merge function is not called. * * After a merge and on error the values are freed using * the value_free_function * * The values in the source_range_list are not affected. * * Returns 1 if successful, or -1 on error */ int libcdata_range_list_insert_range_list( libcdata_range_list_t *range_list, libcdata_range_list_t *source_range_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_list_element_t *source_list_element = NULL; libcdata_range_list_value_t *source_range_list_value = NULL; static char *function = "libcdata_range_list_insert_range_list"; int element_index = 0; int number_of_elements = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( source_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source range list.", function ); return( -1 ); } if( libcdata_range_list_get_number_of_elements( source_range_list, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of source list elements.", function ); return( -1 ); } if( libcdata_range_list_get_first_element( source_range_list, &source_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first element from source list.", function ); return( -1 ); } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libcdata_list_element_get_value( source_list_element, (intptr_t **) &source_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from source list element: %d.", function, element_index ); return( -1 ); } result = libcdata_range_list_insert_range( range_list, source_range_list_value->start, source_range_list_value->size, source_range_list_value->value, value_free_function, value_merge_function, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert source range list value: %d to range list.", function, element_index ); return( -1 ); } if( libcdata_list_element_get_next_element( source_list_element, &source_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from source list element: %d.", function, element_index ); return( -1 ); } } return( 1 ); } /* Shrinks a range * * A range that either overlaps the start or the end of the range list element * is removed by shrining the range of the range list element. * * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_remove_shrink_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ) { intptr_t *split_value = NULL; static char *function = "libcdata_internal_range_list_remove_shrink_range"; uint64_t split_offset = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list element.", function ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } if( ( range_start > range_list_value->start ) && ( range_end < range_list_value->end ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range value out of bounds.", function ); return( -1 ); } if( range_list_value->value != NULL ) { 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_split_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value split function.", function ); return( -1 ); } } if( range_start <= range_list_value->start ) { split_offset = range_end; } else { split_offset = range_start; } if( range_list_value->value != NULL ) { if( value_split_function( &split_value, range_list_value->value, split_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split value range offset: %" PRIu64 ".", function, split_offset ); goto on_error; } if( value_free_function( &( range_list_value->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free value.", function ); range_list_value->value = split_value; goto on_error; } range_list_value->value = split_value; } if( split_offset > range_list_value->start ) { range_list_value->start = split_offset; range_list_value->size = range_list_value->end - split_offset; } else { range_list_value->end = split_offset; range_list_value->size = split_offset - range_list_value->start; } return( 1 ); on_error: return( -1 ); } /* Splits a range * * A range that either overlaps a part of the range list element * is removed by splitting the range of the range list element. * * Returns 1 if successful, or -1 on error */ int libcdata_internal_range_list_remove_split_range( libcdata_internal_range_list_t *internal_range_list, libcdata_list_element_t *range_list_element, libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_range_list_value_t *split_range_list_value = NULL; static char *function = "libcdata_internal_range_list_remove_split_range"; uint64_t split_offset = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list element.", function ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } if( ( range_start <= range_list_value->start ) || ( range_end >= range_list_value->end ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range value out of bounds.", function ); return( -1 ); } if( range_list_value->value != NULL ) { 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_split_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value split function.", function ); return( -1 ); } } split_offset = range_end; if( libcdata_range_list_value_initialize( &split_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create range list value.", function ); goto on_error; } if( split_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value.", function ); goto on_error; } if( range_list_value->value != NULL ) { if( value_split_function( &( split_range_list_value->value ), range_list_value->value, split_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split value at range offset: %" PRIu64 ".", function, split_offset ); goto on_error; } } split_range_list_value->start = split_offset; split_range_list_value->size = range_list_value->end - split_offset; split_range_list_value->end = range_list_value->end; range_list_value->size = split_offset - range_list_value->start; range_list_value->end = split_offset; if( libcdata_internal_range_list_insert_value_after_element( internal_range_list, range_list_element, split_range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert range list value after range list element.", function ); goto on_error; } split_range_list_value = NULL; if( libcdata_internal_range_list_remove_shrink_range( internal_range_list, range_list_element, range_list_value, range_start, range_end, value_free_function, value_split_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to shrink range.", function ); goto on_error; } return( 1 ); on_error: if( split_range_list_value != NULL ) { libcdata_range_list_value_free( &split_range_list_value, value_free_function, NULL ); } return( -1 ); } /* Removes a range * * The values are split using the value_merge_function. * If the source value is NULL the split function is not called. * On return destination_value of the value_merge_function * should contain data greater equal to the split_range_offset. * * After a split and on error the values are freed using * the value_free_function * * Returns 1 if successful, or -1 on error */ int libcdata_range_list_remove_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_split_function)( intptr_t **destination_value, intptr_t *source_value, uint64_t split_range_offset, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_remove_range"; uint64_t next_range_start = 0; uint64_t range_end = 0; int result = 1; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( range_start > (uint64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range start value exceeds maximum.", function ); return( -1 ); } if( range_size > (uint64_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 ); } range_end = range_start + range_size; if( range_end < range_start ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range end value out of bounds.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif while( range_start < range_end ) { result = libcdata_internal_range_list_get_element_at_offset( internal_range_list, range_start, &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 for range offset: %" PRIu64 ".", function, range_start ); goto on_error; } else if( result == 0 ) { /* The specified range is not defined in the range list */ if( list_element == NULL ) { break; } } if( libcdata_list_element_get_value( list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element for range offset: %" PRIu64 ".", function, range_start ); goto on_error; } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element for range offset: %" PRIu64 ".", function, range_start ); goto on_error; } if( result == 0 ) { /* The specified range is not defined in the range list */ if( range_list_value->start >= range_end ) { break; } range_start = range_list_value->start; } next_range_start = range_list_value->end; if( ( range_start <= range_list_value->start ) && ( range_end >= range_list_value->end ) ) { if( libcdata_internal_range_list_remove_range_value( internal_range_list, &list_element, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove range value.", function ); goto on_error; } } else if( ( range_start > range_list_value->start ) && ( range_end < range_list_value->end ) ) { if( libcdata_internal_range_list_remove_split_range( internal_range_list, list_element, range_list_value, range_start, range_end, value_free_function, value_split_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split range.", function ); goto on_error; } } else { if( libcdata_internal_range_list_remove_shrink_range( internal_range_list, list_element, range_list_value, range_start, range_end, value_free_function, value_split_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to shrink range.", function ); goto on_error; } } range_start = next_range_start; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves a specific element from the range list * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_get_element_by_index( libcdata_internal_range_list_t *internal_range_list, int element_index, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_list_element_t *current_element = NULL; static char *function = "libcdata_internal_range_list_get_element_by_index"; int current_element_index = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( ( element_index < 0 ) || ( element_index >= internal_range_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 element.", function ); return( -1 ); } current_element = internal_range_list->current_element; current_element_index = internal_range_list->current_element_index; if( ( current_element != NULL ) && ( current_element_index != element_index ) ) { if( element_index < current_element_index ) { if( ( current_element_index - element_index ) < ( internal_range_list->number_of_elements / 2 ) ) { while( current_element_index > element_index ) { if( libcdata_list_element_get_previous_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from list element: %d.", function, current_element_index ); return( -1 ); } current_element_index--; } } } else { if( ( element_index - current_element_index ) < ( internal_range_list->number_of_elements / 2 ) ) { while( current_element_index < element_index ) { if( libcdata_list_element_get_next_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, current_element_index ); return( -1 ); } current_element_index++; } } } } if( ( current_element == NULL ) || ( current_element_index != element_index ) ) { if( element_index < ( internal_range_list->number_of_elements / 2 ) ) { current_element = internal_range_list->first_element; for( current_element_index = 0; current_element_index < element_index; current_element_index++ ) { if( libcdata_list_element_get_next_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, current_element_index ); return( -1 ); } } } else { current_element = internal_range_list->last_element; for( current_element_index = ( internal_range_list->number_of_elements - 1 ); current_element_index > element_index; current_element_index-- ) { if( libcdata_list_element_get_previous_element( current_element, ¤t_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from list element: %d.", function, current_element_index ); return( -1 ); } } } } if( current_element != NULL ) { internal_range_list->current_element = current_element; internal_range_list->current_element_index = current_element_index; } *element = current_element; return( 1 ); } /* Retrieves the element that contains the range offset * If the function returns element can be set to contain the element * containing the next range list value. * Returns 1 if successful, 0 if not found or -1 on error */ int libcdata_internal_range_list_get_element_at_offset( libcdata_internal_range_list_t *internal_range_list, uint64_t range_offset, libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_list_element_t *range_list_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_internal_range_list_get_element_at_offset"; int element_index = 0; if( internal_range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } if( range_offset > (uint64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range offset value exceeds maximum.", 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 ); } /* TODO add optimization using current element */ range_list_element = internal_range_list->first_element; for( element_index = 0; element_index < internal_range_list->number_of_elements; element_index++ ) { if( libcdata_list_element_get_value( range_list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value element: %d.", function, element_index ); return( -1 ); } if( range_offset < range_list_value->start ) { break; } if( ( range_offset >= range_list_value->start ) && ( range_offset < range_list_value->end ) ) { *element = range_list_element; return( 1 ); } if( libcdata_list_element_get_next_element( range_list_element, &range_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); return( -1 ); } } *element = NULL; return( 0 ); } /* Retrieves a specific value from the range list * Returns 1 if successful or -1 on error */ int libcdata_internal_range_list_get_value_by_index( libcdata_internal_range_list_t *internal_range_list, int element_index, libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_internal_range_list_get_value_by_index"; if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } if( libcdata_internal_range_list_get_element_by_index( internal_range_list, element_index, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d.", function, element_index ); return( -1 ); } if( libcdata_list_element_get_value( list_element, (intptr_t **) range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, element_index ); return( -1 ); } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value: %d .", function, element_index ); return( -1 ); } return( 1 ); } /* Retrieves the value that contains the range offset * Returns 1 if successful, 0 if no value was found or -1 on error */ int libcdata_internal_range_list_get_value_at_offset( libcdata_internal_range_list_t *internal_range_list, uint64_t range_offset, libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ) { libcdata_list_element_t *list_element = NULL; static char *function = "libcdata_internal_range_list_get_value_at_offset"; int result = 0; if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } result = libcdata_internal_range_list_get_element_at_offset( internal_range_list, range_offset, &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 for range offset: %" PRIu64 ".", function, range_offset ); return( -1 ); } else if( result != 0 ) { if( libcdata_list_element_get_value( list_element, (intptr_t **) range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element for range offset: %" PRIu64 ".", function, range_offset ); return( -1 ); } if( *range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value for range offset: %" PRIu64 ".", function, range_offset ); return( -1 ); } } return( result ); } /* Retrieves a specific range * Returns 1 if successful or -1 on error */ int libcdata_range_list_get_range_by_index( libcdata_range_list_t *range_list, int element_index, uint64_t *range_start, uint64_t *range_size, intptr_t **value, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_get_range_by_index"; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; 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 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_internal_range_list_get_value_by_index( internal_range_list, element_index, &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range list value: %d.", function, element_index ); goto on_error; } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value: %d.", function, element_index ); goto on_error; } *range_start = range_list_value->start; *range_size = range_list_value->size; *value = range_list_value->value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves a range for a specific range offset * Returns 1 if successful, 0 if no range was found or -1 on error */ int libcdata_range_list_get_range_at_offset( libcdata_range_list_t *range_list, uint64_t range_offset, uint64_t *range_start, uint64_t *range_size, intptr_t **value, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_get_range_at_offset"; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; 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 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif result = libcdata_internal_range_list_get_value_at_offset( internal_range_list, range_offset, &range_list_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range list value for range offset: %" PRIu64 ".", function, range_offset ); goto on_error; } else if( result != 0 ) { if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value for range offset: %" PRIu64 ".", function, range_offset ); goto on_error; } *range_start = range_list_value->start; *range_size = range_list_value->size; *value = range_list_value->value; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } /* Determines if a certain range is present in the list * This function does not check for partial overlapping ranges * Returns 1 if a range is present, 0 if not or -1 on error */ int libcdata_range_list_range_is_present( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_range_is_present"; uint64_t range_end = 0; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( range_start > (uint64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range start value exceeds maximum.", function ); return( -1 ); } if( range_size > (uint64_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_end = range_start + range_size; if( range_end < range_start ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range end value out of bounds.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif /* TODO add optimization using current element */ list_element = internal_range_list->first_element; for( element_index = 0; element_index < internal_range_list->number_of_elements; element_index++ ) { if( libcdata_list_element_get_value( list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, element_index ); goto on_error; } if( range_end < range_list_value->start ) { break; } if( ( range_start >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { result = 1; break; } if( libcdata_list_element_get_next_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); goto on_error; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } /* Determines if a certain range is present in the list * This function does not check for partial overlapping ranges * Returns 1 if a range is present, 0 if not or -1 on error */ int libcdata_range_list_range_has_overlapping_range( libcdata_range_list_t *range_list, uint64_t range_start, uint64_t range_size, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_list_element_t *list_element = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_range_has_overlapping_range"; uint64_t range_end = 0; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; if( range_start > (uint64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range start value exceeds maximum.", function ); return( -1 ); } if( range_size > (uint64_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_end = range_start + range_size; if( range_end < range_start ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range end value out of bounds.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif /* TODO add optimization using current element */ list_element = internal_range_list->first_element; for( element_index = 0; element_index < internal_range_list->number_of_elements; element_index++ ) { if( libcdata_list_element_get_value( list_element, (intptr_t **) &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from list element: %d.", function, element_index ); goto on_error; } if( range_end < range_list_value->start ) { break; } if( ( range_start >= range_list_value->start ) && ( range_start < range_list_value->end ) ) { result = 1; break; } if( ( range_end > range_list_value->start ) && ( range_end <= range_list_value->end ) ) { result = 1; break; } if( libcdata_list_element_get_next_element( list_element, &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from list element: %d.", function, element_index ); goto on_error; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves the range spanning the ranges in the range list * Returns 1 if present, 0 if not present or -1 on error */ int libcdata_range_list_get_spanning_range( libcdata_range_list_t *range_list, uint64_t *range_start, uint64_t *range_size, libcerror_error_t **error ) { libcdata_internal_range_list_t *internal_range_list = NULL; libcdata_range_list_value_t *range_list_value = NULL; static char *function = "libcdata_range_list_get_spanning_range"; int element_index = 0; int result = 0; if( range_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list.", function ); return( -1 ); } internal_range_list = (libcdata_internal_range_list_t *) range_list; 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( internal_range_list->number_of_elements > 0 ) { if( libcdata_internal_range_list_get_value_by_index( internal_range_list, 0, &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range list value: 0.", function ); goto on_error; } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value: 0.", function ); goto on_error; } *range_start = range_list_value->start; if( internal_range_list->number_of_elements > 1 ) { element_index = internal_range_list->number_of_elements - 1; if( libcdata_internal_range_list_get_value_by_index( internal_range_list, element_index, &range_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve range list value: %d.", function, element_index ); goto on_error; } if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing range list value: %d.", function, element_index ); goto on_error; } } *range_size = range_list_value->end - *range_start; result = 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_range_list->read_write_lock, NULL ); #endif return( -1 ); } libesedb-20240420/libcdata/libcdata_array.c0000644000175000017500000014146014610746222021242 0ustar00lordyestalordyesta/* * Array functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_array.h" #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" /* Creates an array * Make sure the value array is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_array_initialize( libcdata_array_t **array, int number_of_entries, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_initialize"; size_t entries_size = 0; int number_of_allocated_entries = 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_VALUE_LESS_THAN_ZERO, "%s: invalid number of entries value less than zero.", function ); return( -1 ); } internal_array = memory_allocate_structure( libcdata_internal_array_t ); if( internal_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( internal_array, 0, sizeof( libcdata_internal_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array.", function ); memory_free( internal_array ); return( -1 ); } /* Pre-allocate in blocks of 16 entries */ if( number_of_entries >= (int) ( INT_MAX - 16 ) ) { number_of_allocated_entries = INT_MAX; } else { number_of_allocated_entries = ( number_of_entries & ~( 15 ) ) + 16; } #if SIZEOF_INT <= SIZEOF_SIZE_T if( (size_t) number_of_allocated_entries > (size_t) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #else if( number_of_allocated_entries > (int) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of allocated entries value exceeds maximum.", function ); goto on_error; } entries_size = sizeof( intptr_t * ) * number_of_allocated_entries; if( entries_size > (size_t) LIBCDATA_ARRAY_ENTRIES_MEMORY_LIMIT ) { 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; } internal_array->entries = (intptr_t **) memory_allocate( entries_size ); if( internal_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( internal_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; } internal_array->number_of_allocated_entries = number_of_allocated_entries; internal_array->number_of_entries = number_of_entries; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_array->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *array = (libcdata_array_t *) internal_array; return( 1 ); on_error: if( internal_array != NULL ) { if( internal_array->entries != NULL ) { memory_free( internal_array->entries ); } memory_free( internal_array ); } return( -1 ); } /* Frees an array * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libcdata_array_free( libcdata_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_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 ) { internal_array = (libcdata_internal_array_t *) *array; *array = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_array->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif if( internal_array->entries != NULL ) { if( libcdata_internal_array_clear( internal_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( internal_array->entries ); } memory_free( internal_array ); } return( result ); } /* Empties an array and frees its entries * The entries are freed using the entry_free_function * If the entry_free_function fails for a specific entry it is not freed and kept in the array * * Returns 1 if successful or -1 on error */ int libcdata_array_empty( libcdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_empty"; 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 ); } internal_array = (libcdata_internal_array_t *) array; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_internal_array_clear( internal_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; } else { internal_array->number_of_entries = 0; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * If the entry_free_function fails for a specific entry it is not freed and kept in the array * * This function is not multi-thread safe acquire write lock before call * Returns 1 if successful or -1 on error */ int libcdata_internal_array_clear( libcdata_internal_array_t *internal_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libcdata_internal_array_clear"; int entry_free_result = 0; int entry_iterator = 0; int result = 1; if( internal_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( internal_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 = 0; entry_iterator < internal_array->number_of_entries; entry_iterator++ ) { if( internal_array->entries[ entry_iterator ] != NULL ) { if( entry_free_function == NULL ) { entry_free_result = 1; } else { entry_free_result = entry_free_function( &( internal_array->entries[ entry_iterator ] ), error ); } if( entry_free_result != 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; } else { internal_array->entries[ entry_iterator ] = NULL; } } } return( result ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * If the entry_free_function fails for a specific entry it is not freed and kept in the array * * Returns 1 if successful or -1 on error */ int libcdata_array_clear( libcdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_clear"; 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 ); } internal_array = (libcdata_internal_array_t *) array; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_internal_array_clear( internal_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; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif 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 libcdata_array_clone( libcdata_array_t **destination_array, libcdata_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination_entry, intptr_t *source_entry, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_array_t *internal_destination_array = NULL; libcdata_internal_array_t *internal_source_array = NULL; static char *function = "libcdata_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 ); } internal_source_array = (libcdata_internal_array_t *) source_array; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_source_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_array_initialize( (libcdata_array_t **) &internal_destination_array, internal_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( internal_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( internal_source_array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < internal_source_array->number_of_entries; entry_iterator++ ) { if( internal_source_array->entries[ entry_iterator ] != NULL ) { if( entry_clone_function( &( internal_destination_array->entries[ entry_iterator ] ), internal_source_array->entries[ entry_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination array entry: %d.", function, entry_iterator ); goto on_error; } } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_source_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libcdata_array_free( (libcdata_array_t **) &internal_destination_array, entry_free_function, NULL ); return( -1 ); } #endif *destination_array = (libcdata_array_t *) internal_destination_array; return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_source_array->read_write_lock, NULL ); #endif if( internal_destination_array != NULL ) { libcdata_array_free( (libcdata_array_t **) &internal_destination_array, entry_free_function, NULL ); } return( -1 ); } /* Resizes an array * This function is not multi-thread safe acquire write lock before call * Returns 1 if successful or -1 on error */ int libcdata_internal_array_resize( libcdata_internal_array_t *internal_array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libcdata_internal_array_resize"; void *reallocation = NULL; size_t entries_size = 0; int entry_iterator = 0; int number_of_allocated_entries = 0; int result = 1; if( internal_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( internal_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( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of entries value less than zero.", function ); return( -1 ); } if( number_of_entries > internal_array->number_of_allocated_entries ) { /* Pre-allocate in blocks of 16 entries */ if( number_of_entries >= (int) ( INT_MAX - 16 ) ) { number_of_allocated_entries = INT_MAX; } else { number_of_allocated_entries = ( number_of_entries & ~( 15 ) ) + 16; } #if SIZEOF_INT <= SIZEOF_SIZE_T if( (size_t) number_of_allocated_entries > (size_t) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #else if( number_of_allocated_entries > (int) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of allocated entries value exceeds maximum.", function ); return( -1 ); } entries_size = sizeof( intptr_t * ) * number_of_allocated_entries; if( entries_size > (size_t) LIBCDATA_ARRAY_ENTRIES_MEMORY_LIMIT ) { 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( internal_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 ); } internal_array->entries = (intptr_t **) reallocation; /* Cannot use memset reliably here. The loop below will be removed * when memset is used and the code is optimized. Therefore the loop * is not executed when memset fails. */ for( entry_iterator = internal_array->number_of_allocated_entries; entry_iterator < number_of_allocated_entries; entry_iterator++ ) { internal_array->entries[ entry_iterator ] = NULL; } internal_array->number_of_allocated_entries = number_of_allocated_entries; internal_array->number_of_entries = number_of_entries; } else if( number_of_entries > internal_array->number_of_entries ) { internal_array->number_of_entries = number_of_entries; } else if( internal_array->entries != NULL ) { for( entry_iterator = number_of_entries; entry_iterator < internal_array->number_of_entries; entry_iterator++ ) { if( internal_array->entries[ entry_iterator ] != 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 ); } if( entry_free_function( &( internal_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; } internal_array->entries[ entry_iterator ] = NULL; } } internal_array->number_of_entries = number_of_entries; } return( result ); } /* Resizes an array * Returns 1 if successful or -1 on error */ int libcdata_array_resize( libcdata_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_resize"; 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 ); } internal_array = (libcdata_internal_array_t *) array; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( libcdata_internal_array_resize( internal_array, number_of_entries, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); } /* Reverses the order of the entries in the array * Returns 1 if successful or -1 on error */ int libcdata_array_reverse( libcdata_array_t *array, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; intptr_t *entry = NULL; static char *function = "libcdata_array_reverse"; int entry_iterator = 0; int reverse_entry_iterator = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif if( internal_array->number_of_entries > 1 ) { reverse_entry_iterator = internal_array->number_of_entries - 1; while( entry_iterator < reverse_entry_iterator ) { entry = internal_array->entries[ reverse_entry_iterator ]; internal_array->entries[ reverse_entry_iterator ] = internal_array->entries[ entry_iterator ]; internal_array->entries[ entry_iterator ] = entry; entry_iterator++; reverse_entry_iterator--; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves the number of entries in the array * Returns 1 if successful or -1 on error */ int libcdata_array_get_number_of_entries( libcdata_array_t *array, int *number_of_entries, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_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 ); } internal_array = (libcdata_internal_array_t *) array; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *number_of_entries = internal_array->number_of_entries; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves a specific entry from the array * Returns 1 if successful or -1 on error */ int libcdata_array_get_entry_by_index( libcdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_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 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 >= internal_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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *entry = internal_array->entries[ entry_index ]; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves a specific entry from the array * * Uses the entry_compare_function to determine the similarity of the entries * The entry_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if no such value or -1 on error */ int libcdata_array_get_entry_by_value( libcdata_array_t *array, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), intptr_t **existing_entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_get_entry_by_value"; int compare_result = 0; int entry_index = 0; int result = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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_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( existing_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid existing entry.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif for( entry_index = 0; entry_index < internal_array->number_of_entries; entry_index++ ) { compare_result = entry_compare_function( entry, internal_array->entries[ entry_index ], error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_index ); result = -1; break; } else if( compare_result == LIBCDATA_COMPARE_EQUAL ) { *existing_entry = internal_array->entries[ entry_index ]; result = 1; break; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); } /* Sets a specific entry in the array * Returns 1 if successful or -1 on error */ int libcdata_array_set_entry_by_index( libcdata_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_set_entry_by_index"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) intptr_t *backup_entry = NULL; #endif if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 >= internal_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_entry = internal_array->entries[ entry_index ]; #endif internal_array->entries[ entry_index ] = entry; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_array->entries[ entry_index ] = backup_entry; return( -1 ); #endif } /* Prepends an entry * Returns 1 if successful or -1 on error */ int libcdata_array_prepend_entry( libcdata_array_t *array, intptr_t *entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_prepend_entry"; int entry_iterator = 0; int result = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif result = libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); result = -1; } else { for( entry_iterator = internal_array->number_of_entries - 1; entry_iterator > 0; entry_iterator-- ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator - 1 ]; } internal_array->entries[ entry_iterator ] = entry; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { for( entry_iterator = 0; entry_iterator < ( internal_array->number_of_entries - 1 ); entry_iterator++ ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator + 1 ]; } internal_array->entries[ entry_iterator ] = NULL; internal_array->number_of_entries -= 1; } return( -1 ); #endif } /* Appends an entry * Sets the entry index to the newly appended entry * Returns 1 if successful or -1 on error */ int libcdata_array_append_entry( libcdata_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_append_entry"; int result = 0; int safe_entry_index = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif safe_entry_index = internal_array->number_of_entries; result = libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); result = -1; } else { internal_array->entries[ safe_entry_index ] = entry; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif if( result == 1 ) { *entry_index = safe_entry_index; } return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { internal_array->entries[ safe_entry_index ] = NULL; internal_array->number_of_entries -= 1; } return( -1 ); #endif } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * entry_index is set to the index of the entry when the entry was successfully inserted * or to the index of the existing entry when the flag LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * is set and an existing entry was found. * * Returns 1 if successful, 0 if the entry already exists or -1 on error */ int libcdata_array_insert_entry( libcdata_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 ) { libcdata_internal_array_t *internal_array = NULL; static char *function = "libcdata_array_insert_entry"; int compare_result = 0; int entry_iterator = 0; int result = 0; int safe_entry_index = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 == 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 & ~( LIBCDATA_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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif compare_result = LIBCDATA_COMPARE_GREATER; result = 1; for( entry_iterator = 0; entry_iterator < internal_array->number_of_entries; entry_iterator++ ) { compare_result = entry_compare_function( entry, internal_array->entries[ entry_iterator ], error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_iterator ); result = -1; } else if( compare_result == LIBCDATA_COMPARE_EQUAL ) { if( ( insert_flags & LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { result = 0; } } else if( compare_result == LIBCDATA_COMPARE_LESS ) { result = 1; break; } else if( compare_result != LIBCDATA_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry compare function return value: %d.", function, compare_result ); result = -1; } if( result != 1 ) { break; } } if( result == 1 ) { result = libcdata_internal_array_resize( internal_array, internal_array->number_of_entries + 1, NULL, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); result = -1; } else { safe_entry_index = entry_iterator; if( compare_result == LIBCDATA_COMPARE_LESS ) { for( entry_iterator = internal_array->number_of_entries - 1; entry_iterator > safe_entry_index; entry_iterator-- ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator - 1 ]; } } internal_array->entries[ safe_entry_index ] = entry; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif if( result != -1 ) { *entry_index = safe_entry_index; } return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { for( entry_iterator = safe_entry_index; entry_iterator < ( internal_array->number_of_entries - 1 ); entry_iterator++ ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator + 1 ]; } internal_array->entries[ entry_iterator ] = NULL; internal_array->number_of_entries -= 1; } return( -1 ); #endif } /* Removes an entry * Returns 1 if successful or -1 on error */ int libcdata_array_remove_entry( libcdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { libcdata_internal_array_t *internal_array = NULL; intptr_t *safe_entry = NULL; static char *function = "libcdata_array_remove_entry"; int entry_iterator = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } internal_array = (libcdata_internal_array_t *) array; if( internal_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 >= internal_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 = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif safe_entry = internal_array->entries[ entry_index ]; for( entry_iterator = entry_index; entry_iterator < ( internal_array->number_of_entries - 1 ); entry_iterator++ ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator + 1 ]; } internal_array->entries[ entry_iterator ] = NULL; internal_array->number_of_entries -= 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_array->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif *entry = safe_entry; return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_array->number_of_entries += 1; for( entry_iterator = ( internal_array->number_of_entries - 1 ); entry_iterator > entry_index; entry_iterator-- ) { internal_array->entries[ entry_iterator ] = internal_array->entries[ entry_iterator - 1 ]; } internal_array->entries[ entry_index ] = safe_entry; return( -1 ); #endif } libesedb-20240420/libcdata/libcdata_list_element.c0000644000175000017500000005644614610746222022621 0ustar00lordyestalordyesta/* * List element functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_list_element.h" #include "libcdata_types.h" /* Creates a list element * Make sure the value element is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_list_element_initialize( libcdata_list_element_t **element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_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 ); } internal_element = memory_allocate_structure( libcdata_internal_list_element_t ); if( internal_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( internal_element, 0, sizeof( libcdata_internal_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list element.", function ); memory_free( internal_element ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_element->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *element = (libcdata_list_element_t *) internal_element; return( 1 ); on_error: if( internal_element != NULL ) { memory_free( internal_element ); } 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 libcdata_list_element_free( libcdata_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_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 ) { internal_element = (libcdata_internal_list_element_t *) *element; if( ( internal_element->previous_element != NULL ) || ( internal_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 ); } *element = NULL; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_element->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif if( value_free_function != NULL ) { if( value_free_function( &( internal_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( internal_element ); } return( result ); } /* Retrieves the parent list from the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_get_parent_list( libcdata_list_element_t *element, intptr_t **parent_list, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_get_parent_list"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; if( parent_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent list.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *parent_list = internal_element->parent_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the parent list in the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_set_parent_list( libcdata_list_element_t *element, intptr_t *parent_list, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_set_parent_list"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) intptr_t *backup_parent_list = NULL; #endif if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_parent_list = internal_element->parent_list; #endif internal_element->parent_list = parent_list; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_element->parent_list = backup_parent_list; return( -1 ); #endif } /* Retrieves the previous element from the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_get_previous_element( libcdata_list_element_t *element, libcdata_list_element_t **previous_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_get_previous_element"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; if( previous_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid previous element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *previous_element = internal_element->previous_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the previous element in the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_set_previous_element( libcdata_list_element_t *element, libcdata_list_element_t *previous_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_set_previous_element"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_previous_element = NULL; #endif if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_previous_element = internal_element->previous_element; #endif internal_element->previous_element = previous_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_element->previous_element = backup_previous_element; return( -1 ); #endif } /* Retrieves the next element from the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_get_next_element( libcdata_list_element_t *element, libcdata_list_element_t **next_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_get_next_element"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; if( next_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid next element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *next_element = internal_element->next_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the next element in the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_set_next_element( libcdata_list_element_t *element, libcdata_list_element_t *next_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_set_next_element"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_next_element = NULL; #endif if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_next_element = internal_element->next_element; #endif internal_element->next_element = next_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_element->next_element = backup_next_element; return( -1 ); #endif } /* Retrieves the previous and next element from the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_get_elements( libcdata_list_element_t *element, libcdata_list_element_t **previous_element, libcdata_list_element_t **next_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_get_elements"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; if( previous_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid previous element.", function ); return( -1 ); } if( next_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid next element.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *previous_element = internal_element->previous_element; *next_element = internal_element->next_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the previous and next element in the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_set_elements( libcdata_list_element_t *element, libcdata_list_element_t *previous_element, libcdata_list_element_t *next_element, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_set_elements"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_list_element_t *backup_next_element = NULL; libcdata_list_element_t *backup_previous_element = NULL; #endif if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_previous_element = internal_element->previous_element; backup_next_element = internal_element->next_element; #endif internal_element->previous_element = previous_element; internal_element->next_element = next_element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_element->previous_element = backup_previous_element; internal_element->next_element = backup_next_element; return( -1 ); #endif } /* Retrieves the value from the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_get_value( libcdata_list_element_t *element, intptr_t **value, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_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 ); } internal_element = (libcdata_internal_list_element_t *) element; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *value = internal_element->value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the value in the list element * Returns 1 if successful or -1 on error */ int libcdata_list_element_set_value( libcdata_list_element_t *element, intptr_t *value, libcerror_error_t **error ) { libcdata_internal_list_element_t *internal_element = NULL; static char *function = "libcdata_list_element_set_value"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) intptr_t *backup_value = NULL; #endif if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } internal_element = (libcdata_internal_list_element_t *) element; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_value = internal_element->value; #endif internal_element->value = value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_element->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_element->value = backup_value; return( -1 ); #endif } libesedb-20240420/libcdata/libcdata_libcthreads.h0000644000175000017500000000360514610746222022413 0ustar00lordyestalordyesta/* * The libcthreads header wrapper * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_LIBCTHREADS_H ) #define _LIBCDATA_LIBCTHREADS_H #include #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) #define HAVE_LIBCDATA_MULTI_THREAD_SUPPORT #endif #if defined( HAVE_LIBCDATA_MULTI_THREAD_SUPPORT ) /* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads */ #if defined( HAVE_LOCAL_LIBCTHREADS ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCTHREADS_DLL_IMPORT * before including libcthreads.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCTHREADS_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCTHREADS ) */ #endif /* defined( HAVE_LIBCDATA_MULTI_THREAD_SUPPORT ) */ #endif /* !defined( _LIBCDATA_LIBCTHREADS_H ) */ libesedb-20240420/libcdata/libcdata_tree_node.h0000644000175000017500000002025514610746222022073 0ustar00lordyestalordyesta/* * Tree functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_TREE_NODE_H ) #define _LIBCDATA_TREE_NODE_H #include #include #include "libcdata_extern.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcdata_internal_tree_node libcdata_internal_tree_node_t; struct libcdata_internal_tree_node { /* The parent node */ libcdata_tree_node_t *parent_node; /* The previous node */ libcdata_tree_node_t *previous_node; /* The next node */ libcdata_tree_node_t *next_node; /* The first sub node */ libcdata_tree_node_t *first_sub_node; /* The last sub node */ libcdata_tree_node_t *last_sub_node; /* The number of sub nodes */ int number_of_sub_nodes; /* The node value */ intptr_t *value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) /* The read/write lock */ libcthreads_read_write_lock_t *read_write_lock; #endif }; LIBCDATA_EXTERN \ int libcdata_tree_node_initialize( libcdata_tree_node_t **node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_free( libcdata_tree_node_t **node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_empty( libcdata_tree_node_t *node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_clone( libcdata_tree_node_t **destination_node, libcdata_tree_node_t *source_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_value( libcdata_tree_node_t *node, intptr_t **value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_set_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_parent_node( libcdata_tree_node_t *node, libcdata_tree_node_t **parent_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_set_parent_node( libcdata_tree_node_t *node, libcdata_tree_node_t *parent_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_previous_node( libcdata_tree_node_t *node, libcdata_tree_node_t **previous_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_set_previous_node( libcdata_tree_node_t *node, libcdata_tree_node_t *previous_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_next_node( libcdata_tree_node_t *node, libcdata_tree_node_t **next_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_set_next_node( libcdata_tree_node_t *node, libcdata_tree_node_t *next_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t **parent_node, libcdata_tree_node_t **previous_node, libcdata_tree_node_t **next_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_set_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t *parent_node, libcdata_tree_node_t *previous_node, libcdata_tree_node_t *next_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_first_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **first_sub_node, libcerror_error_t **error ); int libcdata_internal_tree_node_set_first_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *first_sub_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_last_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **last_sub_node, libcerror_error_t **error ); int libcdata_internal_tree_node_set_last_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *last_sub_node, libcerror_error_t **error ); int libcdata_tree_node_get_sub_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t **first_sub_node, libcdata_tree_node_t **last_sub_node, libcerror_error_t **error ); int libcdata_tree_node_set_sub_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t *first_sub_node, libcdata_tree_node_t *last_sub_node, libcerror_error_t **error ); int libcdata_internal_tree_node_append_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *node_to_append, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_append_node( libcdata_tree_node_t *node, libcdata_tree_node_t *node_to_append, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_append_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ); int libcdata_internal_tree_node_insert_node_find_sub_node( libcdata_internal_tree_node_t *internal_node, intptr_t *value_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, int *sub_node_index, libcdata_tree_node_t **sub_node, libcerror_error_t **error ); int libcdata_internal_tree_node_insert_node_before_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *sub_node, libcdata_tree_node_t *node_to_insert, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_insert_node( libcdata_tree_node_t *node, libcdata_tree_node_t *node_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_insert_value( libcdata_tree_node_t *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 ); LIBCDATA_EXTERN \ int libcdata_tree_node_replace_node( libcdata_tree_node_t *node, libcdata_tree_node_t *replacement_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_remove_node( libcdata_tree_node_t *node, libcdata_tree_node_t *sub_node_to_remove, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_number_of_sub_nodes( libcdata_tree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_sub_node_by_index( libcdata_tree_node_t *node, int sub_node_index, libcdata_tree_node_t **sub_node, libcerror_error_t **error ); LIBCDATA_EXTERN \ int libcdata_tree_node_get_leaf_node_list( libcdata_tree_node_t *node, libcdata_list_t **leaf_node_list, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_TREE_NODE_H ) */ libesedb-20240420/libcdata/libcdata_error.h0000644000175000017500000000340314610746222021254 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_INTERNAL_ERROR_H ) #define _LIBCDATA_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCDATA ) #include #endif #include "libcdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCDATA ) LIBCDATA_EXTERN \ void libcdata_error_free( libcdata_error_t **error ); LIBCDATA_EXTERN \ int libcdata_error_fprint( libcdata_error_t *error, FILE *stream ); LIBCDATA_EXTERN \ int libcdata_error_sprint( libcdata_error_t *error, char *string, size_t size ); LIBCDATA_EXTERN \ int libcdata_error_backtrace_fprint( libcdata_error_t *error, FILE *stream ); LIBCDATA_EXTERN \ int libcdata_error_backtrace_sprint( libcdata_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_INTERNAL_ERROR_H ) */ libesedb-20240420/libcdata/libcdata_types.h0000644000175000017500000000367014610746222021275 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_INTERNAL_TYPES_H ) #define _LIBCDATA_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata * The definitions in are copied here * for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcdata_array {} libcdata_array_t; typedef struct libcdata_btree {} libcdata_btree_t; typedef struct libcdata_list {} libcdata_list_t; typedef struct libcdata_list_element {} libcdata_list_element_t; typedef struct libcdata_range_list {} libcdata_range_list_t; typedef struct libcdata_tree_node {} libcdata_tree_node_t; #else typedef intptr_t libcdata_array_t; typedef intptr_t libcdata_btree_t; typedef intptr_t libcdata_list_t; typedef intptr_t libcdata_list_element_t; typedef intptr_t libcdata_range_list_t; typedef intptr_t libcdata_tree_node_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBCDATA_INTERNAL_TYPES_H ) */ libesedb-20240420/libcdata/libcdata_btree_node.c0000644000175000017500000011125514610746222022231 0ustar00lordyestalordyesta/* * Balanced tree node functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_array.h" #include "libcdata_btree_node.h" #include "libcdata_btree_values_list.h" #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_list.h" #include "libcdata_list_element.h" #include "libcdata_tree_node.h" #include "libcdata_types.h" /* Retrieves the sub node for the specific value * * Uses the value_compare_function to determine the similarity of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * If value_compare_function is NULL the pointer of the value is used to check for a match * * Returns 1 if successful, 0 if the value does not exist or -1 on error * If there was no possible sub match values_list_element is set to NULL * it there is a possible sub match values_list_element is set but 0 is returned * If the node is a leaf node sub_node is not set to NULL */ int libcdata_btree_node_get_sub_node_by_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **sub_node, libcdata_list_element_t **values_list_element, libcerror_error_t **error ) { libcdata_list_t *values_list = NULL; libcdata_list_element_t *safe_values_list_element = NULL; libcdata_tree_node_t *safe_sub_node = NULL; intptr_t *values_list_value = NULL; static char *function = "libcdata_btree_node_get_sub_node_by_value"; int number_of_sub_nodes = 0; int number_of_values_list_elements = 0; int result = 0; int sub_node_index = 0; int values_list_element_index = 0; 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 ); } 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( values_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list element.", function ); return( -1 ); } *sub_node = NULL; *values_list_element = NULL; if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } if( values_list != NULL ) { if( libcdata_list_get_number_of_elements( values_list, &number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values list elements.", function ); return( -1 ); } } if( libcdata_tree_node_get_number_of_sub_nodes( node, &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 sub nodes.", function ); return( -1 ); } if( ( number_of_sub_nodes != 0 ) && ( ( number_of_values_list_elements + 1 ) != number_of_sub_nodes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of values list elements value out of bounds.", function ); return( -1 ); } if( number_of_values_list_elements == 0 ) { return( 0 ); } if( libcdata_list_get_first_element( values_list, &safe_values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first values list element.", function ); return( -1 ); } if( number_of_sub_nodes != 0 ) { if( libcdata_tree_node_get_sub_node_by_index( node, 0, &safe_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: 0.", function ); return( -1 ); } } for( values_list_element_index = 0; values_list_element_index < number_of_values_list_elements; values_list_element_index++ ) { if( libcdata_list_element_get_value( safe_values_list_element, &values_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from values list element: %d.", function, values_list_element_index ); return( -1 ); } if( values_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid values list element: %d - missing value.", function, values_list_element_index ); return( -1 ); } if( value_compare_function != NULL ) { result = value_compare_function( value, values_list_value, error ); } else if( value == values_list_value ) { result = LIBCDATA_COMPARE_EQUAL; } else { result = LIBCDATA_COMPARE_GREATER; } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare value with values list value: %d.", function, values_list_element_index ); return( -1 ); } else if( result == LIBCDATA_COMPARE_EQUAL ) { *sub_node = safe_sub_node; *values_list_element = safe_values_list_element; return( 1 ); } else if( result == LIBCDATA_COMPARE_LESS ) { break; } else if( result != LIBCDATA_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 ); } if( libcdata_list_element_get_next_element( safe_values_list_element, &safe_values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from values list element: %d.", function, values_list_element_index ); return( -1 ); } if( number_of_sub_nodes != 0 ) { if( libcdata_tree_node_get_next_node( safe_sub_node, &safe_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node from sub node: %d.", function, sub_node_index ); return( -1 ); } sub_node_index++; } } *sub_node = safe_sub_node; *values_list_element = safe_values_list_element; return( 0 ); } /* Retrieves the upper node for the specific value * * Uses the value_compare_function to determine the similarity of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if the value does not exist or -1 on error */ int libcdata_btree_node_get_upper_node_by_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcdata_tree_node_t **upper_node, libcdata_list_element_t **values_list_element, libcerror_error_t **error ) { libcdata_list_element_t *sub_values_list_element = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_btree_node_get_upper_node_by_value"; int result = 0; 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 ); } 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( upper_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid upper node.", function ); return( -1 ); } if( values_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list element.", function ); return( -1 ); } *upper_node = NULL; *values_list_element = NULL; result = libcdata_btree_node_get_sub_node_by_value( node, value, value_compare_function, &sub_node, &sub_values_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node by value.", function ); return( -1 ); } else if( sub_node != NULL ) { result = libcdata_btree_node_get_upper_node_by_value( sub_node, value, value_compare_function, upper_node, values_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper node in sub node.", function ); return( -1 ); } } else if( result != 0 ) { *values_list_element = sub_values_list_element; } if( *upper_node == NULL ) { *upper_node = node; } return( result ); } /* Appends a value into a tree node * Returns 1 if successful or -1 on error */ int libcdata_btree_node_append_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ) { libcdata_list_t *values_list = NULL; static char *function = "libcdata_btree_node_append_value"; if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } if( values_list == NULL ) { if( libcdata_list_initialize( &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create values list.", function ); return( -1 ); } if( libcdata_tree_node_set_value( node, (intptr_t *) values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set values list.", function ); libcdata_list_free( &values_list, NULL, NULL ); return( -1 ); } } if( libcdata_list_append_value( values_list, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value to values list.", function ); return( -1 ); } return( 1 ); } /* Inserts a value into a tree node * The tree node must be the most upper node (leaf) * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if the value already exists or -1 on error */ int libcdata_btree_node_insert_value( libcdata_tree_node_t *node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_list_t *values_list = NULL; static char *function = "libcdata_btree_node_insert_value"; int number_of_sub_nodes = 0; int result = 0; if( libcdata_tree_node_get_number_of_sub_nodes( node, &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 sub nodes.", function ); return( -1 ); } if( number_of_sub_nodes != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: cannot insert value in node with sub nodes.", function ); return( -1 ); } if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } if( values_list == NULL ) { if( libcdata_list_initialize( &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create values list.", function ); return( -1 ); } if( libcdata_tree_node_set_value( node, (intptr_t *) values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set values list.", function ); libcdata_list_free( &values_list, NULL, NULL ); return( -1 ); } } result = libcdata_list_insert_value( values_list, value, value_compare_function, LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert value in values list.", function ); return( -1 ); } return( result ); } /* Replaces a value in the tree node * The tree node must be the most upper node (leaf) in the first call * Returns 1 if successful or -1 on error */ int libcdata_btree_node_replace_value( libcdata_tree_node_t *node, intptr_t *value, intptr_t *replacement_value, libcerror_error_t **error ) { libcdata_list_element_t *values_list_element = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_btree_node_replace_value"; 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( replacement_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid replacement value.", function ); return( -1 ); } result = libcdata_btree_node_get_sub_node_by_value( node, value, NULL, &sub_node, &values_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node by value.", function ); return( -1 ); } else if( result != 0 ) { if( libcdata_list_element_set_value( values_list_element, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in values list element.", function ); return( -1 ); } } if( libcdata_tree_node_get_parent_node( node, &parent_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve parent node.", function ); return( -1 ); } if( parent_node != NULL ) { if( libcdata_btree_node_replace_value( parent_node, value, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to replace value in parent node.", function ); return( -1 ); } } return( 1 ); } /* Flattens a tree node and its sub node * Returns 1 if successful or -1 on error */ int libcdata_btree_node_flatten_node( libcdata_tree_node_t **node, libcerror_error_t **error ) { libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_btree_node_flatten_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( libcdata_tree_node_get_first_sub_node( *node, &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first sub node.", function ); return( -1 ); } if( libcdata_tree_node_remove_node( *node, sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove sub node from node.", function ); return( -1 ); } if( libcdata_tree_node_replace_node( *node, sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to replace node with sub node.", function ); libcdata_tree_node_append_node( *node, sub_node, NULL ); return( -1 ); } if( libcdata_tree_node_free( node, (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_values_list_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free node.", function ); return( -1 ); } *node = sub_node; return( 1 ); } /* Removes a sub node from the B-tree node * Returns 1 if successful or -1 on error */ int libcdata_btree_node_remove_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **sub_node, libcerror_error_t **error ) { static char *function = "libcdata_btree_node_remove_sub_node"; 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node.", function ); return( -1 ); } if( libcdata_tree_node_remove_node( node, *sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove sub node from node.", function ); return( -1 ); } if( libcdata_tree_node_free( sub_node, (int (*)(intptr_t **, libcerror_error_t **)) &libcdata_btree_values_list_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub node.", function ); return( -1 ); } return( 1 ); } /* Removes a value from the tree node * The tree node must be the most upper node (leaf) in the first call * Returns 1 if successful, 0 if no such value or -1 on error */ int libcdata_btree_node_remove_value( libcdata_tree_node_t *node, intptr_t *value, intptr_t *replacement_value, libcerror_error_t **error ) { libcdata_list_t *sub_node_values_list = NULL; libcdata_list_t *values_list = NULL; libcdata_list_element_t *values_list_element = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_btree_node_remove_value"; int number_of_sub_nodes = 0; int number_of_values_list_elements = 0; int result = 0; int sub_node_number_of_sub_nodes = 0; int sub_node_number_of_values_list_elements = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } result = libcdata_btree_node_get_sub_node_by_value( node, value, NULL, &sub_node, &values_list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node by value.", function ); return( -1 ); } if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } if( libcdata_list_get_number_of_elements( values_list, &number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values list elements.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( node, &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 sub nodes.", function ); return( -1 ); } if( sub_node != NULL ) { if( libcdata_tree_node_get_value( sub_node, (intptr_t **) &sub_node_values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node values list.", function ); return( -1 ); } if( libcdata_list_get_number_of_elements( sub_node_values_list, &sub_node_number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node number of values list elements.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( sub_node, &sub_node_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 sub nodes.", function ); return( -1 ); } /* If the sub node is empty remove it */ if( ( sub_node_number_of_sub_nodes == 0 ) && ( sub_node_number_of_values_list_elements == 0 ) ) { if( libcdata_btree_node_remove_sub_node( node, &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove remaining sub node from node.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( node, &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 sub nodes.", function ); return( -1 ); } if( values_list_element == NULL ) { if( libcdata_list_get_last_element( values_list, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last values list element.", function ); return( -1 ); } if( libcdata_list_element_get_value( values_list_element, &replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from last values list element.", function ); return( -1 ); } } if( values_list_element != NULL ) { if( libcdata_btree_values_list_remove_element( values_list, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove element from values list.", function ); return( -1 ); } if( libcdata_list_get_number_of_elements( values_list, &number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values list elements.", function ); return( -1 ); } } } } if( number_of_sub_nodes != 0 ) { if( ( number_of_values_list_elements + 1 ) != number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of values list elements value out of bounds.", function ); return( -1 ); } /* If one sub node remains flatten the node */ if( number_of_sub_nodes == 1 ) { if( libcdata_btree_node_flatten_node( &node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to flatten node.", function ); return( -1 ); } if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); return( -1 ); } } /* If the sub node contains more than one values list elements * use the replacement value determined in the sub node */ else if( values_list_element != NULL ) { if( replacement_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid replacement value.", function ); return( -1 ); } if( libcdata_list_element_set_value( values_list_element, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in values list element.", function ); return( -1 ); } } } /* In a leaf node remove the values list element from the list */ else if( values_list_element != NULL ) { if( libcdata_btree_values_list_replace_element_with_previous( values_list, &values_list_element, &replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to replace values list element with previous.", function ); return( -1 ); } } if( libcdata_tree_node_get_parent_node( node, &parent_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve parent node.", function ); return( -1 ); } if( parent_node != NULL ) { if( libcdata_btree_node_remove_value( parent_node, value, replacement_value, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove value from parent node.", function ); return( -1 ); } } return( result ); } /* Splits the node * Returns 1 if successful or -1 on error */ int libcdata_btree_node_split( libcdata_tree_node_t *node, libcerror_error_t **error ) { libcdata_list_t *split_values_list = NULL; libcdata_list_t *values_list = NULL; libcdata_list_element_t *values_list_element = NULL; libcdata_tree_node_t *sub_node = NULL; intptr_t *values_list_value = NULL; static char *function = "libcdata_btree_node_split"; int number_of_split_values_list_elements = 0; int number_of_sub_nodes = 0; int number_of_values_list_elements = 0; int split_values_list_element_index = 0; int sub_node_index = 0; int values_list_element_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( libcdata_tree_node_get_number_of_sub_nodes( node, &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 sub nodes.", function ); goto on_error; } if( number_of_sub_nodes != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: cannot split node with sub nodes.", function ); goto on_error; } if( libcdata_tree_node_get_value( node, (intptr_t **) &values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values list.", function ); goto on_error; } /* Split to have about 25 values per sub node */ number_of_split_values_list_elements = 25; if( libcdata_list_initialize( &split_values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create split values list.", function ); goto on_error; } if( libcdata_tree_node_set_value( node, (intptr_t *) split_values_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split values list.", function ); goto on_error; } if( libcdata_list_get_number_of_elements( values_list, &number_of_values_list_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values list elements.", function ); goto on_error; } if( libcdata_list_get_first_element( values_list, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first values list element.", function ); goto on_error; } for( values_list_element_index = 0; values_list_element_index < number_of_values_list_elements; values_list_element_index++ ) { if( libcdata_list_element_get_value( values_list_element, &values_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from values list element: %d.", function, values_list_element_index ); goto on_error; } if( values_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid values list element: %d - missing value.", function, values_list_element_index ); goto on_error; } if( sub_node == NULL ) { if( libcdata_tree_node_initialize( &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node: %d.", function, sub_node_index ); goto on_error; } } if( libcdata_btree_node_append_value( sub_node, values_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value: %d to sub node: %d.", function, values_list_element_index, sub_node_index ); goto on_error; } if( values_list_element_index >= split_values_list_element_index ) { if( ( values_list_element_index + 1 ) < number_of_values_list_elements ) { if( libcdata_list_append_value( split_values_list, values_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value: %d to sub nodes values list.", function, values_list_element_index ); goto on_error; } } split_values_list_element_index += number_of_split_values_list_elements; if( libcdata_tree_node_append_node( node, 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 node.", function, sub_node_index ); goto on_error; } sub_node = NULL; sub_node_index++; } if( libcdata_list_element_get_next_element( values_list_element, &values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next element from values list element: %d.", function, values_list_element_index ); goto on_error; } } if( sub_node != NULL ) { if( libcdata_tree_node_append_node( node, 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 node.", function, sub_node_index ); goto on_error; } sub_node = NULL; sub_node_index++; } split_values_list = NULL; if( libcdata_list_free( &values_list, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free values list.", function ); goto on_error; } return( 1 ); on_error: if( sub_node != NULL ) { libcdata_tree_node_remove_node( node, sub_node, NULL ); libcdata_tree_node_free( &sub_node, NULL, NULL ); } if( split_values_list != NULL ) { libcdata_tree_node_empty( node, NULL, NULL ); libcdata_tree_node_set_value( node, (intptr_t *) values_list, NULL ); libcdata_list_free( &split_values_list, NULL, NULL ); } return( -1 ); } libesedb-20240420/libcdata/libcdata_tree_node.c0000644000175000017500000030422514610746222022070 0ustar00lordyestalordyesta/* * Tree functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_definitions.h" #include "libcdata_libcerror.h" #include "libcdata_libcthreads.h" #include "libcdata_list.h" #include "libcdata_tree_node.h" #include "libcdata_types.h" /* Creates a tree node * Make sure the value node is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_tree_node_initialize( libcdata_tree_node_t **node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_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 ); } internal_node = memory_allocate_structure( libcdata_internal_tree_node_t ); if( internal_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_node, 0, sizeof( libcdata_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_node ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_initialize( &( internal_node->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *node = (libcdata_tree_node_t *) internal_node; return( 1 ); on_error: if( internal_node != NULL ) { memory_free( internal_node ); } 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 libcdata_tree_node_free( libcdata_tree_node_t **node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_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_node = (libcdata_internal_tree_node_t *) *node; if( ( internal_node->parent_node != NULL ) || ( internal_node->previous_node != NULL ) || ( internal_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 ); } *node = NULL; if( libcdata_tree_node_empty( (libcdata_tree_node_t *) internal_node, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty node.", function ); result = -1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_free( &( internal_node->read_write_lock ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read/write lock.", function ); result = -1; } #endif if( internal_node->value != NULL ) { if( value_free_function != NULL ) { if( value_free_function( &( internal_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; } internal_node->value = NULL; } } memory_free( internal_node ); } return( result ); } /* Empties a tree node and frees its sub nodes * Uses the value_free_function to free the value of the sub nodes * Returns 1 if successful or -1 on error */ int libcdata_tree_node_empty( libcdata_tree_node_t *tree_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *next_node = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *previous_node = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_tree_node_empty"; int number_of_sub_nodes = 0; int result = 1; int sub_node_index = 0; if( tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) tree_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif number_of_sub_nodes = internal_node->number_of_sub_nodes; sub_node = internal_node->first_sub_node; for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libcdata_tree_node_get_nodes( sub_node, &parent_node, &previous_node, &next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of sub node: %d.", function, sub_node_index ); goto on_error; } if( previous_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid sub node: %d - previous node is set.", function, sub_node_index ); goto on_error; } internal_node->first_sub_node = next_node; if( internal_node->last_sub_node == sub_node ) { internal_node->last_sub_node = next_node; } internal_node->number_of_sub_nodes -= 1; if( next_node != NULL ) { if( libcdata_tree_node_set_previous_node( next_node, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of sub node: %d.", function, sub_node_index + 1 ); goto on_error; } } if( libcdata_tree_node_set_nodes( sub_node, NULL, NULL, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set nodes of sub node: %d.", function, sub_node_index ); goto on_error; } if( libcdata_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_index ); result = -1; } sub_node = next_node; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, NULL ); #endif return( -1 ); } /* 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 libcdata_tree_node_clone( libcdata_tree_node_t **destination_node, libcdata_tree_node_t *source_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_destination_node = NULL; libcdata_internal_tree_node_t *internal_source_node = NULL; libcdata_tree_node_t *destination_sub_node = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_tree_node_clone"; int sub_node_index = 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 ); } internal_source_node = (libcdata_internal_tree_node_t *) source_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_source_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( libcdata_tree_node_initialize( (libcdata_tree_node_t **) &internal_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 ); goto on_error; } if( internal_destination_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination tree node.", function ); goto on_error; } if( value_clone_function( &( internal_destination_node->value ), internal_source_node->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination tree node value.", function ); goto on_error; } /* Clone the sub nodes */ sub_node = internal_source_node->first_sub_node; for( sub_node_index = 0; sub_node_index < internal_source_node->number_of_sub_nodes; sub_node_index++ ) { if( 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_index ); goto on_error; } if( libcdata_tree_node_clone( &destination_sub_node, 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 create destination sub node: %d.", function, sub_node_index ); goto on_error; } if( libcdata_internal_tree_node_append_node( internal_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_index ); goto on_error; } destination_sub_node = NULL; if( libcdata_tree_node_get_next_node( sub_node, &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of sub node: %d.", function, sub_node_index ); goto on_error; } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_source_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); libcdata_tree_node_free( &destination_sub_node, value_free_function, NULL ); return( -1 ); } #endif *destination_node = (libcdata_tree_node_t *) internal_destination_node; return( 1 ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_source_node->read_write_lock, NULL ); #endif if( destination_sub_node != NULL ) { libcdata_tree_node_free( &destination_sub_node, value_free_function, NULL ); } if( internal_destination_node != NULL ) { libcdata_tree_node_free( (libcdata_tree_node_t **) &internal_destination_node, value_free_function, NULL ); } return( -1 ); } /* Retrieves the value from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_value( libcdata_tree_node_t *node, intptr_t **value, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_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 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *value = internal_node->value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the value in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_value"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) intptr_t *backup_value = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_value = internal_node->value; #endif internal_node->value = value; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->value = backup_value; return( -1 ); #endif } /* Retrieves the parent node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_parent_node( libcdata_tree_node_t *node, libcdata_tree_node_t **parent_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_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_node = (libcdata_internal_tree_node_t *) 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *parent_node = internal_node->parent_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the parent node in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_parent_node( libcdata_tree_node_t *node, libcdata_tree_node_t *parent_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_parent_node"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_parent_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_parent_node = internal_node->parent_node; #endif internal_node->parent_node = parent_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->parent_node = backup_parent_node; return( -1 ); #endif } /* Retrieves the previous node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_previous_node( libcdata_tree_node_t *node, libcdata_tree_node_t **previous_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_previous_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( previous_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid previous node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *previous_node = internal_node->previous_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the previous node in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_previous_node( libcdata_tree_node_t *node, libcdata_tree_node_t *previous_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_previous_node"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_previous_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_previous_node = internal_node->previous_node; #endif internal_node->previous_node = previous_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->previous_node = backup_previous_node; return( -1 ); #endif } /* Retrieves the next node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_next_node( libcdata_tree_node_t *node, libcdata_tree_node_t **next_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_next_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( next_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid next node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *next_node = internal_node->next_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the next node in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_next_node( libcdata_tree_node_t *node, libcdata_tree_node_t *next_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_next_node"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_next_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_next_node = internal_node->next_node ; #endif internal_node->next_node = next_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->next_node = backup_next_node; return( -1 ); #endif } /* Retrieves the nodes from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t **parent_node, libcdata_tree_node_t **previous_node, libcdata_tree_node_t **next_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) 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( previous_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid previous node.", function ); return( -1 ); } if( next_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid next node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *parent_node = internal_node->parent_node; *previous_node = internal_node->previous_node; *next_node = internal_node->next_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the nodes in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t *parent_node, libcdata_tree_node_t *previous_node, libcdata_tree_node_t *next_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_nodes"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_next_node = NULL; libcdata_tree_node_t *backup_parent_node = NULL; libcdata_tree_node_t *backup_previous_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_parent_node = internal_node->parent_node; backup_previous_node = internal_node->previous_node; backup_next_node = internal_node->next_node; #endif internal_node->parent_node = parent_node; internal_node->previous_node = previous_node; internal_node->next_node = next_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->parent_node = backup_parent_node; internal_node->previous_node = backup_previous_node; internal_node->next_node = backup_next_node; return( -1 ); #endif } /* Retrieves the first sub node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_first_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **first_sub_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_first_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_node = (libcdata_internal_tree_node_t *) node; if( first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first sub node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *first_sub_node = internal_node->first_sub_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the first sub node in the tree node * Returns 1 if successful or -1 on error */ int libcdata_internal_tree_node_set_first_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *first_sub_node, libcerror_error_t **error ) { libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_previous_node = NULL; static char *function = "libcdata_internal_tree_node_set_first_sub_node"; if( internal_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( first_sub_node != NULL ) { if( libcdata_tree_node_get_previous_node( first_sub_node, &backup_previous_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous node of sub node.", function ); return( -1 ); } } backup_first_sub_node = internal_node->first_sub_node; if( first_sub_node != NULL ) { if( libcdata_tree_node_set_previous_node( first_sub_node, internal_node->first_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of sub node.", function ); goto on_error; } } if( internal_node->first_sub_node != NULL ) { if( libcdata_tree_node_set_next_node( internal_node->first_sub_node, first_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of first sub node.", function ); goto on_error; } } internal_node->first_sub_node = first_sub_node; return( 1 ); on_error: if( first_sub_node != NULL ) { libcdata_tree_node_set_previous_node( first_sub_node, backup_previous_node, NULL ); } if( backup_first_sub_node != NULL ) { libcdata_tree_node_set_next_node( backup_first_sub_node, NULL, NULL ); } internal_node->first_sub_node = backup_first_sub_node; return( -1 ); } /* Retrieves the last sub node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_last_sub_node( libcdata_tree_node_t *node, libcdata_tree_node_t **last_sub_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_get_last_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_node = (libcdata_internal_tree_node_t *) node; if( last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid last sub node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *last_sub_node = internal_node->last_sub_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the last sub node in the tree node * Returns 1 if successful or -1 on error */ int libcdata_internal_tree_node_set_last_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *last_sub_node, libcerror_error_t **error ) { libcdata_tree_node_t *backup_last_sub_node = NULL; libcdata_tree_node_t *backup_previous_node = NULL; static char *function = "libcdata_internal_tree_node_set_last_sub_node"; if( internal_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( last_sub_node != NULL ) { if( libcdata_tree_node_get_previous_node( last_sub_node, &backup_previous_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous node of sub node.", function ); return( -1 ); } } backup_last_sub_node = internal_node->last_sub_node; if( last_sub_node != NULL ) { if( libcdata_tree_node_set_previous_node( last_sub_node, internal_node->last_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of sub node.", function ); goto on_error; } } if( internal_node->last_sub_node != NULL ) { if( libcdata_tree_node_set_next_node( internal_node->last_sub_node, last_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of last sub node.", function ); goto on_error; } } internal_node->last_sub_node = last_sub_node; return( 1 ); on_error: if( last_sub_node != NULL ) { libcdata_tree_node_set_previous_node( last_sub_node, backup_previous_node, NULL ); } if( backup_last_sub_node != NULL ) { libcdata_tree_node_set_next_node( backup_last_sub_node, NULL, NULL ); } internal_node->last_sub_node = backup_last_sub_node; return( -1 ); } /* Retrieves the sub nodes from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_sub_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t **first_sub_node, libcdata_tree_node_t **last_sub_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_sub_get_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first sub node.", function ); return( -1 ); } if( last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid last sub node.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *first_sub_node = internal_node->first_sub_node; *last_sub_node = internal_node->last_sub_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Sets the sub nodes in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_set_sub_nodes( libcdata_tree_node_t *node, libcdata_tree_node_t *first_sub_node, libcdata_tree_node_t *last_sub_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_tree_node_set_sub_nodes"; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_last_sub_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_sub_node = internal_node->first_sub_node; backup_last_sub_node = internal_node->last_sub_node; #endif internal_node->first_sub_node = first_sub_node; internal_node->last_sub_node = last_sub_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: internal_node->first_sub_node = backup_first_sub_node; internal_node->last_sub_node = backup_last_sub_node; return( -1 ); #endif } /* Appends a sub tree node to the node * Returns 1 if successful or -1 on error */ int libcdata_internal_tree_node_append_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *node_to_append, libcerror_error_t **error ) { libcdata_tree_node_t *to_append_next_node = NULL; libcdata_tree_node_t *to_append_parent_node = NULL; libcdata_tree_node_t *to_append_previous_node = NULL; static char *function = "libcdata_internal_tree_node_append_node"; if( internal_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( node_to_append == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node to append.", function ); return( -1 ); } if( libcdata_tree_node_get_nodes( node_to_append, &to_append_parent_node, &to_append_previous_node, &to_append_next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of node to append.", function ); return( -1 ); } if( ( to_append_parent_node != NULL ) || ( to_append_previous_node != NULL ) || ( to_append_next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node to append - node is already part of a tree.", function ); return( -1 ); } if( internal_node->number_of_sub_nodes == 0 ) { if( internal_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( internal_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 ); } internal_node->first_sub_node = node_to_append; internal_node->last_sub_node = node_to_append; } else { if( internal_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( internal_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( libcdata_tree_node_set_next_node( internal_node->last_sub_node, node_to_append, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of last sub node.", function ); return( -1 ); } if( libcdata_tree_node_set_previous_node( node_to_append, internal_node->last_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of node to append.", function ); return( -1 ); } internal_node->last_sub_node = node_to_append; } if( libcdata_tree_node_set_parent_node( node_to_append, (libcdata_tree_node_t *) internal_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node of node to append.", function ); return( -1 ); } internal_node->number_of_sub_nodes += 1; return( 1 ); } /* Appends a tree node to the node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_append_node( libcdata_tree_node_t *node, libcdata_tree_node_t *node_to_append, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *to_append_next_node = NULL; libcdata_tree_node_t *to_append_parent_node = NULL; libcdata_tree_node_t *to_append_previous_node = NULL; static char *function = "libcdata_tree_node_append_node"; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_last_sub_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( internal_node->number_of_sub_nodes == 0 ) { if( internal_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( internal_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } } else { if( internal_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( internal_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( libcdata_tree_node_get_nodes( node_to_append, &to_append_parent_node, &to_append_previous_node, &to_append_next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of node to append.", function ); return( -1 ); } if( ( to_append_parent_node != NULL ) || ( to_append_previous_node != NULL ) || ( to_append_next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node to append - node is already part of a tree.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_sub_node = internal_node->first_sub_node; backup_last_sub_node = internal_node->last_sub_node; #endif result = libcdata_tree_node_set_parent_node( node_to_append, node, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node of node to append.", function ); result = -1; } if( result == 1 ) { result = libcdata_tree_node_set_previous_node( node_to_append, internal_node->last_sub_node, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of node to append.", function ); libcdata_tree_node_set_parent_node( node_to_append, NULL, NULL ); result = -1; } } if( result == 1 ) { if( internal_node->last_sub_node != NULL ) { result = libcdata_tree_node_set_next_node( internal_node->last_sub_node, node_to_append, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of last sub node.", function ); libcdata_tree_node_set_parent_node( node_to_append, NULL, NULL ); libcdata_tree_node_set_previous_node( node_to_append, NULL, NULL ); result = -1; } } } if( result == 1 ) { if( internal_node->first_sub_node == NULL ) { internal_node->first_sub_node = node_to_append; } internal_node->last_sub_node = node_to_append; internal_node->number_of_sub_nodes += 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: libcdata_tree_node_set_parent_node( node_to_append, NULL, NULL ); libcdata_tree_node_set_previous_node( node_to_append, NULL, NULL ); internal_node->first_sub_node = backup_first_sub_node; internal_node->last_sub_node = backup_last_sub_node; internal_node->number_of_sub_nodes -= 1; return( -1 ); #endif } /* Appends a value to the node * Creates a new sub tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_append_value( libcdata_tree_node_t *node, intptr_t *value, libcerror_error_t **error ) { libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_tree_node_append_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( libcdata_tree_node_initialize( &sub_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( libcdata_tree_node_set_value( sub_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in sub node.", function ); goto on_error; } if( libcdata_tree_node_append_node( node, sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node to node.", function ); goto on_error; } return( 1 ); on_error: if( sub_node != NULL ) { libcdata_tree_node_free( &sub_node, NULL, NULL ); } return( -1 ); } /* Retrieves the node which the sub node should be inserted before * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * On return sub_node will be set to NULL if the sub node should be inserted at the end of the list. * * Returns 1 if successful, 0 if a sub node containing the value already exists or -1 on error */ int libcdata_internal_tree_node_insert_node_find_sub_node( libcdata_internal_tree_node_t *internal_node, intptr_t *value_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, int *sub_node_index, libcdata_tree_node_t **sub_node, libcerror_error_t **error ) { libcdata_tree_node_t *sub_tree_node = NULL; intptr_t *sub_node_value = NULL; static char *function = "libcdata_internal_tree_node_insert_node_find_sub_node"; int compare_result = 0; int result = 1; int safe_sub_node_index = 0; if( internal_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", 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 & ~( LIBCDATA_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( 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( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node.", function ); return( -1 ); } sub_tree_node = internal_node->first_sub_node; for( safe_sub_node_index = 0; safe_sub_node_index < internal_node->number_of_sub_nodes; safe_sub_node_index++ ) { if( libcdata_tree_node_get_value( sub_tree_node, &sub_node_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of sub node: %d.", function, safe_sub_node_index ); return( -1 ); } compare_result = value_compare_function( value_to_insert, sub_node_value, error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare sub node: %d.", function, safe_sub_node_index ); return( -1 ); } else if( compare_result == LIBCDATA_COMPARE_EQUAL ) { if( ( insert_flags & LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { result = 0; break; } } else if( compare_result == LIBCDATA_COMPARE_LESS ) { break; } else if( compare_result != LIBCDATA_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 ); } if( libcdata_tree_node_get_next_node( sub_tree_node, &sub_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of sub node: %d.", function, safe_sub_node_index ); return( -1 ); } } if( ( compare_result == LIBCDATA_COMPARE_EQUAL ) || ( compare_result == LIBCDATA_COMPARE_LESS ) ) { *sub_node_index = safe_sub_node_index; *sub_node = sub_tree_node; } else { *sub_node_index = internal_node->number_of_sub_nodes; *sub_node = NULL; } return( result ); } /* Inserts the node before the sub node * If sub_node is NULL the node is inserted before or as the first sub node in the list * Returns 1 if successful, or -1 on error */ int libcdata_internal_tree_node_insert_node_before_sub_node( libcdata_internal_tree_node_t *internal_node, libcdata_tree_node_t *sub_node, libcdata_tree_node_t *node_to_insert, libcerror_error_t **error ) { libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_last_sub_node = NULL; libcdata_tree_node_t *previous_node = NULL; static char *function = "libcdata_internal_tree_node_insert_node_before_sub_node"; if( internal_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( node_to_insert == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node to insert.", function ); return( -1 ); } backup_first_sub_node = internal_node->first_sub_node; backup_last_sub_node = internal_node->last_sub_node; if( sub_node != NULL ) { if( libcdata_tree_node_get_previous_node( sub_node, &previous_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous node from sub node.", function ); return( -1 ); } } if( internal_node->number_of_sub_nodes == 0 ) { internal_node->first_sub_node = node_to_insert; internal_node->last_sub_node = node_to_insert; } else if( sub_node == NULL ) { if( libcdata_internal_tree_node_set_last_sub_node( internal_node, node_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set last sub node.", function ); goto on_error; } } else { if( libcdata_tree_node_set_nodes( node_to_insert, (libcdata_tree_node_t *) internal_node, previous_node, sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent, previous and next node of node to insert.", function ); goto on_error; } if( internal_node->first_sub_node == sub_node ) { internal_node->first_sub_node = node_to_insert; } else { if( libcdata_tree_node_set_next_node( previous_node, node_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of previous node.", function ); goto on_error; } } if( libcdata_tree_node_set_previous_node( sub_node, node_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of sub node.", function ); goto on_error; } } if( libcdata_tree_node_set_parent_node( node_to_insert, (libcdata_tree_node_t *) internal_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node of node to insert.", function ); goto on_error; } internal_node->number_of_sub_nodes += 1; return( 1 ); on_error: if( node_to_insert != NULL ) { libcdata_tree_node_set_nodes( node_to_insert, NULL, NULL, NULL, NULL ); } if( previous_node != NULL ) { libcdata_tree_node_set_next_node( previous_node, sub_node, NULL ); } if( sub_node != NULL ) { libcdata_tree_node_set_previous_node( sub_node, previous_node, NULL ); } internal_node->first_sub_node = backup_first_sub_node; internal_node->last_sub_node = backup_last_sub_node; return( -1 ); } /* Inserts a sub node in the node * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libcdata_tree_node_insert_node( libcdata_tree_node_t *node, libcdata_tree_node_t *node_to_insert, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *next_node = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *previous_node = NULL; libcdata_tree_node_t *sub_node = NULL; intptr_t *value_to_insert = NULL; static char *function = "libcdata_tree_node_insert_node"; int result = 1; int sub_node_index = 0; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_last_sub_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( internal_node->number_of_sub_nodes == 0 ) { if( internal_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( internal_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } } else { if( internal_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( internal_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( node_to_insert == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node to insert.", 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 & ~( LIBCDATA_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( libcdata_tree_node_get_nodes( node_to_insert, &parent_node, &previous_node, &next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of node to insert.", function ); return( -1 ); } if( ( parent_node != NULL ) || ( previous_node != NULL ) || ( next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node to insert - node is already part of a tree.", function ); return( -1 ); } if( libcdata_tree_node_get_value( node_to_insert, &value_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from node to insert.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_sub_node = internal_node->first_sub_node; backup_last_sub_node = internal_node->last_sub_node; #endif result = libcdata_internal_tree_node_insert_node_find_sub_node( internal_node, value_to_insert, value_compare_function, insert_flags, &sub_node_index, &sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find sub node in tree node.", function ); result = -1; } else if( result == 1 ) { if( sub_node != NULL ) { if( libcdata_tree_node_get_nodes( sub_node, &parent_node, &previous_node, &next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of sub node: %d.", function, sub_node_index ); result = -1; } } if( result == 1 ) { if( libcdata_internal_tree_node_insert_node_before_sub_node( internal_node, sub_node, node_to_insert, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert node before tree sub node.", function ); result = -1; } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { if( node_to_insert != NULL ) { libcdata_tree_node_set_nodes( node_to_insert, NULL, NULL, NULL, NULL ); } if( previous_node != NULL ) { libcdata_tree_node_set_next_node( previous_node, sub_node, NULL ); } if( sub_node != NULL ) { libcdata_tree_node_set_previous_node( sub_node, previous_node, NULL ); } internal_node->first_sub_node = backup_first_sub_node; internal_node->last_sub_node = backup_last_sub_node; internal_node->number_of_sub_nodes -= 1; } return( -1 ); #endif } /* Inserts a value in the node * * Creates a new sub tree node * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBCDATA_COMPARE_LESS, * LIBCDATA_COMPARE_EQUAL, LIBCDATA_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 LIBCDATA_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libcdata_tree_node_insert_value( libcdata_tree_node_t *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 ) { libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_tree_node_insert_value"; int result = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( libcdata_tree_node_initialize( &sub_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( libcdata_tree_node_set_value( sub_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in sub node.", function ); goto on_error; } result = libcdata_tree_node_insert_node( node, sub_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( libcdata_tree_node_free( &sub_node, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub node.", function ); goto on_error; } } return( result ); on_error: if( sub_node != NULL ) { libcdata_tree_node_free( &sub_node, NULL, NULL ); } return( -1 ); } /* Replaces a tree node with another tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_replace_node( libcdata_tree_node_t *node, libcdata_tree_node_t *replacement_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *backup_parent_first_sub_node = NULL; libcdata_tree_node_t *backup_parent_last_sub_node = NULL; libcdata_tree_node_t *next_node = NULL; libcdata_tree_node_t *parent_first_sub_node = NULL; libcdata_tree_node_t *parent_last_sub_node = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *previous_node = NULL; libcdata_tree_node_t *replacement_next_node = NULL; libcdata_tree_node_t *replacement_parent_node = NULL; libcdata_tree_node_t *replacement_previous_node = NULL; static char *function = "libcdata_tree_node_replace_node"; 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 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( replacement_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid replacement node.", function ); return( -1 ); } if( replacement_node == node ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: cannot replace node with itself.", function ); return( -1 ); } if( libcdata_tree_node_get_nodes( replacement_node, &replacement_parent_node, &replacement_previous_node, &replacement_next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of replacement node.", function ); return( -1 ); } if( ( replacement_parent_node != NULL ) || ( replacement_previous_node != NULL ) || ( replacement_next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid replacement node - already part of a tree.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } #endif parent_node = internal_node->parent_node; previous_node = internal_node->previous_node; next_node = internal_node->next_node; if( parent_node != NULL ) { if( libcdata_tree_node_get_sub_nodes( parent_node, &parent_first_sub_node, &parent_last_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub nodes of parent node.", function ); result = -1; } } if( result == 1 ) { if( libcdata_tree_node_set_nodes( replacement_node, parent_node, previous_node, next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set nodes of replacement node.", function ); result = -1; } } if( result == 1 ) { if( parent_node != NULL ) { backup_parent_first_sub_node = parent_first_sub_node; backup_parent_last_sub_node = parent_last_sub_node; if( parent_first_sub_node == node ) { parent_first_sub_node = replacement_node; } if( parent_last_sub_node == node ) { parent_last_sub_node = replacement_node; } if( libcdata_tree_node_set_sub_nodes( parent_node, parent_first_sub_node, parent_last_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub nodes of parent node.", function ); libcdata_tree_node_set_nodes( replacement_node, NULL, NULL, NULL, NULL ); result = -1; } } } if( result == 1 ) { if( previous_node != NULL ) { if( libcdata_tree_node_set_next_node( previous_node, replacement_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of previous node.", function ); libcdata_tree_node_set_nodes( replacement_node, NULL, NULL, NULL, NULL ); if( parent_node != NULL ) { libcdata_tree_node_set_sub_nodes( parent_node, backup_parent_first_sub_node, backup_parent_last_sub_node, NULL ); } result = -1; } } } if( result == 1 ) { if( next_node != NULL ) { if( libcdata_tree_node_set_previous_node( next_node, replacement_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of next node.", function ); libcdata_tree_node_set_nodes( replacement_node, NULL, NULL, NULL, NULL ); if( parent_node != NULL ) { libcdata_tree_node_set_sub_nodes( parent_node, backup_parent_first_sub_node, backup_parent_last_sub_node, NULL ); } if( previous_node != NULL ) { libcdata_tree_node_set_next_node( previous_node, node, NULL ); } result = -1; } } } if( result == 1 ) { internal_node->parent_node = NULL; internal_node->previous_node = NULL; internal_node->next_node = NULL; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( result ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_tree_node_set_nodes( replacement_node, NULL, NULL, NULL, NULL ); if( parent_node != NULL ) { libcdata_tree_node_set_sub_nodes( parent_node, backup_parent_first_sub_node, backup_parent_last_sub_node, NULL ); } if( previous_node != NULL ) { libcdata_tree_node_set_next_node( previous_node, node, NULL ); } if( next_node != NULL ) { libcdata_tree_node_set_previous_node( next_node, node, NULL ); } internal_node->parent_node = parent_node; internal_node->previous_node = previous_node; internal_node->next_node = next_node; } return( -1 ); #endif } /* Removes a sub tree node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_remove_node( libcdata_tree_node_t *node, libcdata_tree_node_t *sub_node_to_remove, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *next_node = NULL; libcdata_tree_node_t *parent_node = NULL; libcdata_tree_node_t *previous_node = NULL; static char *function = "libcdata_tree_node_remove_node"; int result = 1; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcdata_tree_node_t *backup_first_sub_node = NULL; libcdata_tree_node_t *backup_last_sub_node = NULL; #endif if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( internal_node->number_of_sub_nodes == 0 ) { if( internal_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( internal_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } } else { if( internal_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( internal_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( sub_node_to_remove == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node to remove.", function ); return( -1 ); } if( internal_node->number_of_sub_nodes == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing number of sub nodes.", function ); return( -1 ); } if( internal_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing first sub node.", function ); return( -1 ); } if( internal_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing last sub node.", function ); return( -1 ); } if( libcdata_tree_node_get_nodes( sub_node_to_remove, &parent_node, &previous_node, &next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve nodes of node to remove.", function ); return( -1 ); } if( parent_node != node ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node to remove - parent node mismatch.", function ); return( -1 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for writing.", function ); return( -1 ); } backup_first_sub_node = internal_node->first_sub_node; backup_last_sub_node = internal_node->last_sub_node; #endif result = libcdata_tree_node_set_nodes( sub_node_to_remove, NULL, NULL, NULL, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set nodes of node to remove.", function ); result = -1; } if( result == 1 ) { if( next_node != NULL ) { if( libcdata_tree_node_set_previous_node( next_node, previous_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set previous node of next node.", function ); libcdata_tree_node_set_nodes( sub_node_to_remove, parent_node, previous_node, next_node, NULL ); result = -1; } } } if( result == 1 ) { if( previous_node != NULL ) { if( libcdata_tree_node_set_next_node( previous_node, next_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set next node of previous node.", function ); libcdata_tree_node_set_nodes( sub_node_to_remove, parent_node, previous_node, next_node, NULL ); if( next_node != NULL ) { libcdata_tree_node_set_previous_node( next_node, sub_node_to_remove, NULL ); } result = -1; } } } if( result == 1 ) { if( internal_node->first_sub_node == sub_node_to_remove ) { internal_node->first_sub_node = next_node; } if( internal_node->last_sub_node == sub_node_to_remove ) { internal_node->last_sub_node = previous_node; } internal_node->number_of_sub_nodes -= 1; } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_write( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for writing.", function ); goto on_error; } #endif return( 1 ); #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) on_error: if( result == 1 ) { libcdata_tree_node_set_nodes( sub_node_to_remove, parent_node, previous_node, next_node, NULL ); if( next_node != NULL ) { libcdata_tree_node_set_previous_node( next_node, sub_node_to_remove, NULL ); } if( previous_node != NULL ) { libcdata_tree_node_set_next_node( previous_node, sub_node_to_remove, NULL ); } internal_node->first_sub_node = backup_first_sub_node; internal_node->last_sub_node = backup_last_sub_node; internal_node->number_of_sub_nodes += 1; } return( -1 ); #endif } /* Retrieves the number of sub nodes in the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_number_of_sub_nodes( libcdata_tree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; static char *function = "libcdata_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_node = (libcdata_internal_tree_node_t *) node; 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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif *number_of_sub_nodes = internal_node->number_of_sub_nodes; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); } /* Retrieves a specific sub node from the tree node * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_sub_node_by_index( libcdata_tree_node_t *node, int sub_node_index, libcdata_tree_node_t **sub_node, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *safe_sub_node = NULL; static char *function = "libcdata_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 ); } internal_node = (libcdata_internal_tree_node_t *) node; if( ( sub_node_index < 0 ) || ( sub_node_index >= internal_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 ); } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif /* Check if the sub nodes should be searched front to back * or back to front */ if( sub_node_index < ( internal_node->number_of_sub_nodes / 2 ) ) { safe_sub_node = internal_node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < internal_node->number_of_sub_nodes; sub_node_iterator++ ) { if( sub_node_iterator == sub_node_index ) { result = 1; break; } if( libcdata_tree_node_get_next_node( safe_sub_node, &safe_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of sub node: %d.", function, sub_node_iterator ); goto on_error; } } } else { safe_sub_node = internal_node->last_sub_node; for( sub_node_iterator = ( internal_node->number_of_sub_nodes - 1 ); sub_node_iterator >= 0; sub_node_iterator-- ) { if( sub_node_iterator == sub_node_index ) { result = 1; break; } if( libcdata_tree_node_get_previous_node( safe_sub_node, &safe_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous node of sub node: %d.", function, sub_node_iterator ); goto on_error; } } } *sub_node = safe_sub_node; #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( result ); on_error: #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, NULL ); #endif return( -1 ); } /* Retrieves a list of all the leaf nodes * Returns 1 if successful or -1 on error */ int libcdata_tree_node_get_leaf_node_list( libcdata_tree_node_t *node, libcdata_list_t **leaf_node_list, libcerror_error_t **error ) { libcdata_internal_tree_node_t *internal_node = NULL; libcdata_tree_node_t *sub_node = NULL; static char *function = "libcdata_tree_node_get_leaf_node_list"; int leaf_node_list_created_in_node = 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_node = (libcdata_internal_tree_node_t *) node; 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 defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_grab_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab read/write lock for reading.", function ); return( -1 ); } #endif if( *leaf_node_list == NULL ) { if( libcdata_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 ); goto on_error; } leaf_node_list_created_in_node = 1; } /* Traverse the sub nodes */ if( internal_node->number_of_sub_nodes == 0 ) { if( internal_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing value.", function ); goto on_error; } if( libcdata_list_append_value( *leaf_node_list, internal_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 ); goto on_error; } } else { sub_node = internal_node->first_sub_node; for( sub_node_index = 0; sub_node_index < internal_node->number_of_sub_nodes; sub_node_index++ ) { 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_index ); goto on_error; } if( libcdata_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_index ); goto on_error; } if( libcdata_tree_node_get_next_node( sub_node, &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve next node of sub node: %d.", function, sub_node_index ); goto on_error; } } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) if( libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release read/write lock for reading.", function ); return( -1 ); } #endif return( 1 ); on_error: if( leaf_node_list_created_in_node != 0 ) { if( *leaf_node_list == NULL ) { libcdata_list_initialize( leaf_node_list, NULL ); } } #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBCDATA ) libcthreads_read_write_lock_release_for_read( internal_node->read_write_lock, NULL ); #endif return( -1 ); } libesedb-20240420/libcdata/libcdata_support.h0000644000175000017500000000231614610746222021641 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCDATA_SUPPORT_H ) #define _LIBCDATA_SUPPORT_H #include #include #include "libcdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCDATA ) LIBCDATA_EXTERN \ const char *libcdata_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCDATA_SUPPORT_H ) */ libesedb-20240420/libcdata/Makefile.in0000644000175000017500000010213714610746265020207 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = libcdata ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcdata_la_LIBADD = am__libcdata_la_SOURCES_DIST = libcdata_array.c libcdata_array.h \ libcdata_btree.c libcdata_btree.h libcdata_btree_node.c \ libcdata_btree_node.h libcdata_btree_values_list.c \ libcdata_btree_values_list.h libcdata_definitions.h \ libcdata_error.c libcdata_error.h libcdata_extern.h \ libcdata_libcerror.h libcdata_libcthreads.h libcdata_list.c \ libcdata_list.h libcdata_list_element.c \ libcdata_list_element.h libcdata_range_list.c \ libcdata_range_list.h libcdata_range_list_value.c \ libcdata_range_list_value.h libcdata_support.c \ libcdata_support.h libcdata_tree_node.c libcdata_tree_node.h \ libcdata_types.h libcdata_unused.h @HAVE_LOCAL_LIBCDATA_TRUE@am_libcdata_la_OBJECTS = libcdata_array.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree_node.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree_values_list.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_error.lo libcdata_list.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list_element.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_range_list.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_range_list_value.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_support.lo \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_tree_node.lo libcdata_la_OBJECTS = $(am_libcdata_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCDATA_TRUE@am_libcdata_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcdata_array.Plo \ ./$(DEPDIR)/libcdata_btree.Plo \ ./$(DEPDIR)/libcdata_btree_node.Plo \ ./$(DEPDIR)/libcdata_btree_values_list.Plo \ ./$(DEPDIR)/libcdata_error.Plo ./$(DEPDIR)/libcdata_list.Plo \ ./$(DEPDIR)/libcdata_list_element.Plo \ ./$(DEPDIR)/libcdata_range_list.Plo \ ./$(DEPDIR)/libcdata_range_list_value.Plo \ ./$(DEPDIR)/libcdata_support.Plo \ ./$(DEPDIR)/libcdata_tree_node.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcdata_la_SOURCES) DIST_SOURCES = $(am__libcdata_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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_LIBCDATA_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCDATA_TRUE@ -I../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCDATA_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCDATA_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCDATA_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBCDATA_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBCDATA_TRUE@noinst_LTLIBRARIES = libcdata.la @HAVE_LOCAL_LIBCDATA_TRUE@libcdata_la_SOURCES = \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_array.c libcdata_array.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree.c libcdata_btree.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree_node.c libcdata_btree_node.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree_values_list.c libcdata_btree_values_list.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_definitions.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_error.c libcdata_error.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_extern.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_libcerror.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_libcthreads.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list.c libcdata_list.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list_element.c libcdata_list_element.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_range_list.c libcdata_range_list.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_range_list_value.c libcdata_range_list_value.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_support.c libcdata_support.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_tree_node.c libcdata_tree_node.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_types.h \ @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_unused.h DISTCLEANFILES = \ Makefile \ 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 libcdata/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcdata/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcdata.la: $(libcdata_la_OBJECTS) $(libcdata_la_DEPENDENCIES) $(EXTRA_libcdata_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libcdata_la_rpath) $(libcdata_la_OBJECTS) $(libcdata_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_array.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_btree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_btree_node.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_btree_values_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_list_element.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_range_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_range_list_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcdata_tree_node.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcdata_array.Plo -rm -f ./$(DEPDIR)/libcdata_btree.Plo -rm -f ./$(DEPDIR)/libcdata_btree_node.Plo -rm -f ./$(DEPDIR)/libcdata_btree_values_list.Plo -rm -f ./$(DEPDIR)/libcdata_error.Plo -rm -f ./$(DEPDIR)/libcdata_list.Plo -rm -f ./$(DEPDIR)/libcdata_list_element.Plo -rm -f ./$(DEPDIR)/libcdata_range_list.Plo -rm -f ./$(DEPDIR)/libcdata_range_list_value.Plo -rm -f ./$(DEPDIR)/libcdata_support.Plo -rm -f ./$(DEPDIR)/libcdata_tree_node.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcdata_array.Plo -rm -f ./$(DEPDIR)/libcdata_btree.Plo -rm -f ./$(DEPDIR)/libcdata_btree_node.Plo -rm -f ./$(DEPDIR)/libcdata_btree_values_list.Plo -rm -f ./$(DEPDIR)/libcdata_error.Plo -rm -f ./$(DEPDIR)/libcdata_list.Plo -rm -f ./$(DEPDIR)/libcdata_list_element.Plo -rm -f ./$(DEPDIR)/libcdata_range_list.Plo -rm -f ./$(DEPDIR)/libcdata_range_list_value.Plo -rm -f ./$(DEPDIR)/libcdata_support.Plo -rm -f ./$(DEPDIR)/libcdata_tree_node.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcdata_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: libesedb-20240420/libcdata/libcdata_range_list_value.c0000644000175000017500000002462714610746222023454 0ustar00lordyestalordyesta/* * Range list value * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_libcerror.h" #include "libcdata_range_list_value.h" /* Creates a range list value * Make sure the value range_list_value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcdata_range_list_value_initialize( libcdata_range_list_value_t **range_list_value, libcerror_error_t **error ) { static char *function = "libcdata_range_list_value_initialize"; if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } if( *range_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid range list value value already set.", function ); return( -1 ); } *range_list_value = memory_allocate_structure( libcdata_range_list_value_t ); if( *range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create range list value.", function ); goto on_error; } if( memory_set( *range_list_value, 0, sizeof( libcdata_range_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear range list value.", function ); goto on_error; } return( 1 ); on_error: if( *range_list_value != NULL ) { memory_free( *range_list_value ); *range_list_value = NULL; } return( -1 ); } /* Frees a range list value * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libcdata_range_list_value_free( libcdata_range_list_value_t **range_list_value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libcdata_range_list_value_free"; int result = 1; if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } if( *range_list_value != NULL ) { if( value_free_function != NULL ) { if( value_free_function( &( ( *range_list_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( *range_list_value ); *range_list_value = NULL; } return( result ); } /* Clones the range list value * * 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 libcdata_range_list_value_clone( libcdata_range_list_value_t **destination_range_list_value, libcdata_range_list_value_t *source_range_list_value, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libcdata_range_list_value_clone"; if( destination_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination range list value.", function ); return( -1 ); } if( *destination_range_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination range list value value 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_range_list_value == NULL ) { *destination_range_list_value = NULL; return( 1 ); } *destination_range_list_value = memory_allocate_structure( libcdata_range_list_value_t ); if( *destination_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination range list value.", function ); goto on_error; } if( memory_copy( *destination_range_list_value, source_range_list_value, sizeof( libcdata_range_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination range list value.", function ); memory_free( *destination_range_list_value ); *destination_range_list_value = NULL; return( -1 ); } ( *destination_range_list_value )->value = NULL; if( value_clone_function( &( ( *destination_range_list_value )->value ), source_range_list_value->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value.", function ); goto on_error; } return( 1 ); on_error: if( *destination_range_list_value != NULL ) { if( ( *destination_range_list_value )->value != NULL ) { value_free_function( &( ( *destination_range_list_value )->value ), NULL ); } memory_free( *destination_range_list_value ); *destination_range_list_value = NULL; } return( -1 ); } /* Merges the range list values * * The values are merged using the value_merge_function. * If the source value is NULL the merge function is not called. * * Returns 1 if successful or -1 on error */ int libcdata_range_list_value_merge( libcdata_range_list_value_t *destination_range_list_value, libcdata_range_list_value_t *source_range_list_value, int (*value_merge_function)( intptr_t *destination_value, intptr_t *source_value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libcdata_range_list_value_merge"; if( destination_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination range list value.", function ); return( -1 ); } if( source_range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source range list value.", function ); return( -1 ); } if( source_range_list_value->value != NULL ) { if( destination_range_list_value->value == NULL ) { destination_range_list_value->value = source_range_list_value->value; } else { if( value_merge_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value merge function.", function ); return( -1 ); } if( value_merge_function( destination_range_list_value->value, source_range_list_value->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to merge source with destination value.", function ); return( -1 ); } } } if( destination_range_list_value->start > source_range_list_value->start ) { /* Merge a preceding range */ destination_range_list_value->size += destination_range_list_value->start - source_range_list_value->start; destination_range_list_value->start = source_range_list_value->start; } if( destination_range_list_value->end < source_range_list_value->end ) { /* Merge a successive range */ destination_range_list_value->size += source_range_list_value->end - destination_range_list_value->end; destination_range_list_value->end = source_range_list_value->end; } return( 1 ); } /* Checks if the range overlaps with the range list value * Returns 1 if the range overlaps, 0 if not or -1 on error */ int libcdata_range_list_value_check_range_overlap( libcdata_range_list_value_t *range_list_value, uint64_t range_start, uint64_t range_end, libcerror_error_t **error ) { static char *function = "libcdata_range_list_value_check_range_overlap"; if( range_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range list value.", function ); return( -1 ); } /* Check if the range overlaps the existing range entirely */ if( ( range_start < range_list_value->start ) && ( range_end > range_list_value->end ) ) { return( 1 ); } /* Check if the range overlaps at the end of the existing range */ if( ( range_start >= range_list_value->start ) && ( range_start <= range_list_value->end ) ) { return( 1 ); } /* Check if the range overlaps at the beginning of the existing range */ if( ( range_end >= range_list_value->start ) && ( range_end <= range_list_value->end ) ) { return( 1 ); } return( 0 ); } libesedb-20240420/libcdata/libcdata_btree_values_list.c0000644000175000017500000001220314610746222023627 0ustar00lordyestalordyesta/* * Balanced tree values list functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_btree_values_list.h" #include "libcdata_libcerror.h" #include "libcdata_list.h" #include "libcdata_list_element.h" #include "libcdata_types.h" /* Frees a B-tree values list * Returns 1 if successful or -1 on error */ int libcdata_btree_values_list_free( libcdata_list_t **values_list, libcerror_error_t **error ) { static char *function = "libcdata_btree_values_list_free"; int result = 1; if( values_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list.", function ); return( -1 ); } if( libcdata_list_free( values_list, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free values list.", function ); result = -1; } return( result ); } /* Removes an element from the values list * Returns 1 if successful or -1 on error */ int libcdata_btree_values_list_remove_element( libcdata_list_t *values_list, libcdata_list_element_t **values_list_element, libcerror_error_t **error ) { static char *function = "libcdata_btree_values_list_remove_element"; if( values_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list.", function ); return( -1 ); } if( values_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list element.", function ); return( -1 ); } if( libcdata_list_remove_element( values_list, *values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove element from values list.", function ); return( -1 ); } if( libcdata_list_element_free( values_list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element.", function ); return( -1 ); } return( 1 ); } /* Replaces the values list element with the previous element * If available replacement_value is set to the value of the previous element * Returns 1 if successful or -1 on error */ int libcdata_btree_values_list_replace_element_with_previous( libcdata_list_t *values_list, libcdata_list_element_t **values_list_element, intptr_t **replacement_value, libcerror_error_t **error ) { libcdata_list_element_t *previous_element = NULL; static char *function = "libcdata_btree_values_list_replace_element_with_previous"; if( values_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list.", function ); return( -1 ); } if( values_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values list element.", function ); return( -1 ); } if( libcdata_list_element_get_previous_element( *values_list_element, &previous_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve previous element from values list element.", function ); return( -1 ); } if( previous_element != NULL ) { if( libcdata_list_element_get_value( previous_element, replacement_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from previous element.", function ); return( -1 ); } } if( libcdata_btree_values_list_remove_element( values_list, values_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove element from values list.", function ); return( -1 ); } *values_list_element = previous_element; return( 1 ); } libesedb-20240420/libcdata/libcdata_error.c0000644000175000017500000000553614610746222021260 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2006-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcdata_error.h" #include "libcdata_libcerror.h" #if !defined( HAVE_LOCAL_LIBCDATA ) /* Free an error and its elements */ void libcdata_error_free( libcdata_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 libcdata_error_fprint( libcdata_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libcdata_error_sprint( libcdata_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcdata_error_backtrace_fprint( libcdata_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libcdata_error_backtrace_sprint( libcdata_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */ libesedb-20240420/pyproject.toml0000644000175000017500000000013314610727243017277 0ustar00lordyestalordyesta[build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" libesedb-20240420/libfmapi/0000755000175000017500000000000014610746414016152 5ustar00lordyestalordyestalibesedb-20240420/libfmapi/libfmapi_value_type.h0000644000175000017500000000274414610746241022350 0ustar00lordyestalordyesta/* * Value type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFMAPI_VALUE_TYPE_H ) */ libesedb-20240420/libfmapi/libfmapi_debug.c0000644000175000017500000036366014610746241021263 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #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_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 ) { libfmapi_internal_entry_identifier_t *entry_identifier = NULL; static char *function = "libfmapi_debug_print_entry_identifier"; uint32_t value_32bit = 0; uint8_t *service_provider_identifier = NULL; 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 ); goto on_error; } 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 ); goto on_error; } service_provider_identifier = &( value_data[ 4 ] ); value_data += 20; value_data_size -= 20; libcnotify_printf( "Entry identifier:\n" ); 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 ); goto on_error; } } 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 ); goto on_error; } return( 1 ); on_error: if( entry_identifier != NULL ) { libfmapi_entry_identifier_free( (libfmapi_entry_identifier_t **) &entry_identifier, NULL ); } 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_one_off_entry_identifier_t *one_off_entry_identifier = NULL; 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; if( libfmapi_one_off_entry_identifier_initialize( &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 ); goto on_error; } if( libfmapi_one_off_entry_identifier_copy_from_byte_stream( one_off_entry_identifier, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy one-off entry identifier from byte stream.", function ); goto on_error; } libcnotify_printf( "One-off entry identifier:\n" ); #if defined( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); goto on_error; } value_string = 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( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); goto on_error; } libcnotify_printf( "Display name\t\t\t: %" PRIs_SYSTEM "\n", value_string ); memory_free( value_string ); value_string = NULL; #if defined( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); goto on_error; } value_string = 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( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); goto on_error; } libcnotify_printf( "Address type\t\t\t: %" PRIs_SYSTEM "\n", value_string ); memory_free( value_string ); value_string = NULL; #if defined( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); goto on_error; } value_string = 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( 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, 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, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); goto on_error; } libcnotify_printf( "Email address\t\t\t: %" PRIs_SYSTEM "\n", value_string ); memory_free( value_string ); value_string = NULL; libcnotify_printf( "\n" ); if( libfmapi_one_off_entry_identifier_free( &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 ); goto on_error; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } if( one_off_entry_identifier != NULL ) { libfmapi_one_off_entry_identifier_free( &one_off_entry_identifier, NULL ); } return( -1 ); } /* Prints the persist data block * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_persist_data_block( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libfmapi_debug_print_persist_data_block"; uint16_t block_type = 0; uint16_t elements_data_size = 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 ); } /* TODO sanity check of value_data_size */ libcnotify_printf( "Persist data block:\n" ); byte_stream_copy_to_uint16_little_endian( value_data, block_type ); /* TODO print block type decription */ libcnotify_printf( "\tType:\t\t\t\t0x%04" PRIx16 "\n", block_type ); value_data += 2; value_data_size -= 2; byte_stream_copy_to_uint16_little_endian( value_data, elements_data_size ); libcnotify_printf( "\tSize:\t\t\t\t%" PRIu16 "\n", elements_data_size ); value_data += 2; value_data_size -= 2; /* TODO sanity check of elements_data_size */ /* TODO print persist data elements while( elements_data_size > 0 ) { } */ libcnotify_print_data( value_data, elements_data_size, 0 ); value_data += elements_data_size; value_data_size -= elements_data_size; if( value_data_size > 0 ) { libcnotify_printf( "Trailing data:\n" ); libcnotify_print_data( value_data, value_data_size, 0 ); } 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 ) { system_character_t filetime_string[ 32 ]; system_character_t guid_string[ 48 ]; libfdatetime_filetime_t *filetime = NULL; libfguid_identifier_t *guid = NULL; 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( 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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( 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( 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( 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( 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 = 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( 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( 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( 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( 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_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( 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 = 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( 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_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 0x1080: libcnotify_printf( "Icon index\t: " ); switch( value_32bit ) { case 0x00000001: libcnotify_printf( "Post" ); break; case 0x00000003: libcnotify_printf( "Other" ); break; case 0x00000100: libcnotify_printf( "Read mail" ); break; case 0x00000101: libcnotify_printf( "Unread mail" ); break; case 0x00000102: libcnotify_printf( "Submitted mail" ); break; case 0x00000103: libcnotify_printf( "Unsent mail" ); break; case 0x00000104: libcnotify_printf( "Receipt mail" ); break; case 0x00000105: libcnotify_printf( "Replied mail" ); break; case 0x00000106: libcnotify_printf( "Forwarded mail" ); break; case 0x00000107: libcnotify_printf( "Remote mail" ); break; case 0x00000108: libcnotify_printf( "Delivery mail" ); break; case 0x00000109: libcnotify_printf( "Read mail" ); break; case 0x0000010a: libcnotify_printf( "Nondelivery mail" ); break; case 0x0000010b: libcnotify_printf( "Nonread mail" ); break; case 0x0000010c: libcnotify_printf( "Recall_S mail" ); break; case 0x0000010d: libcnotify_printf( "Recall_F mail" ); break; case 0x0000010e: libcnotify_printf( "Tracking mail" ); break; case 0x0000011b: libcnotify_printf( "Out of office mail" ); break; case 0x0000011c: libcnotify_printf( "Recall mail" ); break; case 0x00000130: libcnotify_printf( "Tracked mail" ); break; case 0x00000200: libcnotify_printf( "Contact" ); break; case 0x00000202: libcnotify_printf( "Distribution list" ); break; case 0x00000300: libcnotify_printf( "Sticky note blue" ); break; case 0x00000301: libcnotify_printf( "Sticky note green" ); break; case 0x00000302: libcnotify_printf( "Sticky note pink" ); break; case 0x00000303: libcnotify_printf( "Sticky note yellow" ); break; case 0x00000304: libcnotify_printf( "Sticky note white" ); break; case 0x00000400: libcnotify_printf( "Single instance appointment" ); break; case 0x00000401: libcnotify_printf( "Recurring appointment" ); break; case 0x00000402: libcnotify_printf( "Single instance meeting" ); break; case 0x00000403: libcnotify_printf( "Recurring meeting" ); break; case 0x00000404: libcnotify_printf( "Meeting request" ); break; case 0x00000405: libcnotify_printf( "Accept" ); break; case 0x00000406: libcnotify_printf( "Decline" ); break; case 0x00000407: libcnotify_printf( "Tentativly" ); break; case 0x00000408: libcnotify_printf( "Cancellation" ); break; case 0x00000409: libcnotify_printf( "Informational update" ); break; case 0x00000500: libcnotify_printf( "Task/task" ); break; case 0x00000501: libcnotify_printf( "Unassigned recurring task" ); break; case 0x00000502: libcnotify_printf( "Assignee's task" ); break; case 0x00000503: libcnotify_printf( "Assigner's task" ); break; case 0x00000504: libcnotify_printf( "Task request" ); break; case 0x00000505: libcnotify_printf( "Task acceptance" ); break; case 0x00000506: libcnotify_printf( "Task rejection" ); break; case 0x00000601: libcnotify_printf( "Journal conversation" ); break; case 0x00000602: libcnotify_printf( "Journal e-mail message" ); break; case 0x00000603: libcnotify_printf( "Journal meeting request" ); break; case 0x00000604: libcnotify_printf( "Journal meeting response" ); break; case 0x00000606: libcnotify_printf( "Journal task request" ); break; case 0x00000607: libcnotify_printf( "Journal task response" ); break; case 0x00000608: libcnotify_printf( "Journal note" ); break; case 0x00000609: libcnotify_printf( "Journal fax" ); break; case 0x0000060a: libcnotify_printf( "Journal phone call" ); break; case 0x0000060c: libcnotify_printf( "Journal letter" ); break; case 0x0000060d: libcnotify_printf( "Journal Microsoft Office Word" ); break; case 0x0000060e: libcnotify_printf( "Journal Microsoft Office Excel" ); break; case 0x0000060f: libcnotify_printf( "Journal Microsoft Office PowerPoint" ); break; case 0x00000610: libcnotify_printf( "Journal Microsoft Office Access" ); break; case 0x00000612: libcnotify_printf( "Journal document" ); break; case 0x00000613: libcnotify_printf( "Journal meeting" ); break; case 0x00000614: libcnotify_printf( "Journal meeting cancellation" ); break; case 0x00000615: libcnotify_printf( "Journal remote session" ); break; case 0xffffffff: libcnotify_printf( "New mail" ); 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 ]; system_character_t filetime_string[ 32 ]; system_character_t guid_string[ 48 ]; 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; 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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: case 0x8081: case 0x8085: case 0x8091: case 0x8095: case 0x80a1: case 0x80a5: case 0x80b5: case 0x80c5: case 0x80d5: /* 0x1102 */ case 0x1098: case 0x36d8: case 0x36e4: case 0x8054: case 0x8055: 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( 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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( 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_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, LIBFWNT_ENDIAN_LITTLE, 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( 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_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, LIBFWNT_ENDIAN_LITTLE, 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( 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_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, LIBFWNT_ENDIAN_LITTLE, 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( 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_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, LIBFWNT_ENDIAN_LITTLE, 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( 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_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( value_data, value_data_size, (uint8_t *) rtf_value_string, &rtf_value_string_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( 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 = 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( 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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_SYSTEM "\n\n", guid_string ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x36d9: if( value_data_size >= 4 ) { if( libfmapi_debug_print_persist_data_block( 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 persist data block.", function ); return( -1 ); } } 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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( 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 = 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( 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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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_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 libesedb-20240420/libfmapi/libfmapi_x400_object_identifier.h0000644000175000017500000000357114610746241024415 0ustar00lordyestalordyesta/* * X.400 object identifier (MAPIOID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFMAPI_X400_OBJECT_IDENTIFIER_H ) */ libesedb-20240420/libfmapi/libfmapi_libfguid.h0000644000175000017500000000256614610746241021762 0ustar00lordyestalordyesta/* * The libfguid header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFMAPI_LIBFGUID_H ) */ libesedb-20240420/libfmapi/libfmapi_libcnotify.h0000644000175000017500000000254114610746241022330 0ustar00lordyestalordyesta/* * The internal libcnotify header * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 libesedb-20240420/libfmapi/libfmapi_entry_identifier.h0000644000175000017500000000417614610746241023537 0ustar00lordyestalordyesta/* * Entry identifier (ENTRYID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_ENTRY_IDENTIFIER_H ) #define _LIBFMAPI_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_entry_identifier libfmapi_internal_entry_identifier_t; struct libfmapi_internal_entry_identifier { /* The flags */ uint8_t flags[ 4 ]; /* The service provider identifier */ uint8_t service_provider_identifier[ 16 ]; }; 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, const uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_entry_identifier_get_service_provider_identifier( libfmapi_entry_identifier_t *entry_identifier, uint8_t *guid_data, size_t guid_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_ENTRY_IDENTIFIER_H ) */ libesedb-20240420/libfmapi/libfmapi_libfwnt.h0000644000175000017500000000324714610746241021637 0ustar00lordyestalordyesta/* * The libfwnt header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #include #include #include #include #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 /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFMAPI_LIBFWNT_H ) */ libesedb-20240420/libfmapi/libfmapi_one_off_entry_identifier.c0000644000175000017500000011762514610746241025231 0ustar00lordyestalordyesta/* * One-off entry identifier functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates an one-off entry identifier * Make sure the value entry_identifier is referencing, is set to NULL * 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, const uint8_t *byte_stream, size_t byte_stream_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_copy_from_byte_stream"; size_t byte_stream_offset = 0; size_t string_size = 0; uint16_t flags = 0; uint16_t format_version = 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( internal_entry_identifier->email_address != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry identifier - email address value already set.", function ); return( -1 ); } if( internal_entry_identifier->address_type != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry identifier - address type value already set.", function ); return( -1 ); } if( internal_entry_identifier->display_name != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry identifier - display value value already set.", 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 < 4 ) || ( byte_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid byte stream size value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: one-off entry identifier header data:\n", function ); libcnotify_print_data( byte_stream, 4, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 0 ] ), format_version ); byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 2 ] ), flags ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: format version\t: %" PRIu16 "\n", function, format_version ); libcnotify_printf( "%s: flags\t\t: 0x%04" PRIx16 "\n", function, flags ); } #endif byte_stream_offset += 4; if( format_version != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported format version: %" PRIu16 ".", function, format_version ); goto on_error; } 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( ( flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%04" PRIx16 ".", function, flags ); goto on_error; } internal_entry_identifier->format_version = format_version; internal_entry_identifier->flags = flags; internal_entry_identifier->ascii_codepage = ascii_codepage; string_size = byte_stream_offset; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( string_size < ( byte_stream_size - 3 ) ) { if( ( byte_stream[ string_size ] == 0 ) && ( byte_stream[ string_size + 1 ] == 0 ) ) { break; } string_size += 2; } if( ( string_size >= ( byte_stream_size - 1 ) ) || ( byte_stream[ string_size ] != 0 ) || ( byte_stream[ string_size + 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; } string_size += 2; } else { while( string_size < ( byte_stream_size - 1 ) ) { if( byte_stream[ string_size ] == 0 ) { break; } string_size += 1; } if( ( string_size >= byte_stream_size ) || ( byte_stream[ string_size ] != 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 ); } string_size += 1; } string_size -= byte_stream_offset; if( ( string_size == 0 ) || ( string_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid display name size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: display name data:\n", function ); libcnotify_print_data( &( byte_stream[ byte_stream_offset ] ), string_size, 0 ); } #endif internal_entry_identifier->display_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string_size ); 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_offset ] ), string_size ) == 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 = string_size; byte_stream_offset += string_size; string_size = byte_stream_offset; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( string_size < ( byte_stream_size - 3 ) ) { if( ( byte_stream[ string_size ] == 0 ) && ( byte_stream[ string_size + 1 ] == 0 ) ) { break; } string_size += 2; } if( ( string_size >= ( byte_stream_size - 1 ) ) || ( byte_stream[ string_size ] != 0 ) || ( byte_stream[ string_size + 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; } string_size += 2; } else { while( string_size < ( byte_stream_size - 1 ) ) { if( byte_stream[ string_size ] == 0 ) { break; } string_size += 1; } if( ( string_size >= byte_stream_size ) || ( byte_stream[ string_size ] != 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; } string_size += 1; } string_size -= byte_stream_offset; if( ( string_size == 0 ) || ( string_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid address type size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: address type data:\n", function ); libcnotify_print_data( &( byte_stream[ byte_stream_offset ] ), string_size, 0 ); } #endif internal_entry_identifier->address_type = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string_size ); 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_offset ] ), string_size ) == 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 = string_size; byte_stream_offset += string_size; string_size = byte_stream_offset; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( string_size < ( byte_stream_size - 3 ) ) { if( ( byte_stream[ string_size ] == 0 ) && ( byte_stream[ string_size + 1 ] == 0 ) ) { break; } string_size += 2; } if( ( string_size >= ( byte_stream_size - 1 ) ) || ( byte_stream[ string_size ] != 0 ) || ( byte_stream[ string_size + 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; } string_size += 2; } else { while( string_size < ( byte_stream_size - 1 ) ) { if( byte_stream[ string_size ] == 0 ) { break; } string_size += 1; } if( ( string_size >= byte_stream_size ) || ( byte_stream[ string_size ] != 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; } string_size += 1; } string_size -= byte_stream_offset; if( ( string_size == 0 ) || ( string_size > MEMORY_MAXIMUM_ALLOCATION_SIZE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid email address size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: email address data:\n", function ); libcnotify_print_data( &( byte_stream[ byte_stream_offset ] ), string_size, 0 ); } #endif internal_entry_identifier->email_address = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string_size ); 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_offset ] ), string_size ) == 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 = string_size; byte_stream_offset += string_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( byte_stream_offset < byte_stream_size ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( &( byte_stream[ byte_stream_offset ] ), byte_stream_size - byte_stream_offset, 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 format version * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_version( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *format_version, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_version"; 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( format_version == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format version.", function ); return( -1 ); } *format_version = internal_entry_identifier->format_version; return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_flags( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *flags, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_flags"; 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( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = internal_entry_identifier->flags; 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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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, 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, internal_entry_identifier->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 ); } libesedb-20240420/libfmapi/libfmapi_one_off_entry_identifier.h0000644000175000017500000001253414610746241025227 0ustar00lordyestalordyesta/* * One-off entry identifier functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_H ) #define _LIBFMAPI_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 format version */ uint16_t format_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; /* The ASCII codepage */ int ascii_codepage; }; 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, const uint8_t *byte_stream, size_t byte_stream_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_version( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *format_version, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_flags( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *flags, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_H ) */ libesedb-20240420/libfmapi/libfmapi_codepage.h0000644000175000017500000000300714610746241021733 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_INTERNAL_CODEPAGE_H ) */ libesedb-20240420/libfmapi/libfmapi_codepage.c0000644000175000017500000000653614610746241021740 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_DEBUG_OUTPUT ) */ libesedb-20240420/libfmapi/Makefile.am0000644000175000017500000000274214610746241020211 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFMAPI AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfmapi.la libfmapi_la_SOURCES = \ libfmapi_class_identifier.c libfmapi_class_identifier.h \ libfmapi_checksum.c libfmapi_checksum.h \ libfmapi_codepage.c libfmapi_codepage.h \ libfmapi_debug.c libfmapi_debug.h \ libfmapi_definitions.h \ libfmapi_entry_identifier.c libfmapi_entry_identifier.h \ libfmapi_error.c libfmapi_error.h \ libfmapi_extern.h \ libfmapi_libcerror.h \ libfmapi_libcnotify.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_support.c libfmapi_support.h \ libfmapi_types.h \ libfmapi_unused.h \ libfmapi_value_type.c libfmapi_value_type.h \ libfmapi_x400_object_identifier.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfmapi ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfmapi_la_SOURCES) libesedb-20240420/libfmapi/libfmapi_error.h0000644000175000017500000000340314610746241021315 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_ERROR_H ) #define _LIBFMAPI_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFMAPI ) #include #endif #include "libfmapi_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFMAPI ) LIBFMAPI_EXTERN \ void libfmapi_error_free( libfmapi_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_error_fprint( libfmapi_error_t *error, FILE *stream ); LIBFMAPI_EXTERN \ int libfmapi_error_sprint( libfmapi_error_t *error, char *string, size_t size ); LIBFMAPI_EXTERN \ int libfmapi_error_backtrace_fprint( libfmapi_error_t *error, FILE *stream ); LIBFMAPI_EXTERN \ int libfmapi_error_backtrace_sprint( libfmapi_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_INTERNAL_ERROR_H ) */ libesedb-20240420/libfmapi/libfmapi_debug.h0000644000175000017500000000555714610746241021266 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_persist_data_block( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_persist_data_element( 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 /* !defined( _LIBFMAPI_DEBUG_H ) */ libesedb-20240420/libfmapi/libfmapi_entry_identifier.c0000644000175000017500000002414614610746241023531 0ustar00lordyestalordyesta/* * Entry identifier (ENTRYID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfmapi_definitions.h" #include "libfmapi_entry_identifier.h" #include "libfmapi_libcerror.h" #include "libfmapi_libcnotify.h" #include "libfmapi_libfguid.h" #include "libfmapi_service_provider_identifier.h" /* Creates an entry identifier * Make sure the value entry_identifier is referencing, is set to NULL * 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; } *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"; 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; memory_free( internal_entry_identifier ); } return( 1 ); } /* 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, const 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 defined( HAVE_DEBUG_OUTPUT ) system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; int result = 0; #endif 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 ) || ( byte_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid byte stream size value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: entry identifier data:\n", function ); libcnotify_print_data( byte_stream, 20, 0 ); } #endif if( memory_copy( internal_entry_identifier->flags, &( byte_stream[ 0 ] ), 4 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy flags.", function ); goto on_error; } if( memory_copy( internal_entry_identifier->service_provider_identifier, &( byte_stream[ 4 ] ), 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy service provider identifier.", 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 service provider identifier.", function ); goto on_error; } libcnotify_printf( "%s: flags\t\t\t\t: 0x%02" PRIx8 ", 0x%02" PRIx8 ", 0x%02" PRIx8 ", 0x%02" PRIx8 "\n", function, internal_entry_identifier->flags[ 0 ], internal_entry_identifier->flags[ 1 ], internal_entry_identifier->flags[ 2 ], internal_entry_identifier->flags[ 3 ] ); if( libfguid_identifier_copy_from_byte_stream( guid, internal_entry_identifier->service_provider_identifier, 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 ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_FLAG_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: service provider identifier\t: %" PRIs_SYSTEM " (%s)\n", function, guid_string, libfmapi_service_provider_identifier_get_name( internal_entry_identifier->service_provider_identifier ) ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free service provider identifier.", function ); goto on_error; } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif return( -1 ); } /* Retrieves the service provider identifier * Returns 1 if successful or -1 on error */ int libfmapi_entry_identifier_get_service_provider_identifier( libfmapi_entry_identifier_t *entry_identifier, uint8_t *guid_data, size_t guid_data_size, libcerror_error_t **error ) { libfmapi_internal_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_entry_identifier_get_service_provider_identifier"; 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( guid_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid GUID data.", function ); return( -1 ); } if( guid_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: GUID data size value exceeds maximum.", function ); return( -1 ); } if( guid_data_size < 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: GUID data size value too small.", function ); return( -1 ); } if( memory_copy( guid_data, internal_entry_identifier->service_provider_identifier, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy service provider identifier.", function ); return( -1 ); } return( 1 ); } libesedb-20240420/libfmapi/libfmapi_class_identifier.h0000644000175000017500000000560714610746241023503 0ustar00lordyestalordyesta/* * Class identifier (CLSID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_CLASS_IDENTIFIER_H ) #define _LIBFMAPI_CLASS_IDENTIFIER_H #include #include #include "libfmapi_definitions.h" #include "libfmapi_extern.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 /* defined( HAVE_DEBUG_OUTPUT ) */ LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_mapi[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_public_strings[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_internet_headers[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_appointment[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_task[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_address[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_common[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_journal[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_sticky_note[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_sharing[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_rss_feed[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_unified_messaging[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_calendar[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_air_sync[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_attachment[ 16 ]; LIBFMAPI_EXTERN_VARIABLE \ uint8_t libfmapi_class_identifier_unknown[ 16 ]; #if defined( HAVE_DEBUG_OUTPUT ) const char *libfmapi_class_identifier_get_name( uint8_t *class_identifier ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_CLASS_IDENTIFIER_H ) */ libesedb-20240420/libfmapi/libfmapi_value_type.c0000644000175000017500000000744514610746241022346 0ustar00lordyestalordyesta/* * Value type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfmapi/libfmapi_libuna.h0000644000175000017500000000331014610746241021433 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBFMAPI_LIBUNA_H ) */ libesedb-20240420/libfmapi/libfmapi_definitions.h0000644000175000017500000000421514610746241022501 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include /* The definitions in are copied here * for local use of libfmapi */ #else #include #define LIBFMAPI_VERSION 20240415 /* The libfmapi version string */ #define LIBFMAPI_VERSION_STRING "20240415" /* 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 /* !defined( HAVE_LOCAL_LIBFMAPI ) */ #endif /* !defined( LIBFMAPI_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfmapi/libfmapi_support.c0000644000175000017500000000220014610746241021665 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfmapi_definitions.h" #include "libfmapi_support.h" #if !defined( HAVE_LOCAL_LIBFMAPI ) /* Returns the library version as a string */ const char *libfmapi_get_version( void ) { return( (const char *) LIBFMAPI_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */ libesedb-20240420/libfmapi/libfmapi_unused.h0000644000175000017500000000260014610746241021465 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_UNUSED_H ) #define _LIBFMAPI_UNUSED_H #include #if !defined( LIBFMAPI_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFMAPI_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFMAPI_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFMAPI_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFMAPI_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFMAPI_UNUSED_H ) */ libesedb-20240420/libfmapi/libfmapi_class_identifier.c0000644000175000017500000001200714610746241023466 0ustar00lordyestalordyesta/* * Class identifier (CLSID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfmapi/libfmapi_checksum.h0000644000175000017500000000320614610746241021767 0ustar00lordyestalordyesta/* * Checksum functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_CHECKSUM_H ) #define _LIBFMAPI_CHECKSUM_H #include #include #include "libfmapi_extern.h" #include "libfmapi_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBFMAPI_EXTERN_VARIABLE \ uint32_t libfmapi_checksum_crc32_table[ 256 ]; LIBFMAPI_EXTERN_VARIABLE \ int libfmapi_checksum_crc32_table_computed; void libfmapi_checksum_initialize_crc32_table( int ); int libfmapi_checksum_calculate_crc32( uint32_t *checksum, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ); int libfmapi_checksum_calculate_weak_crc32( uint32_t *checksum, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_CHECKSUM_H ) */ libesedb-20240420/libfmapi/libfmapi_checksum.c0000644000175000017500000001142214610746241021761 0ustar00lordyestalordyesta/* * Checksum functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfmapi_libcerror.h" /* Table of CRC-32 values of 8-bit values */ uint32_t libfmapi_checksum_crc32_table[ 256 ]; /* Value to indicate the CRC-32 table been computed */ int libfmapi_checksum_crc32_table_computed = 0; /* Initializes the internal CRC-32 table * The table speeds up the CRC-32 calculation */ void libfmapi_checksum_initialize_crc32_table( uint32_t polynomial ) { uint32_t checksum = 0; uint32_t table_index = 0; uint8_t bit_iterator = 0; for( table_index = 0; table_index < 256; table_index++ ) { checksum = (uint32_t) table_index; for( bit_iterator = 0; bit_iterator < 8; bit_iterator++ ) { if( checksum & 1 ) { checksum = polynomial ^ ( checksum >> 1 ); } else { checksum = checksum >> 1; } } libfmapi_checksum_crc32_table[ table_index ] = checksum; } libfmapi_checksum_crc32_table_computed = 1; } /* Calculates the CRC-32 checksum of a buffer * Returns 1 if successful or -1 on error */ int libfmapi_checksum_calculate_crc32( uint32_t *checksum, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libfmapi_checksum_calculate_crc32"; size_t buffer_offset = 0; uint32_t safe_checksum = 0; uint32_t table_index = 0; if( checksum == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid checksum.", 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( libfmapi_checksum_crc32_table_computed == 0 ) { libfmapi_checksum_initialize_crc32_table( 0xedb88320UL ); } safe_checksum = initial_value ^ (uint32_t) 0xffffffffUL; for( buffer_offset = 0; buffer_offset < size; buffer_offset++ ) { table_index = ( safe_checksum ^ buffer[ buffer_offset ] ) & 0x000000ffUL; safe_checksum = libfmapi_checksum_crc32_table[ table_index ] ^ ( safe_checksum >> 8 ); } *checksum = safe_checksum ^ 0xffffffffUL; return( 1 ); } /* Calculates the weak CRC-32 checksum of a buffer * Returns 1 if successful or -1 on error */ int libfmapi_checksum_calculate_weak_crc32( uint32_t *checksum, const uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libfmapi_checksum_calculate_weak_crc32"; size_t buffer_offset = 0; uint32_t safe_checksum = 0; uint32_t table_index = 0; if( checksum == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid checksum.", 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( libfmapi_checksum_crc32_table_computed == 0 ) { libfmapi_checksum_initialize_crc32_table( 0xedb88320UL ); } safe_checksum = initial_value; for( buffer_offset = 0; buffer_offset < size; buffer_offset++ ) { table_index = ( safe_checksum ^ buffer[ buffer_offset ] ) & 0x000000ffUL; safe_checksum = libfmapi_checksum_crc32_table[ table_index ] ^ ( safe_checksum >> 8 ); } *checksum = safe_checksum; return( 1 ); } libesedb-20240420/libfmapi/libfmapi_property_type.c0000644000175000017500000046545014610746241023122 0ustar00lordyestalordyesta/* * Property type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfmapi_class_identifier.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, "PidTagReplyTime", "Reply deadline" }, { 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, "PidTagReplyRecipientEntries", "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)" }, { 0x0e28, 0x001e, "PR_PRIMARY_SEND_ACCT", "Primary send account identifier" }, { 0x0e29, 0x001e, "PR_NEXT_SEND_ACCT", "Secondary send account identifier" }, { 0x0e30, 0x0003, "PidTagReplItemid", "Replication item identifier" }, { 0x0e30, 0x0102, "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, "PidTagIconIndex", "Icon index" }, { 0x1081, 0x0003, "PR_ACTION_FLAG", "" }, { 0x1082, 0x0040, "PR_ACTION_DATE", "" }, { 0x1090, 0x0003, "PidTagFlagStatus", "Flag status" }, { 0x1091, 0x0040, "PR_FLAG_COMPLETE", "" }, { 0x1095, 0x0003, "PR_FLAG_ICON", "Flag icon index" }, { 0x1096, 0x0003, "PidTagBlockStatus", "Block status" }, { 0x1097, 0x0003, "PidTagItemTemporaryFlags", "Temporary item flags" }, { 0x1098, 0x1102, "PidTagConflictItems", "Conflict items" }, { 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" }, { 0x36d9, 0x0102, "PidTagAdditionalRenEntryIdsEx", "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, 0x0003, "PR_INTERNET_MESSAGE_FORMAT", "" }, { 0x6610, 0x001e, "PR_PROFILE_OFFLINE_STORE_PATH", "" }, { 0x6611, 0x0003, "PidTagContactAddressBookStoreSupportMask", "Contact address book store support flags" }, { 0x6611, 0x0102, "PR_PROFILE_OFFLINE_INFO", "" }, { 0x6612, 0x0003, "PR_INTERNET_WRAPPING_LENGTH", "" }, { 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, "PR_VIEW_CLSID", "View class identifier" }, { 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" }, { 0x6841, 0x0003, "PR_SCHDINFO_RESOURCE_TYPE", "" }, { 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", "Department" }, { 0x00008015, 0x000b, "PidLidHasPicture", "Has picture" }, { 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", "Address book provider types" }, { 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", "Distribution list checksum" }, { 0x0000804d, 0x0102, "PidLidBirthdayEventEntryId", "" }, { 0x0000804e, 0x0102, "PidLidAnniversaryEventEntryId", "" }, { 0x0000804f, 0x001e, "PidLidContactUserField1", "" }, { 0x00008050, 0x001e, "PidLidContactUserField2", "" }, { 0x00008051, 0x001e, "PidLidContactUserField3", "" }, { 0x00008052, 0x001e, "PidLidContactUserField4", "" }, { 0x00008053, 0x001e, "PidLidDistributionListName", "Distribution list name" }, { 0x00008054, 0x1102, "PidLidDistributionListOneOffMembers", "Distribution list member one-off entry identifiers" }, { 0x00008055, 0x1102, "PidLidDistributionListMembers", "Distribution list member entry identifiers" }, { 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 identifier" }, { 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 identifier" }, { 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 identifier" }, { 0x000080d8, 0x001e, "PidLidFreeBusyLocation", "" }, { 0x000080da, 0x001e, "PidLidHomeAddressCountryCode", "Home address country code" }, { 0x000080db, 0x001e, "PidLidWorkAddressCountryCode", "Work address country code" }, { 0x000080dc, 0x001e, "PidLidOtherAddressCountryCode", "Other address country code" }, { 0x000080dd, 0x001e, "PidLidAddressCountryCode", "Mailing address country code" }, { (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", "Side effects" }, { 0x00008514, 0x000b, "PidLidSmartNoAttach", "" }, { 0x00008516, 0x0040, "PidLidCommonStart", "Common start time" }, { 0x00008517, 0x0040, "PidLidCommonEnd", "Common end time" }, { 0x00008518, 0x0003, "PidLidTaskMode", "Task mode" }, { 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", "E-mail account name" }, { 0x00008581, 0x001e, "PidLidInternetAccountStamp", "E-mail account identifier" }, { 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 ) && ( 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 ) && ( 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 libesedb-20240420/libfmapi/libfmapi_libfdatetime.h0000644000175000017500000000327614610746241022625 0ustar00lordyestalordyesta/* * The libfdatetime header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFMAPI_LIBFDATETIME_H ) */ libesedb-20240420/libfmapi/libfmapi_lzfu.c0000644000175000017500000004010714610746241021141 0ustar00lordyestalordyesta/* * LZFu (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfmapi_checksum.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( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { libfmapi_lzfu_header_t lzfu_header; static char *function = "libfmapi_lzfu_get_uncompressed_data_size"; size_t compressed_data_offset = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t lz_buffer[ 4096 ]; const uint8_t *lzfu_reference_data = NULL; size_t uncompressed_data_offset = 0; uint16_t lz_buffer_iterator = 0; uint16_t reference_iterator = 0; uint16_t reference_offset = 0; uint16_t reference_size = 0; uint8_t flag_byte = 0; uint8_t flag_byte_bit_mask = 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 < sizeof( libfmapi_lzfu_header_t ) ) || ( compressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data size value out of bounds.", 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 ); } byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.compressed_data_size ); compressed_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.uncompressed_data_size ); compressed_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.signature ); compressed_data_offset += 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 ); } /* The compressed data size includes 12 bytes of the header */ if( ( lzfu_header.compressed_data_size < 12 ) || ( (size_t) ( lzfu_header.compressed_data_size - 12 ) != ( compressed_data_size - sizeof( libfmapi_lzfu_header_t ) ) ) ) { 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 ); } lzfu_header.compressed_data_size -= 12; #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_offset < compressed_data_size ) { flag_byte = compressed_data[ compressed_data_offset++ ]; /* 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_offset == 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++ ] = compressed_data[ compressed_data_offset ]; compressed_data_offset++; uncompressed_data_offset++; /* Make sure the lz buffer iterator wraps around */ lz_buffer_iterator %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } else { lzfu_reference_data = &( compressed_data[ compressed_data_offset ] ); compressed_data_offset += 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_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; } } } } if( (size_t) ( lzfu_header.uncompressed_data_size + 2 ) != uncompressed_data_offset ) { libcnotify_printf( "%s: mismatch in uncompressed data size (in header: %" PRIu32 " != required: %" PRIzd ").\n", function, lzfu_header.uncompressed_data_size + 2, uncompressed_data_offset ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* Compensate for the 2 trailing zero bytes */ *uncompressed_data_size = lzfu_header.uncompressed_data_size + 2; return( 1 ); } /* Decompresses data using LZFu compression * Returns 1 on success or -1 on error */ int libfmapi_lzfu_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ) { libfmapi_lzfu_header_t lzfu_header; uint8_t lz_buffer[ 4096 ]; const uint8_t *lzfu_reference_data = NULL; static char *function = "libfmapi_lzfu_decompress"; size_t compressed_data_offset = 0; size_t safe_uncompressed_data_size = 0; size_t uncompressed_data_offset = 0; uint32_t calculated_checksum = 0; uint16_t lz_buffer_iterator = 0; uint16_t reference_iterator = 0; uint16_t reference_offset = 0; uint16_t reference_size = 0; uint8_t flag_byte = 0; uint8_t flag_byte_bit_mask = 0; 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 < sizeof( libfmapi_lzfu_header_t ) ) || ( compressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data size value out of bounds.", 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data size.", function ); return( -1 ); } safe_uncompressed_data_size = *uncompressed_data_size; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: LZFu compressed data:\n", function ); libcnotify_print_data( compressed_data, compressed_data_size, 0 ); } #endif 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 ); } byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.compressed_data_size ); compressed_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.uncompressed_data_size ); compressed_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.signature ); compressed_data_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), lzfu_header.checksum ); compressed_data_offset += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: lzfu header compressed data size\t\t: %" PRIu32 "\n", function, lzfu_header.compressed_data_size ); libcnotify_printf( "%s: lzfu header uncompressed data size\t\t: %" PRIu32 "\n", function, lzfu_header.uncompressed_data_size ); libcnotify_printf( "%s: lzfu header signature\t\t\t\t: 0x08%" PRIx32 "\n", function, lzfu_header.signature ); libcnotify_printf( "%s: lzfu header checksum\t\t\t\t: %" PRIu32 "\n", function, lzfu_header.checksum ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ 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 ); } /* The compressed data size includes 12 bytes of the header */ if( ( lzfu_header.compressed_data_size < 12 ) || ( (size_t) ( lzfu_header.compressed_data_size - 12 ) != ( compressed_data_size - sizeof( libfmapi_lzfu_header_t ) ) ) ) { 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 ); } lzfu_header.compressed_data_size -= 12; /* Make sure the uncompressed buffer is large enough */ if( safe_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_checksum_calculate_weak_crc32( &calculated_checksum, &( compressed_data[ compressed_data_offset ] ), (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-32.", function ); return( -1 ); } if( lzfu_header.checksum != calculated_checksum ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in checksum ( %" PRIu32 " != %" PRIu32 " ).", function, lzfu_header.checksum, calculated_checksum ); return( -1 ); } while( compressed_data_offset < compressed_data_size ) { flag_byte = compressed_data[ compressed_data_offset++ ]; /* 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_offset == 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_offset >= 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_offset >= safe_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_offset; return( -1 ); } lz_buffer[ lz_buffer_iterator++ ] = compressed_data[ compressed_data_offset ]; uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ compressed_data_offset ]; compressed_data_offset++; /* Make sure the lz buffer iterator wraps around */ lz_buffer_iterator %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } else { if( compressed_data_offset > ( compressed_data_size - 2 ) ) { 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 = &( compressed_data[ compressed_data_offset ] ); compressed_data_offset += 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_offset + reference_size - 1 ) >= safe_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_offset + 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_offset++ ] = 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_offset; return( 1 ); } libesedb-20240420/libfmapi/libfmapi_types.h0000644000175000017500000000321514610746241021331 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfmapi_entry_identifier {} libfmapi_entry_identifier_t; typedef struct libfmapi_one_off_entry_identifier {} libfmapi_one_off_entry_identifier_t; #else typedef intptr_t libfmapi_entry_identifier_t; typedef intptr_t libfmapi_one_off_entry_identifier_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFMAPI ) */ #endif /* !defined( _LIBFMAPI_INTERNAL_TYPES_H ) */ libesedb-20240420/libfmapi/libfmapi_property_type.h0000644000175000017500000000643014610746241023114 0ustar00lordyestalordyesta/* * Property type functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_PROPERTY_TYPE_H ) */ libesedb-20240420/libfmapi/libfmapi_lzfu.h0000644000175000017500000000373714610746241021156 0ustar00lordyestalordyesta/* * LZFu (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_LZFU_H ) #define _LIBFMAPI_LZFU_H #include #include #include "libfmapi_extern.h" #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 CRC-32 checksum of the compressed data */ uint32_t checksum; }; LIBFMAPI_EXTERN \ int libfmapi_lzfu_get_uncompressed_data_size( const uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_lzfu_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_LZFU_H ) */ libesedb-20240420/libfmapi/libfmapi_libcerror.h0000644000175000017500000000263614610746241022156 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFMAPI_LIBCERROR_H ) */ libesedb-20240420/libfmapi/libfmapi_service_provider_identifier.c0000644000175000017500000000533414610746241025740 0ustar00lordyestalordyesta/* * Sevice provider functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; uint8_t libfmapi_service_provider_identifier_wab_wrapped_entry_identifier[ 16 ] = \ { 0xc0, 0x91, 0xad, 0xd3, 0x51, 0x9d, 0xcf, 0x11, 0xa4, 0xa9, 0x00, 0xaa, 0x00, 0x47, 0xfa, 0xa4 }; #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_service_provider_identifier_wab_wrapped_entry_identifier, "WAB wrapped entry identifier" }, { 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 libesedb-20240420/libfmapi/libfmapi_error.c0000644000175000017500000000553614610746241021321 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfmapi_error.h" #include "libfmapi_libcerror.h" #if !defined( HAVE_LOCAL_LIBFMAPI ) /* Free an error and its elements */ void libfmapi_error_free( libfmapi_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 libfmapi_error_fprint( libfmapi_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfmapi_error_sprint( libfmapi_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfmapi_error_backtrace_fprint( libfmapi_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfmapi_error_backtrace_sprint( libfmapi_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */ libesedb-20240420/libfmapi/Makefile.in0000644000175000017500000010474414610746265020235 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_checksum.c \ libfmapi_checksum.h libfmapi_codepage.c libfmapi_codepage.h \ libfmapi_debug.c libfmapi_debug.h libfmapi_definitions.h \ libfmapi_entry_identifier.c libfmapi_entry_identifier.h \ libfmapi_error.c libfmapi_error.h libfmapi_extern.h \ libfmapi_libcerror.h libfmapi_libcnotify.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_support.c \ libfmapi_support.h libfmapi_types.h libfmapi_unused.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_checksum.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_codepage.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_debug.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_entry_identifier.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_error.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_support.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.lo libfmapi_la_OBJECTS = $(am_libfmapi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFMAPI_TRUE@am_libfmapi_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfmapi_checksum.Plo \ ./$(DEPDIR)/libfmapi_class_identifier.Plo \ ./$(DEPDIR)/libfmapi_codepage.Plo \ ./$(DEPDIR)/libfmapi_debug.Plo \ ./$(DEPDIR)/libfmapi_entry_identifier.Plo \ ./$(DEPDIR)/libfmapi_error.Plo ./$(DEPDIR)/libfmapi_lzfu.Plo \ ./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo \ ./$(DEPDIR)/libfmapi_property_type.Plo \ ./$(DEPDIR)/libfmapi_service_provider_identifier.Plo \ ./$(DEPDIR)/libfmapi_support.Plo \ ./$(DEPDIR)/libfmapi_value_type.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfmapi_la_SOURCES) DIST_SOURCES = $(am__libfmapi_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFMAPI_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCTHREADS_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@ @PTHREAD_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_checksum.c libfmapi_checksum.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_codepage.c libfmapi_codepage.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_error.c libfmapi_error.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_extern.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcerror.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcnotify.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_support.c libfmapi_support.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_types.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_unused.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.c libfmapi_value_type.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_x400_object_identifier.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfmapi.la: $(libfmapi_la_OBJECTS) $(libfmapi_la_DEPENDENCIES) $(EXTRA_libfmapi_la_DEPENDENCIES) $(AM_V_CCLD)$(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_checksum.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_class_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_codepage.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_entry_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_lzfu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_property_type.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_service_provider_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_value_type.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfmapi_checksum.Plo -rm -f ./$(DEPDIR)/libfmapi_class_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_codepage.Plo -rm -f ./$(DEPDIR)/libfmapi_debug.Plo -rm -f ./$(DEPDIR)/libfmapi_entry_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_error.Plo -rm -f ./$(DEPDIR)/libfmapi_lzfu.Plo -rm -f ./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_property_type.Plo -rm -f ./$(DEPDIR)/libfmapi_service_provider_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_support.Plo -rm -f ./$(DEPDIR)/libfmapi_value_type.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfmapi_checksum.Plo -rm -f ./$(DEPDIR)/libfmapi_class_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_codepage.Plo -rm -f ./$(DEPDIR)/libfmapi_debug.Plo -rm -f ./$(DEPDIR)/libfmapi_entry_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_error.Plo -rm -f ./$(DEPDIR)/libfmapi_lzfu.Plo -rm -f ./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_property_type.Plo -rm -f ./$(DEPDIR)/libfmapi_service_provider_identifier.Plo -rm -f ./$(DEPDIR)/libfmapi_support.Plo -rm -f ./$(DEPDIR)/libfmapi_value_type.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfmapi/libfmapi_support.h0000644000175000017500000000231614610746241021702 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFMAPI_SUPPORT_H ) #define _LIBFMAPI_SUPPORT_H #include #include #include "libfmapi_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFMAPI ) LIBFMAPI_EXTERN \ const char *libfmapi_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFMAPI_SUPPORT_H ) */ libesedb-20240420/libfmapi/libfmapi_extern.h0000644000175000017500000000255514610746241021500 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFMAPI_EXTERN_VARIABLE extern #else #define LIBFMAPI_EXTERN_VARIABLE LIBFMAPI_EXTERN #endif #else #define LIBFMAPI_EXTERN /* extern */ #define LIBFMAPI_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */ #endif /* !defined( _LIBFMAPI_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfmapi/libfmapi_service_provider_identifier.h0000644000175000017500000000276314610746241025750 0ustar00lordyestalordyesta/* * Service provider identifier functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ]; extern uint8_t libfmapi_service_provider_identifier_wab_wrapped_entry_identifier[ 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 /* !defined( _LIBFMAPI_SERVICE_PROVIDER_IDENTIFIER_H ) */ libesedb-20240420/setup.cfg.in0000644000175000017500000000074714610727243016624 0ustar00lordyestalordyesta[metadata] name = libesedb-python version = @VERSION@ description = Python bindings module for libesedb long_description = Python bindings module for libesedb long_description_content_type = text/plain author = Joachim Metz author_email = joachim.metz@gmail.com license = GNU Lesser General Public License v3 or later (LGPLv3+) license_files = COPYING COPYING.LESSER classifiers = Development Status :: 2 - Pre-Alpha Programming Language :: Python [options] python_requires = >=3.7 libesedb-20240420/config.sub0000755000175000017500000010572414610746265016367 0ustar00lordyestalordyesta#!/usr/bin/sh # Configuration validation subroutine script. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-06-23' # 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 3 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, 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # 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: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # 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. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -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 1992-2023 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 ;; *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 # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | 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* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # 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) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ;; uclinux-uclibc* ) ;; managarm-mlibc* | managarm-kernel* ) ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel* ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel* ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$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 ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) 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 ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libesedb-20240420/libesedb.spec0000644000175000017500000000470414610746302017015 0ustar00lordyestalordyestaName: libesedb Version: 20240420 Release: 1 Summary: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format Group: System Environment/Libraries License: LGPL-3.0-or-later Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libesedb BuildRequires: gcc %description -n libesedb Library to access the Extensible Storage Engine (ESE) Database File (EDB) format %package -n libesedb-static Summary: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format Group: Development/Libraries Requires: libesedb = %{version}-%{release} %description -n libesedb-static Static library version of libesedb. %package -n libesedb-devel Summary: Header files and libraries for developing applications for libesedb Group: Development/Libraries Requires: libesedb = %{version}-%{release} %description -n libesedb-devel Header files and libraries for developing applications for libesedb. %package -n libesedb-python3 Summary: Python 3 bindings for libesedb Group: System Environment/Libraries Requires: libesedb = %{version}-%{release} python3 BuildRequires: python3-devel python3-setuptools %description -n libesedb-python3 Python 3 bindings for libesedb %package -n libesedb-tools Summary: Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB) Group: Applications/System Requires: libesedb = %{version}-%{release} %description -n libesedb-tools Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB) %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n libesedb %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.so.* %files -n libesedb-static %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.a %files -n libesedb-devel %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.so %{_libdir}/pkgconfig/libesedb.pc %{_includedir}/* %{_mandir}/man3/* %files -n libesedb-python3 %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/python3*/site-packages/*.a %{_libdir}/python3*/site-packages/*.so %files -n libesedb-tools %license COPYING COPYING.LESSER %doc AUTHORS README %{_bindir}/* %{_mandir}/man1/* %changelog * Sat Apr 20 2024 Joachim Metz 20240420-1 - Auto-generated libesedb-20240420/setup.py0000755000175000017500000002207614610727243016112 0ustar00lordyestalordyesta#!/usr/bin/env python # # Script to build and install Python-bindings. # Version: 20230909 from __future__ import print_function import copy import datetime import glob import gzip import platform import os import shlex import shutil import subprocess import sys import tarfile import zipfile from distutils.ccompiler import new_compiler from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext from setuptools.command.sdist import sdist if (sys.version_info[0], sys.version_info[1]) < (3, 7): print(("Unsupported Python version: {0:s}, version 3.7 or higher " "required.").format(sys.version)) sys.exit(1) class custom_build_ext(build_ext): """Custom handler for the build_ext command.""" def _RunCommand(self, command): """Runs the command.""" arguments = shlex.split(command) process = subprocess.Popen( arguments, stderr=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True) if not process: raise RuntimeError("Running: {0:s} failed.".format(command)) output, error = process.communicate() if process.returncode != 0: error = "\n".join(error.split("\n")[-5:]) raise RuntimeError("Running: {0:s} failed with error:\n{1:s}.".format( command, error)) return output def build_extensions(self): """Set up the build extensions.""" # TODO: move build customization here? build_ext.build_extensions(self) def run(self): """Runs the build extension.""" compiler = new_compiler(compiler=self.compiler) if compiler.compiler_type == "msvc": self.define = [ ("_CRT_SECURE_NO_WARNINGS", ""), ("UNICODE", ""), ] else: command = "sh configure --disable-nls --disable-shared-libs" output = self._RunCommand(command) print_line = False for line in output.split("\n"): line = line.rstrip() if line == "configure:": print_line = True if print_line: print(line) self.define = [ ("HAVE_CONFIG_H", ""), ] build_ext.run(self) class custom_sdist(sdist): """Custom handler for the sdist command.""" def run(self): """Builds a source distribution (sdist) package.""" if self.formats != ["gztar"] and self.formats != ["zip"]: print("'setup.py sdist' unsupported format.") sys.exit(1) if glob.glob("*.tar.gz"): print("'setup.py sdist' remove existing *.tar.gz files from " "source directory.") sys.exit(1) command = "make dist" exit_code = subprocess.call(command, shell=True) if exit_code != 0: raise RuntimeError("Running: {0:s} failed.".format(command)) if not os.path.exists(self.dist_dir): os.mkdir(self.dist_dir) source_package_file = glob.glob("*.tar.gz")[0] source_package_prefix, _, source_package_suffix = ( source_package_file.partition("-")) sdist_package_file = "{0:s}-python-{1:s}".format( source_package_prefix, source_package_suffix) sdist_package_file = os.path.join(self.dist_dir, sdist_package_file) os.rename(source_package_file, sdist_package_file) # Create and add the PKG-INFO file to the source package. with gzip.open(sdist_package_file, "rb") as input_file: with open(sdist_package_file[:-3], "wb") as output_file: shutil.copyfileobj(input_file, output_file) os.remove(sdist_package_file) self.distribution.metadata.write_pkg_info(".") pkg_info_path = "{0:s}-{1:s}/PKG-INFO".format( source_package_prefix, source_package_suffix[:-7]) with tarfile.open(sdist_package_file[:-3], "a:") as tar_file: tar_file.add("PKG-INFO", arcname=pkg_info_path) os.remove("PKG-INFO") with open(sdist_package_file[:-3], "rb") as input_file: with gzip.open(sdist_package_file, "wb") as output_file: shutil.copyfileobj(input_file, output_file) os.remove(sdist_package_file[:-3]) # Convert the .tar.gz into a .zip if self.formats == ["zip"]: zip_sdist_package_file = "{0:s}.zip".format(sdist_package_file[:-7]) with tarfile.open(sdist_package_file, "r|gz") as tar_file: with zipfile.ZipFile( zip_sdist_package_file, "w", zipfile.ZIP_DEFLATED) as zip_file: for tar_file_entry in tar_file: file_entry = tar_file.extractfile(tar_file_entry) if tar_file_entry.isfile(): modification_time = datetime.datetime.fromtimestamp( tar_file_entry.mtime) zip_modification_time = ( modification_time.year, modification_time.month, modification_time.day, modification_time.hour, modification_time.minute, modification_time.second) zip_info = zipfile.ZipInfo( date_time=zip_modification_time, filename=tar_file_entry.name) zip_info.external_attr = (tar_file_entry.mode & 0xff) << 16 file_data = file_entry.read() zip_file.writestr(zip_info, file_data) os.remove(sdist_package_file) sdist_package_file = zip_sdist_package_file # Inform distutils what files were created. dist_files = getattr(self.distribution, "dist_files", []) dist_files.append(("sdist", "", sdist_package_file)) class ProjectInformation(object): """Project information.""" def __init__(self): """Initializes project information.""" super(ProjectInformation, self).__init__() self.include_directories = [] self.library_name = None self.library_names = [] self.library_version = None self._ReadConfigureAc() self._ReadMakefileAm() @property def module_name(self): """The Python module name.""" return "py{0:s}".format(self.library_name[3:]) def _ReadConfigureAc(self): """Reads configure.ac to initialize the project information.""" with open("configure.ac", "r", encoding="utf-8") as file_object: found_ac_init = False found_library_name = False for line in file_object.readlines(): line = line.strip() if found_library_name: library_version = line[1:-2] self.library_version = library_version break elif found_ac_init: library_name = line[1:-2] self.library_name = library_name found_library_name = True elif line.startswith("AC_INIT"): found_ac_init = True if not self.library_name or not self.library_version: raise RuntimeError( "Unable to find library name and version in: configure.ac") def _ReadMakefileAm(self): """Reads Makefile.am to initialize the project information.""" if not self.library_name: raise RuntimeError("Missing library name") with open("Makefile.am", "r", encoding="utf-8") as file_object: found_subdirs = False for line in file_object.readlines(): line = line.strip() if found_subdirs: library_name, _, _ = line.partition(" ") self.include_directories.append(library_name) if library_name.startswith("lib"): self.library_names.append(library_name) if library_name == self.library_name: break elif line.startswith("SUBDIRS"): found_subdirs = True if not self.include_directories or not self.library_names: raise RuntimeError( "Unable to find include directories and library names in: " "Makefile.am") project_information = ProjectInformation() CMDCLASS = { "build_ext": custom_build_ext, "sdist": custom_sdist} SOURCES = [] # TODO: replace by detection of MSC DEFINE_MACROS = [] if platform.system() == "Windows": DEFINE_MACROS.append(("WINVER", "0x0501")) # TODO: determine how to handle third party DLLs. for library_name in project_information.library_names: if library_name != project_information.library_name: definition = "HAVE_LOCAL_{0:s}".format(library_name.upper()) DEFINE_MACROS.append((definition, "")) # Put everything inside the Python module to prevent issues with finding # shared libaries since pip does not integrate well with the system package # management. for library_name in project_information.library_names: for source_file in glob.glob(os.path.join(library_name, "*.[ly]")): generated_source_file = "{0:s}.c".format(source_file[:-2]) if not os.path.exists(generated_source_file): raise RuntimeError("Missing generated source file: {0:s}".format( generated_source_file)) source_files = glob.glob(os.path.join(library_name, "*.c")) SOURCES.extend(source_files) source_files = glob.glob(os.path.join(project_information.module_name, "*.c")) SOURCES.extend(source_files) # TODO: find a way to detect missing python.h # e.g. on Ubuntu python-dev is not installed by python-pip setup_args = dict( cmdclass=CMDCLASS, ext_modules=[ Extension( project_information.module_name, define_macros=DEFINE_MACROS, include_dirs=project_information.include_directories, libraries=[], library_dirs=[], sources=SOURCES ) ] ) setup(**setup_args) libesedb-20240420/acinclude.m40000644000175000017500000000271514610727243016564 0ustar00lordyestalordyestadnl Checks for required headers and functions dnl dnl Version: 20200713 dnl Function to detect if libesedb dependencies are available AC_DEFUN([AX_LIBESEDB_CHECK_LOCAL], [dnl Check for internationalization functions in libesedb/libesedb_i18n.c AC_CHECK_FUNCS([bindtextdomain]) ]) dnl Function to detect if esedbtools dependencies are available AC_DEFUN([AX_ESEDBTOOLS_CHECK_LOCAL], [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h]) AC_CHECK_FUNCS([close getopt setvbuf]) AS_IF( [test "x$ac_cv_func_close" != xyes], [AC_MSG_FAILURE( [Missing function: close], [1]) ]) dnl Headers included in esedbtools/log_handle.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 Function to check if DLL support is needed AC_DEFUN([AX_LIBESEDB_CHECK_DLL_SUPPORT], [AS_IF( [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno], [AS_CASE( [$host], [*cygwin* | *mingw* | *msys*], [AC_DEFINE( [HAVE_DLLMAIN], [1], [Define to 1 to enable the DllMain function.]) AC_SUBST( [HAVE_DLLMAIN], [1]) AC_SUBST( [LIBESEDB_DLL_EXPORT], ["-DLIBESEDB_DLL_EXPORT"]) AC_SUBST( [LIBESEDB_DLL_IMPORT], ["-DLIBESEDB_DLL_IMPORT"]) ]) ]) ]) libesedb-20240420/libesedb.pc.in0000644000175000017500000000137314610727243017074 0ustar00lordyestalordyestaprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libesedb Description: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format Version: @VERSION@ Libs: -L${libdir} -lesedb Libs.private: @ax_libbfio_pc_libs_private@ @ax_libcdata_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_libfcache_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libfvalue_pc_libs_private@ @ax_libfwnt_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@ Cflags: -I${includedir} libesedb-20240420/pyesedb/0000755000175000017500000000000014610746415016023 5ustar00lordyestalordyestalibesedb-20240420/pyesedb/pyesedb_libbfio.h0000644000175000017500000000276514610727251021324 0ustar00lordyestalordyesta/* * The libbfio header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_LIBBFIO_H ) #define _PYESEDB_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 /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _PYESEDB_LIBBFIO_H ) */ libesedb-20240420/pyesedb/pyesedb_records.c0000644000175000017500000002166714610727251021354 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of records * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_record.h" #include "pyesedb_records.h" PySequenceMethods pyesedb_records_sequence_methods = { /* sq_length */ (lenfunc) pyesedb_records_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyesedb_records_getitem, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ 0, /* sq_contains */ 0, /* sq_inplace_concat */ 0, /* sq_inplace_repeat */ 0 }; PyTypeObject pyesedb_records_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.records", /* tp_basicsize */ sizeof( pyesedb_records_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_records_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyesedb_records_sequence_methods, /* 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 | Py_TPFLAGS_HAVE_ITER, /* tp_doc */ "pyesedb sequence and iterator object of records", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyesedb_records_iter, /* tp_iternext */ (iternextfunc) pyesedb_records_iternext, /* tp_methods */ 0, /* 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) pyesedb_records_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 records sequence and iterator object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_records_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyesedb_records_t *sequence_object = NULL; static char *function = "pyesedb_records_new"; if( parent_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid parent object.", function ); return( NULL ); } if( get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid get item by index function.", function ); return( NULL ); } /* Make sure the records values are initialized */ sequence_object = PyObject_New( struct pyesedb_records, &pyesedb_records_type_object ); if( sequence_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create sequence object.", function ); goto on_error; } sequence_object->parent_object = parent_object; sequence_object->get_item_by_index = get_item_by_index; sequence_object->current_index = 0; sequence_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) sequence_object->parent_object ); return( (PyObject *) sequence_object ); on_error: if( sequence_object != NULL ) { Py_DecRef( (PyObject *) sequence_object ); } return( NULL ); } /* Initializes a records sequence and iterator object * Returns 0 if successful or -1 on error */ int pyesedb_records_init( pyesedb_records_t *sequence_object ) { static char *function = "pyesedb_records_init"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } /* Make sure the records values are initialized */ sequence_object->parent_object = NULL; sequence_object->get_item_by_index = NULL; sequence_object->current_index = 0; sequence_object->number_of_items = 0; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of records not supported.", function ); return( -1 ); } /* Frees a records sequence object */ void pyesedb_records_free( pyesedb_records_t *sequence_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_records_free"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return; } ob_type = Py_TYPE( sequence_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( sequence_object->parent_object != NULL ) { Py_DecRef( (PyObject *) sequence_object->parent_object ); } ob_type->tp_free( (PyObject*) sequence_object ); } /* The records len() function */ Py_ssize_t pyesedb_records_len( pyesedb_records_t *sequence_object ) { static char *function = "pyesedb_records_len"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } return( (Py_ssize_t) sequence_object->number_of_items ); } /* The records getitem() function */ PyObject *pyesedb_records_getitem( pyesedb_records_t *sequence_object, Py_ssize_t item_index ) { PyObject *record_object = NULL; static char *function = "pyesedb_records_getitem"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } record_object = sequence_object->get_item_by_index( sequence_object->parent_object, (int) item_index ); return( record_object ); } /* The records iter() function */ PyObject *pyesedb_records_iter( pyesedb_records_t *sequence_object ) { static char *function = "pyesedb_records_iter"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } Py_IncRef( (PyObject *) sequence_object ); return( (PyObject *) sequence_object ); } /* The records iternext() function */ PyObject *pyesedb_records_iternext( pyesedb_records_t *sequence_object ) { PyObject *record_object = NULL; static char *function = "pyesedb_records_iternext"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid current index.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( sequence_object->current_index >= sequence_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } record_object = sequence_object->get_item_by_index( sequence_object->parent_object, sequence_object->current_index ); if( record_object != NULL ) { sequence_object->current_index++; } return( record_object ); } libesedb-20240420/pyesedb/pyesedb_libclocale.h0000644000175000017500000000266014610727251022001 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_LIBCLOCALE_H ) #define _PYESEDB_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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _PYESEDB_LIBCLOCALE_H ) */ libesedb-20240420/pyesedb/pyesedb_libcerror.h0000644000175000017500000000263314610727251021673 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_LIBCERROR_H ) #define _PYESEDB_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _PYESEDB_LIBCERROR_H ) */ libesedb-20240420/pyesedb/pyesedb_tables.h0000644000175000017500000000447114610727251021164 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of tables * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_TABLES_H ) #define _PYESEDB_TABLES_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_tables pyesedb_tables_t; struct pyesedb_tables { /* Python object initialization */ PyObject_HEAD /* The parent object */ PyObject *parent_object; /* The get item by index callback function */ PyObject* (*get_item_by_index)( PyObject *parent_object, int index ); /* The current index */ int current_index; /* The number of items */ int number_of_items; }; extern PyTypeObject pyesedb_tables_type_object; PyObject *pyesedb_tables_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyesedb_tables_init( pyesedb_tables_t *sequence_object ); void pyesedb_tables_free( pyesedb_tables_t *sequence_object ); Py_ssize_t pyesedb_tables_len( pyesedb_tables_t *sequence_object ); PyObject *pyesedb_tables_getitem( pyesedb_tables_t *sequence_object, Py_ssize_t item_index ); PyObject *pyesedb_tables_iter( pyesedb_tables_t *sequence_object ); PyObject *pyesedb_tables_iternext( pyesedb_tables_t *sequence_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_TABLES_H ) */ libesedb-20240420/pyesedb/pyesedb_records.h0000644000175000017500000000451614610727251021353 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of records * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_RECORDS_H ) #define _PYESEDB_RECORDS_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_records pyesedb_records_t; struct pyesedb_records { /* Python object initialization */ PyObject_HEAD /* The parent object */ PyObject *parent_object; /* The get item by index callback function */ PyObject* (*get_item_by_index)( PyObject *parent_object, int index ); /* The current index */ int current_index; /* The number of items */ int number_of_items; }; extern PyTypeObject pyesedb_records_type_object; PyObject *pyesedb_records_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyesedb_records_init( pyesedb_records_t *sequence_object ); void pyesedb_records_free( pyesedb_records_t *sequence_object ); Py_ssize_t pyesedb_records_len( pyesedb_records_t *sequence_object ); PyObject *pyesedb_records_getitem( pyesedb_records_t *sequence_object, Py_ssize_t item_index ); PyObject *pyesedb_records_iter( pyesedb_records_t *sequence_object ); PyObject *pyesedb_records_iternext( pyesedb_records_t *sequence_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_RECORDS_H ) */ libesedb-20240420/pyesedb/pyesedb_error.h0000644000175000017500000000300414610727251021032 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_ERROR_H ) #define _PYESEDB_ERROR_H #include #include #include "pyesedb_libcerror.h" #include "pyesedb_python.h" #define PYESEDB_ERROR_STRING_SIZE 2048 #if defined( __cplusplus ) extern "C" { #endif void pyesedb_error_fetch( libcerror_error_t **error, int error_domain, int error_code, const char *format_string, ... ); void pyesedb_error_fetch_and_raise( PyObject *exception_object, const char *format_string, ... ); void pyesedb_error_raise( libcerror_error_t *error, PyObject *exception_object, const char *format_string, ... ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_ERROR_H ) */ libesedb-20240420/pyesedb/pyesedb.c0000644000175000017500000004565514610727625017643 0ustar00lordyestalordyesta/* * Python bindings module for libesedb (pyesedb) * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb.h" #include "pyesedb_column.h" #include "pyesedb_column_types.h" #include "pyesedb_columns.h" #include "pyesedb_error.h" #include "pyesedb_file.h" #include "pyesedb_file_object_io_handle.h" #include "pyesedb_file_types.h" #include "pyesedb_index.h" #include "pyesedb_indexes.h" #include "pyesedb_libbfio.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_long_value.h" #include "pyesedb_multi_value.h" #include "pyesedb_python.h" #include "pyesedb_record.h" #include "pyesedb_records.h" #include "pyesedb_table.h" #include "pyesedb_tables.h" #include "pyesedb_unused.h" #include "pyesedb_value_flags.h" #if !defined( LIBESEDB_HAVE_BFIO ) LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ /* The pyesedb module methods */ PyMethodDef pyesedb_module_methods[] = { { "get_version", (PyCFunction) pyesedb_get_version, METH_NOARGS, "get_version() -> String\n" "\n" "Retrieves the version." }, { "check_file_signature", (PyCFunction) pyesedb_check_file_signature, METH_VARARGS | METH_KEYWORDS, "check_file_signature(filename) -> Boolean\n" "\n" "Checks if a file has a Extensible Storage Engine (ESE) Database File (EDB) signature." }, { "check_file_signature_file_object", (PyCFunction) pyesedb_check_file_signature_file_object, METH_VARARGS | METH_KEYWORDS, "check_file_signature_file_object(file_object) -> Boolean\n" "\n" "Checks if a file has a Extensible Storage Engine (ESE) Database File (EDB) signature using a file-like object." }, { "open", (PyCFunction) pyesedb_open_new_file, METH_VARARGS | METH_KEYWORDS, "open(filename, mode='r') -> Object\n" "\n" "Opens a file." }, { "open_file_object", (PyCFunction) pyesedb_open_new_file_with_file_object, METH_VARARGS | METH_KEYWORDS, "open_file_object(file_object, mode='r') -> Object\n" "\n" "Opens a file using a file-like object." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; /* Retrieves the pyesedb/libesedb version * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_get_version( PyObject *self PYESEDB_ATTRIBUTE_UNUSED, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { const char *version_string = NULL; size_t version_string_length = 0; PYESEDB_UNREFERENCED_PARAMETER( self ) PYESEDB_UNREFERENCED_PARAMETER( arguments ) Py_BEGIN_ALLOW_THREADS version_string = libesedb_get_version(); Py_END_ALLOW_THREADS version_string_length = 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, NULL ) ); } /* Checks if a file has a Extensible Storage Engine (ESE) Database File (EDB) signature * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_check_file_signature( PyObject *self PYESEDB_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; const char *filename_narrow = NULL; static char *function = "pyesedb_check_file_signature"; static char *keyword_list[] = { "filename", NULL }; int result = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) const wchar_t *filename_wide = NULL; #else PyObject *utf8_string_object = NULL; #endif PYESEDB_UNREFERENCED_PARAMETER( self ) /* Note that PyArg_ParseTupleAndKeywords with "s" will force Unicode strings to be converted to narrow character string. * On Windows the narrow character strings contains an extended ASCII string with a codepage. Hence we get a conversion * exception. This will also fail if the default encoding is not set correctly. We cannot use "u" here either since that * does not allow us to pass non Unicode string objects and Python (at least 2.7) does not seems to automatically upcast them. */ if( PyArg_ParseTupleAndKeywords( arguments, keywords, "O|", keyword_list, &string_object ) == 0 ) { return( NULL ); } PyErr_Clear(); result = PyObject_IsInstance( string_object, (PyObject *) &PyUnicode_Type ); if( result == -1 ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type Unicode.", function ); return( NULL ); } else if( result != 0 ) { PyErr_Clear(); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 filename_wide = (wchar_t *) PyUnicode_AsWideCharString( string_object, NULL ); #else filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_check_file_signature_wide( filename_wide, &error ); Py_END_ALLOW_THREADS #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 PyMem_Free( filename_wide ); #endif #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object == NULL ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to convert Unicode string to UTF-8.", function ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 filename_narrow = PyBytes_AsString( utf8_string_object ); #else filename_narrow = PyString_AsString( utf8_string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_check_file_signature( filename_narrow, &error ); Py_END_ALLOW_THREADS Py_DecRef( utf8_string_object ); #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to check file signature.", function ); libcerror_error_free( &error ); return( NULL ); } if( result != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); } PyErr_Clear(); #if PY_MAJOR_VERSION >= 3 result = PyObject_IsInstance( string_object, (PyObject *) &PyBytes_Type ); #else result = PyObject_IsInstance( string_object, (PyObject *) &PyString_Type ); #endif if( result == -1 ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type string.", function ); return( NULL ); } else if( result != 0 ) { PyErr_Clear(); #if PY_MAJOR_VERSION >= 3 filename_narrow = PyBytes_AsString( string_object ); #else filename_narrow = PyString_AsString( string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_check_file_signature( filename_narrow, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to check file signature.", function ); libcerror_error_free( &error ); return( NULL ); } if( result != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); } PyErr_Format( PyExc_TypeError, "%s: unsupported string object type.", function ); return( NULL ); } /* Checks if a file has a Extensible Storage Engine (ESE) Database File (EDB) signature using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_check_file_signature_file_object( PyObject *self PYESEDB_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { PyObject *file_object = NULL; libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_check_file_signature_file_object"; static char *keyword_list[] = { "file_object", NULL }; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( self ) if( PyArg_ParseTupleAndKeywords( arguments, keywords, "O|", keyword_list, &file_object ) == 0 ) { return( NULL ); } if( pyesedb_file_object_initialize( &file_io_handle, file_object, &error ) != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to initialize file IO handle.", function ); libcerror_error_free( &error ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_check_file_signature_file_io_handle( file_io_handle, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to check file signature.", function ); libcerror_error_free( &error ); goto on_error; } if( libbfio_handle_free( &file_io_handle, &error ) != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free file IO handle.", function ); libcerror_error_free( &error ); goto on_error; } if( result != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( NULL ); } /* Creates a new file object and opens it * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_open_new_file( PyObject *self PYESEDB_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { pyesedb_file_t *pyesedb_file = NULL; static char *function = "pyesedb_open_new_file"; PYESEDB_UNREFERENCED_PARAMETER( self ) /* PyObject_New does not invoke tp_init */ pyesedb_file = PyObject_New( struct pyesedb_file, &pyesedb_file_type_object ); if( pyesedb_file == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create file.", function ); goto on_error; } if( pyesedb_file_init( pyesedb_file ) != 0 ) { goto on_error; } if( pyesedb_file_open( pyesedb_file, arguments, keywords ) == NULL ) { goto on_error; } return( (PyObject *) pyesedb_file ); on_error: if( pyesedb_file != NULL ) { Py_DecRef( (PyObject *) pyesedb_file ); } return( NULL ); } /* Creates a new file object and opens it using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_open_new_file_with_file_object( PyObject *self PYESEDB_ATTRIBUTE_UNUSED, PyObject *arguments, PyObject *keywords ) { pyesedb_file_t *pyesedb_file = NULL; static char *function = "pyesedb_open_new_file_with_file_object"; PYESEDB_UNREFERENCED_PARAMETER( self ) /* PyObject_New does not invoke tp_init */ pyesedb_file = PyObject_New( struct pyesedb_file, &pyesedb_file_type_object ); if( pyesedb_file == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create file.", function ); goto on_error; } if( pyesedb_file_init( pyesedb_file ) != 0 ) { goto on_error; } if( pyesedb_file_open_file_object( pyesedb_file, arguments, keywords ) == NULL ) { goto on_error; } return( (PyObject *) pyesedb_file ); on_error: if( pyesedb_file != NULL ) { Py_DecRef( (PyObject *) pyesedb_file ); } return( NULL ); } #if PY_MAJOR_VERSION >= 3 /* The pyesedb module definition */ PyModuleDef pyesedb_module_definition = { PyModuleDef_HEAD_INIT, /* m_name */ "pyesedb", /* m_doc */ "Python libesedb module (pyesedb).", /* m_size */ -1, /* m_methods */ pyesedb_module_methods, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL, /* m_free */ NULL, }; #endif /* PY_MAJOR_VERSION >= 3 */ /* Initializes the pyesedb module */ #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_pyesedb( void ) #else PyMODINIT_FUNC initpyesedb( void ) #endif { PyObject *module = NULL; PyGILState_STATE gil_state = 0; #if defined( HAVE_DEBUG_OUTPUT ) libesedb_notify_set_stream( stderr, NULL ); libesedb_notify_set_verbose( 1 ); #endif /* Create the module * This function must be called before grabbing the GIL * otherwise the module will segfault on a version mismatch */ #if PY_MAJOR_VERSION >= 3 module = PyModule_Create( &pyesedb_module_definition ); #else module = Py_InitModule3( "pyesedb", pyesedb_module_methods, "Python libesedb module (pyesedb)." ); #endif if( module == NULL ) { #if PY_MAJOR_VERSION >= 3 return( NULL ); #else return; #endif } #if PY_VERSION_HEX < 0x03070000 PyEval_InitThreads(); #endif gil_state = PyGILState_Ensure(); /* Setup the column type object */ pyesedb_column_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_column_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_column_type_object ); PyModule_AddObject( module, "column", (PyObject *) &pyesedb_column_type_object ); /* Setup the column_types type object */ pyesedb_column_types_type_object.tp_new = PyType_GenericNew; if( pyesedb_column_types_init_type( &pyesedb_column_types_type_object ) != 1 ) { goto on_error; } if( PyType_Ready( &pyesedb_column_types_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_column_types_type_object ); PyModule_AddObject( module, "column_types", (PyObject *) &pyesedb_column_types_type_object ); /* Setup the columns type object */ pyesedb_columns_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_columns_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_columns_type_object ); PyModule_AddObject( module, "columns", (PyObject *) &pyesedb_columns_type_object ); /* Setup the file type object */ pyesedb_file_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_file_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_file_type_object ); PyModule_AddObject( module, "file", (PyObject *) &pyesedb_file_type_object ); /* Setup the file_types type object */ pyesedb_file_types_type_object.tp_new = PyType_GenericNew; if( pyesedb_file_types_init_type( &pyesedb_file_types_type_object ) != 1 ) { goto on_error; } if( PyType_Ready( &pyesedb_file_types_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_file_types_type_object ); PyModule_AddObject( module, "file_types", (PyObject *) &pyesedb_file_types_type_object ); /* Setup the index type object */ pyesedb_index_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_index_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_index_type_object ); PyModule_AddObject( module, "index", (PyObject *) &pyesedb_index_type_object ); /* Setup the indexes type object */ pyesedb_indexes_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_indexes_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_indexes_type_object ); PyModule_AddObject( module, "indexes", (PyObject *) &pyesedb_indexes_type_object ); /* Setup the long_value type object */ pyesedb_long_value_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_long_value_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_long_value_type_object ); PyModule_AddObject( module, "long_value", (PyObject *) &pyesedb_long_value_type_object ); /* Setup the multi_value type object */ pyesedb_multi_value_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_multi_value_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_multi_value_type_object ); PyModule_AddObject( module, "multi_value", (PyObject *) &pyesedb_multi_value_type_object ); /* Setup the record type object */ pyesedb_record_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_record_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_record_type_object ); PyModule_AddObject( module, "record", (PyObject *) &pyesedb_record_type_object ); /* Setup the records type object */ pyesedb_records_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_records_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_records_type_object ); PyModule_AddObject( module, "records", (PyObject *) &pyesedb_records_type_object ); /* Setup the table type object */ pyesedb_table_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_table_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_table_type_object ); PyModule_AddObject( module, "table", (PyObject *) &pyesedb_table_type_object ); /* Setup the tables type object */ pyesedb_tables_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pyesedb_tables_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_tables_type_object ); PyModule_AddObject( module, "tables", (PyObject *) &pyesedb_tables_type_object ); /* Setup the value_flags type object */ pyesedb_value_flags_type_object.tp_new = PyType_GenericNew; if( pyesedb_value_flags_init_type( &pyesedb_value_flags_type_object ) != 1 ) { goto on_error; } if( PyType_Ready( &pyesedb_value_flags_type_object ) < 0 ) { goto on_error; } Py_IncRef( (PyObject *) &pyesedb_value_flags_type_object ); PyModule_AddObject( module, "value_flags", (PyObject *) &pyesedb_value_flags_type_object ); PyGILState_Release( gil_state ); #if PY_MAJOR_VERSION >= 3 return( module ); #else return; #endif on_error: PyGILState_Release( gil_state ); #if PY_MAJOR_VERSION >= 3 return( NULL ); #else return; #endif } libesedb-20240420/pyesedb/pyesedb_multi_value.c0000644000175000017500000005164414610727625022244 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_multi_value_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_error.h" #include "pyesedb_integer.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_multi_value.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_multi_value_object_methods[] = { /* Functions to access the values */ { "get_number_of_values", (PyCFunction) pyesedb_multi_value_get_number_of_values, METH_NOARGS, "get_number_of_values() -> Integer\n" "\n" "Retrieves the number of values" }, { "get_value_data", (PyCFunction) pyesedb_multi_value_get_value_data, METH_VARARGS | METH_KEYWORDS, "get_value_data(multi_value_index) -> String or None\n" "\n" "Retrieves the value data as a binary string." }, { "get_value_data_as_floating_point", (PyCFunction) pyesedb_multi_value_get_value_data_as_floating_point, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_floating_point(multi_value_index) -> Float\n" "\n" "Retrieves the value data as a floating point." }, { "get_value_data_as_integer", (PyCFunction) pyesedb_multi_value_get_value_data_as_integer, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_integer(multi_value_index) -> Integer\n" "\n" "Retrieves the value data as an integer." }, { "get_value_data_as_string", (PyCFunction) pyesedb_multi_value_get_value_data_as_string, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_string(multi_value_index) -> Unicode string or None\n" "\n" "Retrieves the value data as a string." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_multi_value_object_get_set_definitions[] = { { "number_of_values", (getter) pyesedb_multi_value_get_number_of_values, (setter) 0, "The number of values", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_multi_value_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.multi_value", /* tp_basicsize */ sizeof( pyesedb_multi_value_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_multi_value_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 */ "pyesedb multi value object (wraps libesedb_multi_value_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_multi_value_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_multi_value_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_multi_value_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 multi value object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_new( libesedb_multi_value_t *multi_value, PyObject *parent_object ) { pyesedb_multi_value_t *pyesedb_multi_value = NULL; static char *function = "pyesedb_multi_value_new"; if( multi_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid multi value.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_multi_value = PyObject_New( struct pyesedb_multi_value, &pyesedb_multi_value_type_object ); if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize multi value.", function ); goto on_error; } pyesedb_multi_value->multi_value = multi_value; pyesedb_multi_value->parent_object = parent_object; if( pyesedb_multi_value->parent_object != NULL ) { Py_IncRef( pyesedb_multi_value->parent_object ); } return( (PyObject *) pyesedb_multi_value ); on_error: if( pyesedb_multi_value != NULL ) { Py_DecRef( (PyObject *) pyesedb_multi_value ); } return( NULL ); } /* Initializes a multi value object * Returns 0 if successful or -1 on error */ int pyesedb_multi_value_init( pyesedb_multi_value_t *pyesedb_multi_value ) { static char *function = "pyesedb_multi_value_init"; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid multi value.", function ); return( -1 ); } /* Make sure libesedb multi value is set to NULL */ pyesedb_multi_value->multi_value = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of multi value not supported.", function ); return( -1 ); } /* Frees a multi value object */ void pyesedb_multi_value_free( pyesedb_multi_value_t *pyesedb_multi_value ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_multi_value_free"; int result = 0; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid multi value.", function ); return; } ob_type = Py_TYPE( pyesedb_multi_value ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_multi_value->multi_value != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_free( &( pyesedb_multi_value->multi_value ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb multi value.", function ); libcerror_error_free( &error ); } } if( pyesedb_multi_value->parent_object != NULL ) { Py_DecRef( pyesedb_multi_value->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_multi_value ); } /* Retrieves the number of values * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_get_number_of_values( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_multi_value_get_number_of_values"; int number_of_values = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid multi value.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_number_of_values( pyesedb_multi_value->multi_value, &number_of_values, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of values.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_values ); #else integer_object = PyInt_FromLong( (long) number_of_values ); #endif return( integer_object ); } /* Retrieves the value data * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_get_value_data( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *value_data = NULL; static char *function = "pyesedb_multi_value_get_value_data"; static char *keyword_list[] = { "multi_value_index", NULL }; size_t value_data_size = 0; int multi_value_index = 0; int result = 0; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid multi value.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &multi_value_index ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_data_size( pyesedb_multi_value->multi_value, multi_value_index, &value_data_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data size.", function, multi_value_index ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_data_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_data = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create value: %d data.", function, multi_value_index ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_data( pyesedb_multi_value->multi_value, multi_value_index, value_data, value_data_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data.", function, multi_value_index ); libcerror_error_free( &error ); goto on_error; } #if PY_MAJOR_VERSION >= 3 string_object = PyBytes_FromStringAndSize( (char *) value_data, (Py_ssize_t) value_data_size ); #else string_object = PyString_FromStringAndSize( (char *) value_data, (Py_ssize_t) value_data_size ); #endif PyMem_Free( value_data ); return( string_object ); on_error: if( value_data != NULL ) { PyMem_Free( value_data ); } return( NULL ); } /* Retrieves the value data represented as a floating point * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_get_value_data_as_floating_point( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *floating_point_object = NULL; static char *function = "pyesedb_multi_value_get_value_data_as_floating_point"; static char *keyword_list[] = { "multi_value_index", NULL }; double value_64bit = 0.0; float value_32bit = 0.0; uint32_t column_type = 0; int multi_value_index = 0; int result = 0; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid multi value.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &multi_value_index ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_column_type( pyesedb_multi_value->multi_value, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, multi_value_index ); libcerror_error_free( &error ); return( NULL ); } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_FLOAT_32BIT: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_floating_point_32bit( pyesedb_multi_value->multi_value, multi_value_index, &value_32bit, &error ); Py_END_ALLOW_THREADS value_64bit = (double) value_32bit; break; case LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_floating_point_64bit( pyesedb_multi_value->multi_value, multi_value_index, &value_64bit, &error ); Py_END_ALLOW_THREADS break; default: PyErr_Format( PyExc_IOError, "%s: value: %d is not a floating point type.", function, multi_value_index ); return( NULL ); } if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve floating point value: %d.", function, multi_value_index ); libcerror_error_free( &error ); return( NULL ); } floating_point_object = PyFloat_FromDouble( value_64bit ); return( floating_point_object ); } /* Retrieves the value data represented as an integer * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_get_value_data_as_integer( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_multi_value_get_value_data_as_integer"; static char *keyword_list[] = { "multi_value_index", NULL }; uint64_t value_64bit = 0; int64_t integer_value = 0; uint32_t column_type = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; uint8_t value_is_signed = 0; uint8_t value_8bit = 0; int multi_value_index = 0; int result = 0; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid multi value.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &multi_value_index ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_column_type( pyesedb_multi_value->multi_value, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, multi_value_index ); libcerror_error_free( &error ); return( NULL ); } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_8bit( pyesedb_multi_value->multi_value, multi_value_index, &value_8bit, &error ); Py_END_ALLOW_THREADS /* Interpret the 8-bit value as unsigned */ integer_value = (uint8_t) value_8bit; break; case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_16bit( pyesedb_multi_value->multi_value, multi_value_index, &value_16bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ) { /* Interpret the 16-bit value as signed */ integer_value = (int16_t) value_16bit; value_is_signed = 1; } else { /* Interpret the 16-bit value as unsigned */ integer_value = (uint16_t) value_16bit; } break; case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_32bit( pyesedb_multi_value->multi_value, multi_value_index, &value_32bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) { /* Interpret the 32-bit value as signed */ integer_value = (int32_t) value_32bit; value_is_signed = 1; } else { /* Interpret the 32-bit value as unsigned */ integer_value = (uint32_t) value_32bit; } break; case LIBESEDB_COLUMN_TYPE_CURRENCY: case LIBESEDB_COLUMN_TYPE_DATE_TIME: case LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_64bit( pyesedb_multi_value->multi_value, multi_value_index, &value_64bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { /* Interpret the 64-bit value as signed */ integer_value = (int64_t) value_64bit; value_is_signed = 1; } else { /* Interpret the 64-bit value as unsigned */ integer_value = (uint64_t) value_64bit; } break; default: PyErr_Format( PyExc_IOError, "%s: value: %d is not an integer type.", function, multi_value_index ); return( NULL ); } if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve integer value: %d.", function, multi_value_index ); libcerror_error_free( &error ); return( NULL ); } if( value_is_signed != 0 ) { integer_object = pyesedb_integer_signed_new_from_64bit( integer_value ); } else { integer_object = pyesedb_integer_unsigned_new_from_64bit( integer_value ); } return( integer_object ); } /* Retrieves the value data represented as a string * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_multi_value_get_value_data_as_string( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *value_string = NULL; static char *keyword_list[] = { "multi_value_index", NULL }; static char *function = "pyesedb_multi_value_get_value_data_as_string"; size_t value_string_size = 0; uint32_t column_type = 0; int multi_value_index = 0; int result = 0; if( pyesedb_multi_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid multi value.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &multi_value_index ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_column_type( pyesedb_multi_value->multi_value, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, multi_value_index ); libcerror_error_free( &error ); return( NULL ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { PyErr_Format( PyExc_IOError, "%s: value: %d is not a string type.", function, multi_value_index ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_utf8_string_size( pyesedb_multi_value->multi_value, multi_value_index, &value_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d string size.", function, multi_value_index ); 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 *) PyMem_Malloc( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create value: %d string.", function, multi_value_index ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_multi_value_get_value_utf8_string( pyesedb_multi_value->multi_value, multi_value_index, value_string, value_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d string.", function, multi_value_index ); 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, NULL ); PyMem_Free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { PyMem_Free( value_string ); } return( NULL ); } libesedb-20240420/pyesedb/pyesedb_file_object_io_handle.h0000644000175000017500000001002614610727251024152 0ustar00lordyestalordyesta/* * Python file object IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_FILE_OBJECT_IO_HANDLE_H ) #define _PYESEDB_FILE_OBJECT_IO_HANDLE_H #include #include #include "pyesedb_libbfio.h" #include "pyesedb_libcerror.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_file_object_io_handle pyesedb_file_object_io_handle_t; struct pyesedb_file_object_io_handle { /* The python file (like) object */ PyObject *file_object; /* The access flags */ int access_flags; }; int pyesedb_file_object_io_handle_initialize( pyesedb_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ); int pyesedb_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ); int pyesedb_file_object_io_handle_free( pyesedb_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ); int pyesedb_file_object_io_handle_clone( pyesedb_file_object_io_handle_t **destination_file_object_io_handle, pyesedb_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ); int pyesedb_file_object_io_handle_open( pyesedb_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ); int pyesedb_file_object_io_handle_close( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); ssize_t pyesedb_file_object_read_buffer( PyObject *file_object, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyesedb_file_object_io_handle_read( pyesedb_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyesedb_file_object_write_buffer( PyObject *file_object, const uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pyesedb_file_object_io_handle_write( pyesedb_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); int pyesedb_file_object_seek_offset( PyObject *file_object, off64_t offset, int whence, libcerror_error_t **error ); int pyesedb_file_object_get_offset( PyObject *file_object, off64_t *offset, libcerror_error_t **error ); off64_t pyesedb_file_object_io_handle_seek_offset( pyesedb_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int pyesedb_file_object_io_handle_exists( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pyesedb_file_object_io_handle_is_open( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pyesedb_file_object_get_size( PyObject *file_object, size64_t *size, libcerror_error_t **error ); int pyesedb_file_object_io_handle_get_size( pyesedb_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_FILE_OBJECT_IO_HANDLE_H ) */ libesedb-20240420/pyesedb/pyesedb_index.c0000644000175000017500000003455514610727625021027 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_index_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_error.h" #include "pyesedb_index.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_record.h" #include "pyesedb_records.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_index_object_methods[] = { { "get_identifier", (PyCFunction) pyesedb_index_get_identifier, METH_NOARGS, "get_identifier() -> Integer\n" "\n" "Retrieves the identifier." }, { "get_name", (PyCFunction) pyesedb_index_get_name, METH_NOARGS, "get_name() -> Unicode string\n" "\n" "Retrieves the name." }, { "get_number_of_records", (PyCFunction) pyesedb_index_get_number_of_records, METH_NOARGS, "get_number_of_records() -> Integer\n" "\n" "Retrieves the number of records." }, { "get_record", (PyCFunction) pyesedb_index_get_record, METH_VARARGS | METH_KEYWORDS, "get_record(record_entry) -> Object\n" "\n" "Retrieves the record specified by the entry." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_index_object_get_set_definitions[] = { { "identifier", (getter) pyesedb_index_get_identifier, (setter) 0, "The identifier.", NULL }, { "name", (getter) pyesedb_index_get_name, (setter) 0, "The name.", NULL }, { "number_of_records", (getter) pyesedb_index_get_number_of_records, (setter) 0, "The number of records.", NULL }, { "records", (getter) pyesedb_index_get_records, (setter) 0, "The records.", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_index_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.index", /* tp_basicsize */ sizeof( pyesedb_index_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_index_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 */ "pyesedb index object (wraps libesedb_index_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_index_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_index_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_index_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 index object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_new( libesedb_index_t *index, PyObject *parent_object ) { pyesedb_index_t *pyesedb_index = NULL; static char *function = "pyesedb_index_new"; if( index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_index = PyObject_New( struct pyesedb_index, &pyesedb_index_type_object ); if( pyesedb_index == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize index.", function ); goto on_error; } pyesedb_index->index = index; pyesedb_index->parent_object = parent_object; if( pyesedb_index->parent_object != NULL ) { Py_IncRef( pyesedb_index->parent_object ); } return( (PyObject *) pyesedb_index ); on_error: if( pyesedb_index != NULL ) { Py_DecRef( (PyObject *) pyesedb_index ); } return( NULL ); } /* Initializes an index object * Returns 0 if successful or -1 on error */ int pyesedb_index_init( pyesedb_index_t *pyesedb_index ) { static char *function = "pyesedb_index_init"; if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( -1 ); } /* Make sure libesedb index is set to NULL */ pyesedb_index->index = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of index not supported.", function ); return( -1 ); } /* Frees an index object */ void pyesedb_index_free( pyesedb_index_t *pyesedb_index ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_index_free"; int result = 0; if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return; } ob_type = Py_TYPE( pyesedb_index ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_index->index != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_index_free( &( pyesedb_index->index ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb index.", function ); libcerror_error_free( &error ); } } if( pyesedb_index->parent_object != NULL ) { Py_DecRef( pyesedb_index->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_index ); } /* Retrieves the identifier * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_identifier( pyesedb_index_t *pyesedb_index, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_index_get_identifier"; uint32_t value_32bit = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_identifier( pyesedb_index->index, &value_32bit, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve identifier.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) value_32bit ); return( integer_object ); } /* Retrieves the name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_name( pyesedb_index_t *pyesedb_index, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_index_get_name"; char *utf8_string = NULL; size_t utf8_string_size = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_utf8_name_size( pyesedb_index->index, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to determine size of name as UTF-8 string.", function ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( utf8_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } utf8_string = (char *) PyMem_Malloc( sizeof( char ) * utf8_string_size ); if( utf8_string == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create UTF-8 string.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_utf8_name( pyesedb_index->index, (uint8_t *) utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve name as UTF-8 string.", function ); 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( utf8_string, (Py_ssize_t) utf8_string_size - 1, NULL ); if( string_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert UTF-8 string into Unicode object.", function ); goto on_error; } PyMem_Free( utf8_string ); return( string_object ); on_error: if( utf8_string != NULL ) { PyMem_Free( utf8_string ); } return( NULL ); } /* Retrieves the number of records * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_number_of_records( pyesedb_index_t *pyesedb_index, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_index_get_number_of_records"; int number_of_records = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_number_of_records( pyesedb_index->index, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of records.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_records ); #else integer_object = PyInt_FromLong( (long) number_of_records ); #endif return( integer_object ); } /* Retrieves a specific record by index * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_record_by_index( PyObject *pyesedb_index, int record_index ) { PyObject *record_object = NULL; libcerror_error_t *error = NULL; libesedb_record_t *record = NULL; static char *function = "pyesedb_index_get_record_by_index"; int result = 0; if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_record( ( (pyesedb_index_t *) pyesedb_index )->index, record_index, &record, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve record: %d.", function, record_index ); libcerror_error_free( &error ); goto on_error; } record_object = pyesedb_record_new( record, pyesedb_index ); if( record_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create record object.", function ); goto on_error; } return( record_object ); on_error: if( record != NULL ) { libesedb_record_free( &record, NULL ); } return( NULL ); } /* Retrieves a specific record * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_record( pyesedb_index_t *pyesedb_index, PyObject *arguments, PyObject *keywords ) { PyObject *record_object = NULL; static char *keyword_list[] = { "record_index", NULL }; int record_index = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &record_index ) == 0 ) { return( NULL ); } record_object = pyesedb_index_get_record_by_index( (PyObject *) pyesedb_index, record_index ); return( record_object ); } /* Retrieves a sequence and iterator object for the records * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_index_get_records( pyesedb_index_t *pyesedb_index, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *sequence_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_index_get_records"; int number_of_records = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid index.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_index_get_number_of_records( pyesedb_index->index, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of records.", function ); libcerror_error_free( &error ); return( NULL ); } sequence_object = pyesedb_records_new( (PyObject *) pyesedb_index, &pyesedb_index_get_record_by_index, number_of_records ); if( sequence_object == NULL ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to create sequence object.", function ); return( NULL ); } return( sequence_object ); } libesedb-20240420/pyesedb/pyesedb_table.c0000644000175000017500000005351014610727625020777 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_table_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_column.h" #include "pyesedb_columns.h" #include "pyesedb_error.h" #include "pyesedb_file.h" #include "pyesedb_integer.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_record.h" #include "pyesedb_records.h" #include "pyesedb_table.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_table_object_methods[] = { /* Functions to access the table values */ { "get_identifier", (PyCFunction) pyesedb_table_get_identifier, METH_NOARGS, "get_identifier() -> Integer\n" "\n" "Retrieves the identifier." }, { "get_name", (PyCFunction) pyesedb_table_get_name, METH_NOARGS, "get_name() -> Unicode string or None\n" "\n" "Retrieves the name." }, { "get_template_name", (PyCFunction) pyesedb_table_get_template_name, METH_NOARGS, "get_template_name() -> Unicode string or None\n" "\n" "Retrieves the template name." }, /* Functions to access the columns */ { "get_number_of_columns", (PyCFunction) pyesedb_table_get_number_of_columns, METH_NOARGS, "get_number_of_columns() -> Integer\n" "\n" "Retrieves the number of columns" }, { "get_column", (PyCFunction) pyesedb_table_get_column, METH_VARARGS | METH_KEYWORDS, "get_column(column_index) -> Object or None\n" "\n" "Retrieves a specific column" }, /* Functions to access the records */ { "get_number_of_records", (PyCFunction) pyesedb_table_get_number_of_records, METH_NOARGS, "get_number_of_records() -> Integer\n" "\n" "Retrieves the number of records" }, { "get_record", (PyCFunction) pyesedb_table_get_record, METH_VARARGS | METH_KEYWORDS, "get_record(record_index) -> Object or None\n" "\n" "Retrieves a specific record" }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_table_object_get_set_definitions[] = { { "identifier", (getter) pyesedb_table_get_identifier, (setter) 0, "The identifier.", NULL }, { "name", (getter) pyesedb_table_get_name, (setter) 0, "The name.", NULL }, { "template_name", (getter) pyesedb_table_get_template_name, (setter) 0, "The name.", NULL }, { "number_of_columns", (getter) pyesedb_table_get_number_of_columns, (setter) 0, "The number of columns", NULL }, { "columns", (getter) pyesedb_table_get_columns, (setter) 0, "The columns", NULL }, { "number_of_records", (getter) pyesedb_table_get_number_of_records, (setter) 0, "The number of records", NULL }, { "records", (getter) pyesedb_table_get_records, (setter) 0, "The records", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_table_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.table", /* tp_basicsize */ sizeof( pyesedb_table_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_table_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 */ "pyesedb table object (wraps libesedb_table_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_table_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_table_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_table_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 table object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_new( libesedb_table_t *table, PyObject *parent_object ) { pyesedb_table_t *pyesedb_table = NULL; static char *function = "pyesedb_table_new"; if( table == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid table.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_table = PyObject_New( struct pyesedb_table, &pyesedb_table_type_object ); if( pyesedb_table == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize table.", function ); goto on_error; } pyesedb_table->table = table; pyesedb_table->parent_object = parent_object; if( pyesedb_table->parent_object != NULL ) { Py_IncRef( pyesedb_table->parent_object ); } return( (PyObject *) pyesedb_table ); on_error: if( pyesedb_table != NULL ) { Py_DecRef( (PyObject *) pyesedb_table ); } return( NULL ); } /* Initializes a table object * Returns 0 if successful or -1 on error */ int pyesedb_table_init( pyesedb_table_t *pyesedb_table ) { static char *function = "pyesedb_table_init"; if( pyesedb_table == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid table.", function ); return( -1 ); } /* Make sure libesedb table is set to NULL */ pyesedb_table->table = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of table not supported.", function ); return( -1 ); } /* Frees a table object */ void pyesedb_table_free( pyesedb_table_t *pyesedb_table ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_table_free"; int result = 0; if( pyesedb_table == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid table.", function ); return; } ob_type = Py_TYPE( pyesedb_table ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_table->table != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_table_free( &( pyesedb_table->table ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb table.", function ); libcerror_error_free( &error ); } } if( pyesedb_table->parent_object != NULL ) { Py_DecRef( pyesedb_table->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_table ); } /* Retrieves the identifier * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_identifier( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_table_get_identifier"; uint32_t identifier = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_identifier( pyesedb_table->table, &identifier, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve identifier.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( (uint64_t) identifier ); return( integer_object ); } /* Retrieves the name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_name( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *name = NULL; static char *function = "pyesedb_table_get_name"; size_t name_size = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_utf8_name_size( pyesedb_table->table, &name_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve name size.", function ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( name_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } name = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * name_size ); if( name == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create name.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_utf8_name( pyesedb_table->table, name, name_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve name.", function ); 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 *) name, (Py_ssize_t) name_size - 1, NULL ); PyMem_Free( name ); return( string_object ); on_error: if( name != NULL ) { PyMem_Free( name ); } return( NULL ); } /* Retrieves the template name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_template_name( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *template_name = NULL; static char *function = "pyesedb_table_get_template_name"; size_t template_name_size = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_utf8_template_name_size( pyesedb_table->table, &template_name_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve template name size.", function ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( template_name_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } template_name = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * template_name_size ); if( template_name == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create template name.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_utf8_template_name( pyesedb_table->table, template_name, template_name_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve template name.", function ); 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 *) template_name, (Py_ssize_t) template_name_size - 1, NULL ); PyMem_Free( template_name ); return( string_object ); on_error: if( template_name != NULL ) { PyMem_Free( template_name ); } return( NULL ); } /* Retrieves the number of columns * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_number_of_columns( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_table_get_number_of_columns"; int number_of_columns = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_number_of_columns( pyesedb_table->table, &number_of_columns, 0, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of columns.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_columns ); #else integer_object = PyInt_FromLong( (long) number_of_columns ); #endif return( integer_object ); } /* Retrieves a specific column by index * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_column_by_index( PyObject *pyesedb_table, int column_index ) { libcerror_error_t *error = NULL; libesedb_column_t *column = NULL; PyObject *column_object = NULL; static char *function = "pyesedb_table_get_column_by_index"; int result = 0; if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_column( ( (pyesedb_table_t *) pyesedb_table )->table, column_index, &column, 0, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d.", function, column_index ); libcerror_error_free( &error ); goto on_error; } column_object = pyesedb_column_new( column, pyesedb_table ); if( column_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create column object.", function ); goto on_error; } return( column_object ); on_error: if( column != NULL ) { libesedb_column_free( &column, NULL ); } return( NULL ); } /* Retrieves a specific column * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_column( pyesedb_table_t *pyesedb_table, PyObject *arguments, PyObject *keywords ) { PyObject *column_object = NULL; static char *keyword_list[] = { "column_index", NULL }; int column_index = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &column_index ) == 0 ) { return( NULL ); } column_object = pyesedb_table_get_column_by_index( (PyObject *) pyesedb_table, column_index ); return( column_object ); } /* Retrieves a columns sequence and iterator object for the columns * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_columns( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *columns_object = NULL; static char *function = "pyesedb_table_get_columns"; int number_of_columns = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_number_of_columns( pyesedb_table->table, &number_of_columns, 0, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of columns.", function ); libcerror_error_free( &error ); return( NULL ); } columns_object = pyesedb_columns_new( (PyObject *) pyesedb_table, &pyesedb_table_get_column_by_index, number_of_columns ); if( columns_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create columns object.", function ); return( NULL ); } return( columns_object ); } /* Retrieves the number of records * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_number_of_records( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_table_get_number_of_records"; int number_of_records = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_number_of_records( pyesedb_table->table, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of records.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_records ); #else integer_object = PyInt_FromLong( (long) number_of_records ); #endif return( integer_object ); } /* Retrieves a specific record by index * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_record_by_index( PyObject *pyesedb_table, int record_index ) { libcerror_error_t *error = NULL; libesedb_record_t *record = NULL; PyObject *record_object = NULL; static char *function = "pyesedb_table_get_record_by_index"; int result = 0; if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_record( ( (pyesedb_table_t *) pyesedb_table )->table, record_index, &record, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve record: %d.", function, record_index ); libcerror_error_free( &error ); goto on_error; } record_object = pyesedb_record_new( record, (PyObject *) pyesedb_table ); if( record_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create record object.", function ); goto on_error; } return( record_object ); on_error: if( record != NULL ) { libesedb_record_free( &record, NULL ); } return( NULL ); } /* Retrieves a specific record * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_record( pyesedb_table_t *pyesedb_table, PyObject *arguments, PyObject *keywords ) { PyObject *record_object = NULL; static char *keyword_list[] = { "record_index", NULL }; int record_index = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &record_index ) == 0 ) { return( NULL ); } record_object = pyesedb_table_get_record_by_index( (PyObject *) pyesedb_table, record_index ); return( record_object ); } /* Retrieves a records sequence and iterator object for the records * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_table_get_records( pyesedb_table_t *pyesedb_table, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *records_object = NULL; static char *function = "pyesedb_table_get_records"; int number_of_records = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_table == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid table.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_table_get_number_of_records( pyesedb_table->table, &number_of_records, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of records.", function ); libcerror_error_free( &error ); return( NULL ); } records_object = pyesedb_records_new( (PyObject *) pyesedb_table, &pyesedb_table_get_record_by_index, number_of_records ); if( records_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create records object.", function ); return( NULL ); } return( records_object ); } libesedb-20240420/pyesedb/pyesedb_index.h0000644000175000017500000000455614610727251021025 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_index_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_INDEX_H ) #define _PYESEDB_INDEX_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_index pyesedb_index_t; struct pyesedb_index { /* Python object initialization */ PyObject_HEAD /* The libesedb index */ libesedb_index_t *index; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_index_object_methods[]; extern PyTypeObject pyesedb_index_type_object; PyObject *pyesedb_index_new( libesedb_index_t *index, PyObject *parent_object ); int pyesedb_index_init( pyesedb_index_t *pyesedb_index ); void pyesedb_index_free( pyesedb_index_t *pyesedb_index ); PyObject *pyesedb_index_get_identifier( pyesedb_index_t *pyesedb_index, PyObject *arguments ); PyObject *pyesedb_index_get_name( pyesedb_index_t *pyesedb_index, PyObject *arguments ); PyObject *pyesedb_index_get_number_of_records( pyesedb_index_t *pyesedb_index, PyObject *arguments ); PyObject *pyesedb_index_get_record_by_index( PyObject *pyesedb_index, int record_index ); PyObject *pyesedb_index_get_record( pyesedb_index_t *pyesedb_index, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_index_get_records( pyesedb_index_t *pyesedb_index, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_INDEX_H ) */ libesedb-20240420/pyesedb/pyesedb_multi_value.h0000644000175000017500000000514514610727625022244 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_multi_value_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_MULTI_VALUE_H ) #define _PYESEDB_MULTI_VALUE_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_multi_value pyesedb_multi_value_t; struct pyesedb_multi_value { /* Python object initialization */ PyObject_HEAD /* The libesedb multi value */ libesedb_multi_value_t *multi_value; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_multi_value_object_methods[]; extern PyTypeObject pyesedb_multi_value_type_object; PyObject *pyesedb_multi_value_new( libesedb_multi_value_t *multi_value, PyObject *parent_object ); int pyesedb_multi_value_init( pyesedb_multi_value_t *pyesedb_multi_value ); void pyesedb_multi_value_free( pyesedb_multi_value_t *pyesedb_multi_value ); PyObject *pyesedb_multi_value_get_number_of_values( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments ); PyObject *pyesedb_multi_value_get_value_data( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_multi_value_get_value_data_as_floating_point( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_multi_value_get_value_data_as_integer( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_multi_value_get_value_data_as_string( pyesedb_multi_value_t *pyesedb_multi_value, PyObject *arguments, PyObject *keywords ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_MULTI_VALUE_H ) */ libesedb-20240420/pyesedb/Makefile.am0000644000175000017500000000315414610730574020061 0ustar00lordyestalordyestaif HAVE_PYTHON AM_CFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBESEDB_DLL_IMPORT@ pyexec_LTLIBRARIES = pyesedb.la pyesedb_la_SOURCES = \ pyesedb.c pyesedb.h \ pyesedb_column.c pyesedb_column.h \ pyesedb_column_types.c pyesedb_column_types.h \ pyesedb_columns.c pyesedb_columns.h \ pyesedb_datetime.c pyesedb_datetime.h \ pyesedb_error.c pyesedb_error.h \ pyesedb_file.c pyesedb_file.h \ pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \ pyesedb_file_types.c pyesedb_file_types.h \ pyesedb_index.c pyesedb_index.h \ pyesedb_indexes.c pyesedb_indexes.h \ pyesedb_integer.c pyesedb_integer.h \ pyesedb_libbfio.h \ pyesedb_libcerror.h \ pyesedb_libclocale.h \ pyesedb_libesedb.h \ pyesedb_long_value.c pyesedb_long_value.h \ pyesedb_multi_value.c pyesedb_multi_value.h \ pyesedb_python.h \ pyesedb_record.c pyesedb_record.h \ pyesedb_records.c pyesedb_records.h \ pyesedb_table.c pyesedb_table.h \ pyesedb_tables.c pyesedb_tables.h \ pyesedb_unused.h \ pyesedb_value_flags.c pyesedb_value_flags.h pyesedb_la_LIBADD = \ @LIBCERROR_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCDATA_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ pyesedb_la_CPPFLAGS = $(PYTHON_CPPFLAGS) pyesedb_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) endif DISTCLEANFILES = \ Makefile \ Makefile.in libesedb-20240420/pyesedb/pyesedb_column_types.h0000644000175000017500000000316014610727251022425 0ustar00lordyestalordyesta/* * Python object definition of the libesedb column types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_COLUMN_TYPES_H ) #define _PYESEDB_COLUMN_TYPES_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_column_types pyesedb_column_types_t; struct pyesedb_column_types { /* Python object initialization */ PyObject_HEAD }; extern PyTypeObject pyesedb_column_types_type_object; int pyesedb_column_types_init_type( PyTypeObject *type_object ); PyObject *pyesedb_column_types_new( void ); int pyesedb_column_types_init( pyesedb_column_types_t *definitions_object ); void pyesedb_column_types_free( pyesedb_column_types_t *definitions_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_COLUMN_TYPES_H ) */ libesedb-20240420/pyesedb/pyesedb_datetime.c0000644000175000017500000004034114610727251021475 0ustar00lordyestalordyesta/* * Date and time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "pyesedb_datetime.h" #include "pyesedb_python.h" #include /* Creates a new datetime object from date and time elements * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_time_elements( uint16_t year, uint64_t number_of_days, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t micro_seconds ) { PyObject *datetime_object = NULL; static char *function = "pyesedb_datetime_new_from_time_elements"; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint8_t day_of_month = 0; uint8_t days_in_month = 0; uint8_t month = 0; while( number_of_days > 0 ) { if( ( year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( number_of_days <= days_in_century ) { break; } number_of_days -= days_in_century; year += 100; } while( number_of_days > 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( number_of_days <= days_in_year ) { break; } number_of_days -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( number_of_days > 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; } /* January (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: %" PRIu8 ".", function, month ); return( NULL ); } if( number_of_days <= days_in_month ) { break; } number_of_days -= days_in_month; month += 1; } /* Determine the day */ day_of_month = (uint8_t) number_of_days; PyDateTime_IMPORT; datetime_object = (PyObject *) PyDateTime_FromDateAndTime( (int) year, (int) month, (int) day_of_month, (int) hours, (int) minutes, (int) seconds, (int) micro_seconds ); return( datetime_object ); } /* Creates a new datetime object from a FAT date time * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_fat_date_time( uint32_t fat_date_time ) { PyObject *datetime_object = NULL; static char *function = "pyesedb_datetime_new_from_fat_date_time"; uint16_t year = 0; uint8_t day_of_month = 0; uint8_t days_in_month = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t month = 0; uint8_t seconds = 0; /* The day of month is stored in the next 5 bits */ day_of_month = fat_date_time & 0x1f; fat_date_time >>= 5; /* The month is stored in the next 4 bits */ month = fat_date_time & 0x0f; fat_date_time >>= 4; /* The year is stored in the next 7 bits starting at 1980 */ year = 1980 + ( fat_date_time & 0x7f ); fat_date_time >>= 7; /* The number of seconds are stored in the lower 5 bits * in intervals of 2 seconds */ seconds = ( fat_date_time & 0x1f ) * 2; fat_date_time >>= 5; /* The number of minutes are stored in the next 6 bits */ minutes = fat_date_time & 0x3f; fat_date_time >>= 6; /* The number of hours are stored in the next 5 bits */ hours = fat_date_time & 0x1f; /* 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; } /* January (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; } else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %" PRIu8 ".", function, month ); return( NULL ); } if( ( day_of_month == 0 ) || ( day_of_month > days_in_month ) ) { PyErr_Format( PyExc_IOError, "%s: unsupported day of month: %" PRIu8 ".", function, day_of_month ); return( NULL ); } PyDateTime_IMPORT; datetime_object = (PyObject *) PyDateTime_FromDateAndTime( (int) year, (int) month, (int) day_of_month, (int) hours, (int) minutes, (int) seconds, 0 ); return( datetime_object ); } /* Creates a new datetime object from a FILETIME * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_filetime( uint64_t filetime ) { PyObject *datetime_object = NULL; uint32_t micro_seconds = 0; uint16_t year = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t seconds = 0; /* The timestamp is in units of 100 nano seconds correct the value to seconds */ micro_seconds = (uint32_t) ( filetime % 10000000 ) / 10; filetime /= 10000000; /* There are 60 seconds in a minute correct the value to minutes */ seconds = (uint8_t) ( filetime % 60 ); filetime /= 60; /* There are 60 minutes in an hour correct the value to hours */ minutes = (uint8_t) ( filetime % 60 ); filetime /= 60; /* There are 24 hours in a day correct the value to days */ hours = (uint8_t) ( 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; } datetime_object = pyesedb_datetime_new_from_time_elements( year, filetime, hours, minutes, seconds, micro_seconds ); return( datetime_object ); } /* Creates a new datetime object from a floatingtime * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_floatingtime( uint64_t floatingtime ) { byte_stream_float64_t timestamp; PyObject *datetime_object = NULL; static char *function = "pyesedb_datetime_new_from_floatingtime"; uint32_t days_in_century = 0; uint32_t micro_seconds = 0; uint16_t days_in_year = 0; uint16_t year = 0; uint8_t day_of_month = 0; uint8_t days_in_month = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t month = 0; uint8_t seconds = 0; timestamp.integer = floatingtime; /* Determine the number of years starting at '30 Dec 1899 00:00:00' * correct the value to days within the year */ year = 1899; if( timestamp.floating_point >= 2 ) { year = 1900; timestamp.floating_point -= 2; } while( timestamp.floating_point > 0 ) { if( ( year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( timestamp.floating_point <= days_in_century ) { break; } timestamp.floating_point -= days_in_century; year += 100; } while( timestamp.floating_point > 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( timestamp.floating_point <= days_in_year ) { break; } timestamp.floating_point -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( timestamp.floating_point > 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; } /* January (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: %" PRIu8 ".", function, month ); return( NULL ); } if( timestamp.floating_point <= days_in_month ) { break; } timestamp.floating_point -= days_in_month; month += 1; } /* Determine the day */ day_of_month = (uint8_t) timestamp.floating_point; timestamp.floating_point -= day_of_month; /* There are 24 hours in a day correct the value to hours */ timestamp.floating_point *= 24; hours = (uint8_t) timestamp.floating_point; timestamp.floating_point -= hours; /* There are 60 minutes in an hour correct the value to minutes */ timestamp.floating_point *= 60; minutes = (uint8_t) timestamp.floating_point; timestamp.floating_point -= minutes; /* There are 60 seconds in a minute correct the value to seconds */ timestamp.floating_point *= 60; seconds = (uint8_t) timestamp.floating_point; timestamp.floating_point -= seconds; /* There are 1000 micro seconds in a seconds correct the value to micro seconds */ timestamp.floating_point *= 1000000; micro_seconds = (uint8_t) timestamp.floating_point; timestamp.floating_point -= micro_seconds; PyDateTime_IMPORT; datetime_object = (PyObject *) PyDateTime_FromDateAndTime( (int) year, (int) month, (int) day_of_month, (int) hours, (int) minutes, (int) seconds, (int) micro_seconds ); return( datetime_object ); } /* Creates a new datetime object from a HFS time * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_hfs_time( uint32_t hfs_time ) { PyObject *datetime_object = NULL; uint16_t year = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t seconds = 0; /* There are 60 seconds in a minute correct the value to minutes */ seconds = (uint8_t) ( hfs_time % 60 ); hfs_time /= 60; /* There are 60 minutes in an hour correct the value to hours */ minutes = (uint8_t) ( hfs_time % 60 ); hfs_time /= 60; /* There are 24 hours in a day correct the value to days */ hours = (uint8_t) ( hfs_time % 24 ); hfs_time /= 24; /* Add 1 day to compensate that Jan 1 1904 is represented as 0 */ hfs_time += 1; /* Determine the number of years starting at '1 Jan 1904 00:00:00' * correct the value to days within the year */ year = 1904; if( hfs_time >= 35064 ) { year = 2000; hfs_time -= 35064; } datetime_object = pyesedb_datetime_new_from_time_elements( year, (uint64_t) hfs_time, hours, minutes, seconds, 0 ); return( datetime_object ); } /* Creates a new datetime object from a POSIX time * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_posix_time( int64_t posix_time ) { PyObject *datetime_object = NULL; uint16_t year = 0; uint8_t hours = 0; uint8_t minutes = 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; } datetime_object = pyesedb_datetime_new_from_time_elements( year, (uint64_t) posix_time, hours, minutes, seconds, 0 ); return( datetime_object ); } /* Creates a new datetime object from a POSIX time in micro seconds * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_datetime_new_from_posix_time_in_micro_seconds( int64_t posix_time ) { PyObject *datetime_object = NULL; uint32_t micro_seconds = 0; uint16_t year = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t seconds = 0; /* There are 1000000 micro seconds in a second correct the value to seconds */ micro_seconds = (uint32_t) ( posix_time % 1000000 ); posix_time /= 1000000; /* 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 1970 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; } datetime_object = pyesedb_datetime_new_from_time_elements( year, (uint64_t) posix_time, hours, minutes, seconds, micro_seconds ); return( datetime_object ); } libesedb-20240420/pyesedb/pyesedb_file_types.c0000644000175000017500000001262414610727251022047 0ustar00lordyestalordyesta/* * Python object definition of the libesedb file types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_file_types.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" PyTypeObject pyesedb_file_types_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.file_types", /* tp_basicsize */ sizeof( pyesedb_file_types_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_file_types_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 */ "pyesedb file types object (wraps LIBESEDB_FILE_TYPES)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* 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) pyesedb_file_types_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 }; /* Initializes the type object * Returns 1 if successful or -1 on error */ int pyesedb_file_types_init_type( PyTypeObject *type_object ) { PyObject *value_object = NULL; if( type_object == NULL ) { return( -1 ); } type_object->tp_dict = PyDict_New(); if( type_object->tp_dict == NULL ) { return( -1 ); } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_FILE_TYPE_DATABASE ); #else value_object = PyInt_FromLong( LIBESEDB_FILE_TYPE_DATABASE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "DATABASE", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_FILE_TYPE_STREAMING_FILE ); #else value_object = PyInt_FromLong( LIBESEDB_FILE_TYPE_STREAMING_FILE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "STREAMING_FILE", value_object ) != 0 ) { goto on_error; } return( 1 ); on_error: if( type_object->tp_dict != NULL ) { Py_DecRef( type_object->tp_dict ); type_object->tp_dict = NULL; } return( -1 ); } /* Creates a new file types object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_types_new( void ) { pyesedb_file_types_t *definitions_object = NULL; static char *function = "pyesedb_file_types_new"; definitions_object = PyObject_New( struct pyesedb_file_types, &pyesedb_file_types_type_object ); if( definitions_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create definitions object.", function ); goto on_error; } if( pyesedb_file_types_init( definitions_object ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize definitions object.", function ); goto on_error; } return( (PyObject *) definitions_object ); on_error: if( definitions_object != NULL ) { Py_DecRef( (PyObject *) definitions_object ); } return( NULL ); } /* Initializes a file types object * Returns 0 if successful or -1 on error */ int pyesedb_file_types_init( pyesedb_file_types_t *definitions_object ) { static char *function = "pyesedb_file_types_init"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return( -1 ); } return( 0 ); } /* Frees a file types object */ void pyesedb_file_types_free( pyesedb_file_types_t *definitions_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_file_types_free"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return; } ob_type = Py_TYPE( definitions_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } ob_type->tp_free( (PyObject*) definitions_object ); } libesedb-20240420/pyesedb/pyesedb_file.h0000644000175000017500000000670714610727625020642 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_file_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_FILE_H ) #define _PYESEDB_FILE_H #include #include #include "pyesedb_libbfio.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_file pyesedb_file_t; struct pyesedb_file { /* Python object initialization */ PyObject_HEAD /* The libesedb file */ libesedb_file_t *file; /* The libbfio file IO handle */ libbfio_handle_t *file_io_handle; }; extern PyMethodDef pyesedb_file_object_methods[]; extern PyTypeObject pyesedb_file_type_object; PyObject *pyesedb_file_new( void ); PyObject *pyesedb_file_new_open( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_file_new_open_file_object( PyObject *self, PyObject *arguments, PyObject *keywords ); int pyesedb_file_init( pyesedb_file_t *pyesedb_file ); void pyesedb_file_free( pyesedb_file_t *pyesedb_file ); PyObject *pyesedb_file_signal_abort( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_open( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_file_open_file_object( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_file_close( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_type( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_format_version( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_creation_format_version( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_page_size( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_number_of_tables( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_table_by_index( PyObject *pyesedb_file, int table_index ); PyObject *pyesedb_file_get_table( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_file_get_tables( pyesedb_file_t *pyesedb_file, PyObject *arguments ); PyObject *pyesedb_file_get_table_by_name( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_FILE_H ) */ libesedb-20240420/pyesedb/pyesedb_python.h0000644000175000017500000000376114610727251021234 0ustar00lordyestalordyesta/* * The python header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_PYTHON_H ) #define _PYESEDB_PYTHON_H #include #if PY_MAJOR_VERSION < 3 /* Fix defines in pyconfig.h */ #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE /* Fix defines in pyport.h */ #undef HAVE_FSTAT #undef HAVE_STAT #undef HAVE_SSIZE_T #undef HAVE_INT32_T #undef HAVE_UINT32_T #undef HAVE_INT64_T #undef HAVE_UINT64_T #endif /* PY_MAJOR_VERSION < 3 */ /* Define PY_SSIZE_T_CLEAN to silence: * DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats * * PY_SSIZE_T_CLEAN was introduced in Python 2.5 */ #define PY_SSIZE_T_CLEAN #include /* Python compatibility macros */ #if !defined( PyMODINIT_FUNC ) #if PY_MAJOR_VERSION >= 3 #define PyMODINIT_FUNC PyObject * #else #define PyMODINIT_FUNC void #endif #endif /* !defined( PyMODINIT_FUNC ) */ #if !defined( PyVarObject_HEAD_INIT ) #define PyVarObject_HEAD_INIT( type, size ) \ PyObject_HEAD_INIT( type ) \ size, #endif /* !defined( PyVarObject_HEAD_INIT ) */ #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_HAVE_ITER 0 #endif #if !defined( Py_TYPE ) #define Py_TYPE( object ) \ ( ( (PyObject *) object )->ob_type ) #endif /* !defined( Py_TYPE ) */ #endif /* !defined( _PYESEDB_PYTHON_H ) */ libesedb-20240420/pyesedb/pyesedb_columns.c0000644000175000017500000002166714610727251021373 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of columns * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_column.h" #include "pyesedb_columns.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" PySequenceMethods pyesedb_columns_sequence_methods = { /* sq_length */ (lenfunc) pyesedb_columns_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyesedb_columns_getitem, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ 0, /* sq_contains */ 0, /* sq_inplace_concat */ 0, /* sq_inplace_repeat */ 0 }; PyTypeObject pyesedb_columns_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.columns", /* tp_basicsize */ sizeof( pyesedb_columns_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_columns_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyesedb_columns_sequence_methods, /* 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 | Py_TPFLAGS_HAVE_ITER, /* tp_doc */ "pyesedb sequence and iterator object of columns", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyesedb_columns_iter, /* tp_iternext */ (iternextfunc) pyesedb_columns_iternext, /* tp_methods */ 0, /* 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) pyesedb_columns_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 columns sequence and iterator object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_columns_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyesedb_columns_t *sequence_object = NULL; static char *function = "pyesedb_columns_new"; if( parent_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid parent object.", function ); return( NULL ); } if( get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid get item by index function.", function ); return( NULL ); } /* Make sure the columns values are initialized */ sequence_object = PyObject_New( struct pyesedb_columns, &pyesedb_columns_type_object ); if( sequence_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create sequence object.", function ); goto on_error; } sequence_object->parent_object = parent_object; sequence_object->get_item_by_index = get_item_by_index; sequence_object->current_index = 0; sequence_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) sequence_object->parent_object ); return( (PyObject *) sequence_object ); on_error: if( sequence_object != NULL ) { Py_DecRef( (PyObject *) sequence_object ); } return( NULL ); } /* Initializes a columns sequence and iterator object * Returns 0 if successful or -1 on error */ int pyesedb_columns_init( pyesedb_columns_t *sequence_object ) { static char *function = "pyesedb_columns_init"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } /* Make sure the columns values are initialized */ sequence_object->parent_object = NULL; sequence_object->get_item_by_index = NULL; sequence_object->current_index = 0; sequence_object->number_of_items = 0; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of columns not supported.", function ); return( -1 ); } /* Frees a columns sequence object */ void pyesedb_columns_free( pyesedb_columns_t *sequence_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_columns_free"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return; } ob_type = Py_TYPE( sequence_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( sequence_object->parent_object != NULL ) { Py_DecRef( (PyObject *) sequence_object->parent_object ); } ob_type->tp_free( (PyObject*) sequence_object ); } /* The columns len() function */ Py_ssize_t pyesedb_columns_len( pyesedb_columns_t *sequence_object ) { static char *function = "pyesedb_columns_len"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } return( (Py_ssize_t) sequence_object->number_of_items ); } /* The columns getitem() function */ PyObject *pyesedb_columns_getitem( pyesedb_columns_t *sequence_object, Py_ssize_t item_index ) { PyObject *column_object = NULL; static char *function = "pyesedb_columns_getitem"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } column_object = sequence_object->get_item_by_index( sequence_object->parent_object, (int) item_index ); return( column_object ); } /* The columns iter() function */ PyObject *pyesedb_columns_iter( pyesedb_columns_t *sequence_object ) { static char *function = "pyesedb_columns_iter"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } Py_IncRef( (PyObject *) sequence_object ); return( (PyObject *) sequence_object ); } /* The columns iternext() function */ PyObject *pyesedb_columns_iternext( pyesedb_columns_t *sequence_object ) { PyObject *column_object = NULL; static char *function = "pyesedb_columns_iternext"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid current index.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( sequence_object->current_index >= sequence_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } column_object = sequence_object->get_item_by_index( sequence_object->parent_object, sequence_object->current_index ); if( column_object != NULL ) { sequence_object->current_index++; } return( column_object ); } libesedb-20240420/pyesedb/pyesedb_long_value.h0000644000175000017500000000400714610727625022045 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_long_value_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_LONG_VALUE_H ) #define _PYESEDB_LONG_VALUE_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_long_value pyesedb_long_value_t; struct pyesedb_long_value { /* Python object initialization */ PyObject_HEAD /* The libesedb long value */ libesedb_long_value_t *long_value; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_long_value_object_methods[]; extern PyTypeObject pyesedb_long_value_type_object; PyObject *pyesedb_long_value_new( libesedb_long_value_t *long_value, PyObject *parent_object ); int pyesedb_long_value_init( pyesedb_long_value_t *pyesedb_long_value ); void pyesedb_long_value_free( pyesedb_long_value_t *pyesedb_long_value ); PyObject *pyesedb_long_value_get_data( pyesedb_long_value_t *pyesedb_long_value, PyObject *arguments ); PyObject *pyesedb_long_value_get_data_as_string( pyesedb_long_value_t *pyesedb_long_value, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_LONG_VALUE_H ) */ libesedb-20240420/pyesedb/pyesedb_error.c0000644000175000017500000002251214610727251021032 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 "pyesedb_error.h" #include "pyesedb_libcerror.h" #include "pyesedb_python.h" #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 /* Fetches an error */ void VARARGS( pyesedb_error_fetch, libcerror_error_t **error, int error_domain, int error_code, const char *, format_string ) { va_list argument_list; char error_string[ PYESEDB_ERROR_STRING_SIZE ]; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *string_object = NULL; static char *function = "pyesedb_error_fetch"; char *exception_string = NULL; size_t error_string_length = 0; int print_count = 0; #if PY_MAJOR_VERSION >= 3 PyObject *utf8_string_object = NULL; #endif if( format_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing format string.", function ); return; } VASTART( argument_list, const char *, format_string ); print_count = PyOS_vsnprintf( error_string, PYESEDB_ERROR_STRING_SIZE, format_string, argument_list ); VAEND( argument_list ); if( print_count < 0 ) { PyErr_Format( PyExc_ValueError, "%s: unable to format error string.", function ); return; } error_string_length = narrow_string_length( error_string ); if( ( error_string_length >= 1 ) && ( error_string[ error_string_length - 1 ] == '.' ) ) { error_string[ error_string_length - 1 ] = 0; } PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); string_object = PyObject_Repr( exception_value ); #if PY_MAJOR_VERSION >= 3 utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object != NULL ) { exception_string = PyBytes_AsString( utf8_string_object ); } #else exception_string = PyString_AsString( string_object ); #endif if( exception_string != NULL ) { libcerror_error_set( error, error_domain, error_code, "%s with error: %s.", error_string, exception_string ); } else { libcerror_error_set( error, error_domain, error_code, "%s.", error_string ); } #if PY_MAJOR_VERSION >= 3 if( utf8_string_object != NULL ) { Py_DecRef( utf8_string_object ); } #endif Py_DecRef( string_object ); return; } #undef VARARGS #undef VASTART #undef VAEND #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, exception_object, type, argument ) \ function( exception_object, 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, exception_object, type, argument ) \ function( exception_object, 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 /* Fetches and raises an error */ void VARARGS( pyesedb_error_fetch_and_raise, PyObject *exception_object, const char *, format_string ) { va_list argument_list; char error_string[ PYESEDB_ERROR_STRING_SIZE ]; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *string_object = NULL; static char *function = "pyesedb_error_fetch_and_raise"; char *exception_string = NULL; size_t error_string_length = 0; int print_count = 0; #if PY_MAJOR_VERSION >= 3 PyObject *utf8_string_object = NULL; #endif if( format_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing format string.", function ); return; } VASTART( argument_list, const char *, format_string ); print_count = PyOS_vsnprintf( error_string, PYESEDB_ERROR_STRING_SIZE, format_string, argument_list ); VAEND( argument_list ); if( print_count < 0 ) { PyErr_Format( PyExc_ValueError, "%s: unable to format exception string.", function ); return; } error_string_length = narrow_string_length( error_string ); if( ( error_string_length >= 1 ) && ( error_string[ error_string_length - 1 ] == '.' ) ) { error_string[ error_string_length - 1 ] = 0; } PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); string_object = PyObject_Repr( exception_value ); #if PY_MAJOR_VERSION >= 3 utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object != NULL ) { exception_string = PyBytes_AsString( utf8_string_object ); } #else exception_string = PyString_AsString( string_object ); #endif if( exception_string != NULL ) { PyErr_Format( exception_object, "%s with error: %s.", error_string, exception_string ); } else { PyErr_Format( exception_object, "%s.", error_string ); } Py_DecRef( string_object ); return; } #undef VARARGS #undef VASTART #undef VAEND #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, error, exception_object, type, argument ) \ function( error, exception_object, 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, exception_object, type, argument ) \ function( error, exception_object, 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 /* Raises an error */ void VARARGS( pyesedb_error_raise, libcerror_error_t *error, PyObject *exception_object, const char *, format_string ) { va_list argument_list; char error_string[ PYESEDB_ERROR_STRING_SIZE ]; char exception_string[ PYESEDB_ERROR_STRING_SIZE ]; static char *function = "pyesedb_error_raise"; size_t error_string_index = 0; int print_count = 0; if( format_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing format string.", function ); return; } VASTART( argument_list, const char *, format_string ); print_count = PyOS_vsnprintf( exception_string, PYESEDB_ERROR_STRING_SIZE, format_string, argument_list ); VAEND( argument_list ); if( print_count < 0 ) { PyErr_Format( PyExc_ValueError, "%s: unable to format exception string.", function ); return; } if( error != NULL ) { if( libcerror_error_backtrace_sprint( error, error_string, PYESEDB_ERROR_STRING_SIZE ) != -1 ) { while( error_string_index < PYESEDB_ERROR_STRING_SIZE ) { if( error_string[ error_string_index ] == 0 ) { break; } if( ( error_string[ error_string_index ] == '\n' ) || ( error_string[ error_string_index ] == '\r' ) ) { error_string[ error_string_index ] = ' '; } error_string_index++; } if( error_string_index >= PYESEDB_ERROR_STRING_SIZE ) { error_string[ PYESEDB_ERROR_STRING_SIZE - 1 ] = 0; } PyErr_Format( exception_object, "%s %s", exception_string, error_string ); return; } } PyErr_Format( exception_object, "%s", exception_string ); return; } #undef VARARGS #undef VASTART #undef VAEND libesedb-20240420/pyesedb/pyesedb_integer.h0000644000175000017500000000301014610727251021333 0ustar00lordyestalordyesta/* * Integer functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_INTEGER_H ) #define _PYESEDB_INTEGER_H #include #include #include "pyesedb_libcerror.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyesedb_integer_signed_new_from_64bit( int64_t value_64bit ); PyObject *pyesedb_integer_unsigned_new_from_64bit( uint64_t value_64bit ); int pyesedb_integer_signed_copy_to_64bit( PyObject *integer_object, int64_t *value_64bit, libcerror_error_t **error ); int pyesedb_integer_unsigned_copy_to_64bit( PyObject *integer_object, uint64_t *value_64bit, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_INTEGER_H ) */ libesedb-20240420/pyesedb/pyesedb.h0000644000175000017500000000350414610727251017626 0ustar00lordyestalordyesta/* * Python bindings module for libesedb (pyesedb) * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_H ) #define _PYESEDB_H #include #include #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyesedb_get_version( PyObject *self, PyObject *arguments ); PyObject *pyesedb_check_file_signature( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_check_file_signature_file_object( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_open_new_file( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_open_new_file_with_file_object( PyObject *self, PyObject *arguments, PyObject *keywords ); #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_pyesedb( void ); #else PyMODINIT_FUNC initpyesedb( void ); #endif #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_H ) */ libesedb-20240420/pyesedb/pyesedb_integer.c0000644000175000017500000002125414610727251021340 0ustar00lordyestalordyesta/* * Integer functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "pyesedb_error.h" #include "pyesedb_libcerror.h" #include "pyesedb_integer.h" #include "pyesedb_python.h" /* Creates a new signed integer object from a 64-bit value * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_integer_signed_new_from_64bit( int64_t value_64bit ) { PyObject *integer_object = NULL; static char *function = "pyesedb_integer_signed_new_from_64bit"; #if defined( HAVE_LONG_LONG ) if( ( value_64bit < (int64_t) LLONG_MIN ) || ( value_64bit > (int64_t) LLONG_MAX ) ) { PyErr_Format( PyExc_OverflowError, "%s: 64-bit value out of bounds.", function ); return( NULL ); } integer_object = PyLong_FromLongLong( (long long) value_64bit ); #else if( current_offset > (off64_t) LONG_MAX ) { PyErr_Format( PyExc_OverflowError, "%s: 64-bit value out of bounds.", function ); return( NULL ); } integer_object = PyLong_FromLong( (long) value_64bit ); #endif return( integer_object ); } /* Creates a new unsigned integer object from a 64-bit value * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_integer_unsigned_new_from_64bit( uint64_t value_64bit ) { PyObject *integer_object = NULL; static char *function = "pyesedb_integer_unsigned_new_from_64bit"; #if defined( HAVE_LONG_LONG ) if( value_64bit > (uint64_t) ULLONG_MAX ) { PyErr_Format( PyExc_OverflowError, "%s: 64-bit value exceeds maximum.", function ); return( NULL ); } integer_object = PyLong_FromUnsignedLongLong( (long long) value_64bit ); #else if( value_64bit > (uint64_t) ULONG_MAX ) { PyErr_Format( PyExc_OverflowError, "%s: 64-bit value exceeds maximum.", function ); return( NULL ); } integer_object = PyLong_FromUnsignedLong( (long) value_64bit ); #endif return( integer_object ); } /* Copies a Python int or long object to a signed 64-bit value * Returns 1 if successful or -1 on error */ int pyesedb_integer_signed_copy_to_64bit( PyObject *integer_object, int64_t *value_64bit, libcerror_error_t **error ) { static char *function = "pyesedb_integer_signed_copy_to_64bit"; int result = 0; #if defined( HAVE_LONG_LONG ) PY_LONG_LONG long_value = 0; #else long long_value = 0; #endif if( integer_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer object.", function ); return( -1 ); } PyErr_Clear(); result = PyObject_IsInstance( integer_object, (PyObject *) &PyLong_Type ); if( result == -1 ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if integer object is of type long.", function ); return( -1 ); } else if( result != 0 ) { PyErr_Clear(); #if defined( HAVE_LONG_LONG ) long_value = PyLong_AsLongLong( integer_object ); #else long_value = PyLong_AsLong( integer_object ); #endif } #if PY_MAJOR_VERSION < 3 if( result == 0 ) { PyErr_Clear(); result = PyObject_IsInstance( integer_object, (PyObject *) &PyInt_Type ); if( result == -1 ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if integer object is of type int.", function ); return( -1 ); } else if( result != 0 ) { PyErr_Clear(); long_value = PyInt_AsLong( integer_object ); } } #endif /* PY_MAJOR_VERSION < 3 */ if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unsupported integer object type.", function ); return( -1 ); } if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to convert integer object to long.", function ); return( -1 ); } #if defined( HAVE_LONG_LONG ) && ( SIZEOF_LONG_LONG > 8 ) if( ( long_value < (PY_LONG_LONG) INT64_MIN ) || ( long_value > (PY_LONG_LONG) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid long value out of bounds.", function ); return( -1 ); } #elif ( SIZEOF_LONG > 8 ) if( ( long_value > (long) INT64_MIN ) || ( long_value > (long) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid long value out of bounds.", function ); return( -1 ); } #endif *value_64bit = (int64_t) long_value; return( 1 ); } /* Copies a Python int or long object to an unsigned 64-bit value * Returns 1 if successful or -1 on error */ int pyesedb_integer_unsigned_copy_to_64bit( PyObject *integer_object, uint64_t *value_64bit, libcerror_error_t **error ) { static char *function = "pyesedb_integer_unsigned_copy_to_64bit"; int result = 0; #if defined( HAVE_LONG_LONG ) PY_LONG_LONG long_value = 0; #else long long_value = 0; #endif if( integer_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer object.", function ); return( -1 ); } PyErr_Clear(); result = PyObject_IsInstance( integer_object, (PyObject *) &PyLong_Type ); if( result == -1 ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if integer object is of type long.", function ); return( -1 ); } else if( result != 0 ) { PyErr_Clear(); #if defined( HAVE_LONG_LONG ) long_value = PyLong_AsUnsignedLongLong( integer_object ); #else long_value = PyLong_AsUnsignedLong( integer_object ); #endif } #if PY_MAJOR_VERSION < 3 if( result == 0 ) { PyErr_Clear(); result = PyObject_IsInstance( integer_object, (PyObject *) &PyInt_Type ); if( result == -1 ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if integer object is of type int.", function ); return( -1 ); } else if( result != 0 ) { PyErr_Clear(); #if defined( HAVE_LONG_LONG ) long_value = PyInt_AsUnsignedLongLongMask( integer_object ); #else long_value = PyInt_AsUnsignedLongMask( integer_object ); #endif } } #endif /* PY_MAJOR_VERSION < 3 */ if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unsupported integer object type.", function ); return( -1 ); } if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to convert integer object to long.", function ); return( -1 ); } #if defined( HAVE_LONG_LONG ) #if ( SIZEOF_LONG_LONG > 8 ) if( ( long_value < (PY_LONG_LONG) 0 ) || ( long_value > (PY_LONG_LONG) UINT64_MAX ) ) #else if( long_value < (PY_LONG_LONG) 0 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid long value out of bounds.", function ); return( -1 ); } #else #if ( SIZEOF_LONG > 8 ) if( ( long_value < (long) 0 ) || ( long_value > (long) UINT64_MAX ) ) #else if( long_value < (PY_LONG_LONG) 0 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid long value out of bounds.", function ); return( -1 ); } #endif *value_64bit = (uint64_t) long_value; return( 1 ); } libesedb-20240420/pyesedb/pyesedb_libesedb.h0000644000175000017500000000171514610727251021461 0ustar00lordyestalordyesta/* * The internal libesedb header * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_LIBESEDB_H ) #define _PYESEDB_LIBESEDB_H #include #include #endif /* !defined( _PYESEDB_LIBESEDB_H ) */ libesedb-20240420/pyesedb/pyesedb_indexes.c0000644000175000017500000002165314610727251021345 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of indexes * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_index.h" #include "pyesedb_indexes.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" PySequenceMethods pyesedb_indexes_sequence_methods = { /* sq_length */ (lenfunc) pyesedb_indexes_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyesedb_indexes_getitem, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ 0, /* sq_contains */ 0, /* sq_inplace_concat */ 0, /* sq_inplace_repeat */ 0 }; PyTypeObject pyesedb_indexes_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.indexes", /* tp_basicsize */ sizeof( pyesedb_indexes_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_indexes_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyesedb_indexes_sequence_methods, /* 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 | Py_TPFLAGS_HAVE_ITER, /* tp_doc */ "pyesedb sequence and iterator object of indexes", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyesedb_indexes_iter, /* tp_iternext */ (iternextfunc) pyesedb_indexes_iternext, /* tp_methods */ 0, /* 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) pyesedb_indexes_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 indexes sequence and iterator object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_indexes_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyesedb_indexes_t *sequence_object = NULL; static char *function = "pyesedb_indexes_new"; if( parent_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid parent object.", function ); return( NULL ); } if( get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid get item by index function.", function ); return( NULL ); } /* Make sure the indexes values are initialized */ sequence_object = PyObject_New( struct pyesedb_indexes, &pyesedb_indexes_type_object ); if( sequence_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create sequence object.", function ); goto on_error; } sequence_object->parent_object = parent_object; sequence_object->get_item_by_index = get_item_by_index; sequence_object->current_index = 0; sequence_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) sequence_object->parent_object ); return( (PyObject *) sequence_object ); on_error: if( sequence_object != NULL ) { Py_DecRef( (PyObject *) sequence_object ); } return( NULL ); } /* Initializes an indexes sequence and iterator object * Returns 0 if successful or -1 on error */ int pyesedb_indexes_init( pyesedb_indexes_t *sequence_object ) { static char *function = "pyesedb_indexes_init"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } /* Make sure the indexes values are initialized */ sequence_object->parent_object = NULL; sequence_object->get_item_by_index = NULL; sequence_object->current_index = 0; sequence_object->number_of_items = 0; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of indexes not supported.", function ); return( -1 ); } /* Frees an indexes sequence object */ void pyesedb_indexes_free( pyesedb_indexes_t *sequence_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_indexes_free"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return; } ob_type = Py_TYPE( sequence_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( sequence_object->parent_object != NULL ) { Py_DecRef( (PyObject *) sequence_object->parent_object ); } ob_type->tp_free( (PyObject*) sequence_object ); } /* The indexes len() function */ Py_ssize_t pyesedb_indexes_len( pyesedb_indexes_t *sequence_object ) { static char *function = "pyesedb_indexes_len"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } return( (Py_ssize_t) sequence_object->number_of_items ); } /* The indexes getitem() function */ PyObject *pyesedb_indexes_getitem( pyesedb_indexes_t *sequence_object, Py_ssize_t item_index ) { PyObject *index_object = NULL; static char *function = "pyesedb_indexes_getitem"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } index_object = sequence_object->get_item_by_index( sequence_object->parent_object, (int) item_index ); return( index_object ); } /* The indexes iter() function */ PyObject *pyesedb_indexes_iter( pyesedb_indexes_t *sequence_object ) { static char *function = "pyesedb_indexes_iter"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } Py_IncRef( (PyObject *) sequence_object ); return( (PyObject *) sequence_object ); } /* The indexes iternext() function */ PyObject *pyesedb_indexes_iternext( pyesedb_indexes_t *sequence_object ) { PyObject *index_object = NULL; static char *function = "pyesedb_indexes_iternext"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid current index.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( sequence_object->current_index >= sequence_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } index_object = sequence_object->get_item_by_index( sequence_object->parent_object, sequence_object->current_index ); if( index_object != NULL ) { sequence_object->current_index++; } return( index_object ); } libesedb-20240420/pyesedb/pyesedb_record.c0000644000175000017500000010255014610727625021165 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_record_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_error.h" #include "pyesedb_integer.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_long_value.h" #include "pyesedb_python.h" #include "pyesedb_record.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_record_object_methods[] = { /* Functions to access the record values */ { "get_number_of_values", (PyCFunction) pyesedb_record_get_number_of_values, METH_NOARGS, "get_number_of_values() -> Integer\n" "\n" "Retrieves the number of values" }, { "get_column_type", (PyCFunction) pyesedb_record_get_column_type, METH_VARARGS | METH_KEYWORDS, "get_column_type(value_entry) -> Integer\n" "\n" "Retrieves the column type." }, { "get_column_name", (PyCFunction) pyesedb_record_get_column_name, METH_VARARGS | METH_KEYWORDS, "get_column_name(value_entry) -> Unicode string\n" "\n" "Retrieves the column name." }, { "get_value_data_flags", (PyCFunction) pyesedb_record_get_value_data_flags, METH_VARARGS | METH_KEYWORDS, "get_value_data(value_entry) -> Integer\n" "\n" "Retrieves the value data flags." }, { "is_long_value", (PyCFunction) pyesedb_record_is_long_value, METH_VARARGS | METH_KEYWORDS, "is_long_value(value_entry) -> Boolean\n" "\n" "Determines if the value is a long value." }, { "is_multi_value", (PyCFunction) pyesedb_record_is_multi_value, METH_VARARGS | METH_KEYWORDS, "is_multi_value(value_entry) -> Boolean\n" "\n" "Determines if the value is a multi value." }, { "get_value_data", (PyCFunction) pyesedb_record_get_value_data, METH_VARARGS | METH_KEYWORDS, "get_value_data(value_entry) -> String or None\n" "\n" "Retrieves the value data as a binary string." }, { "get_value_data_as_boolean", (PyCFunction) pyesedb_record_get_value_data_as_boolean, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_boolean(value_entry) -> Boolean or None\n" "\n" "Retrieves the value data as a boolean." }, { "get_value_data_as_floating_point", (PyCFunction) pyesedb_record_get_value_data_as_floating_point, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_floating_point(value_entry) -> Float or None\n" "\n" "Retrieves the value data as a floating point." }, { "get_value_data_as_integer", (PyCFunction) pyesedb_record_get_value_data_as_integer, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_integer(value_entry) -> Integer or None\n" "\n" "Retrieves the value data as an integer." }, { "get_value_data_as_string", (PyCFunction) pyesedb_record_get_value_data_as_string, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_string(value_entry) -> Unicode string or None\n" "\n" "Retrieves the value data as a string." }, { "get_value_data_as_long_value", (PyCFunction) pyesedb_record_get_value_data_as_long_value, METH_VARARGS | METH_KEYWORDS, "get_value_data_as_long_value(value_entry) -> pyesedb.long_value or None\n" "\n" "Retrieves the value data as a long value." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_record_object_get_set_definitions[] = { { "number_of_values", (getter) pyesedb_record_get_number_of_values, (setter) 0, "The number of values", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_record_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.record", /* tp_basicsize */ sizeof( pyesedb_record_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_record_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 */ "pyesedb record object (wraps libesedb_record_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_record_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_record_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_record_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 record object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_new( libesedb_record_t *record, PyObject *parent_object ) { pyesedb_record_t *pyesedb_record = NULL; static char *function = "pyesedb_record_new"; if( record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_record = PyObject_New( struct pyesedb_record, &pyesedb_record_type_object ); if( pyesedb_record == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize record.", function ); goto on_error; } pyesedb_record->record = record; pyesedb_record->parent_object = parent_object; if( pyesedb_record->parent_object != NULL ) { Py_IncRef( pyesedb_record->parent_object ); } return( (PyObject *) pyesedb_record ); on_error: if( pyesedb_record != NULL ) { Py_DecRef( (PyObject *) pyesedb_record ); } return( NULL ); } /* Initializes a record object * Returns 0 if successful or -1 on error */ int pyesedb_record_init( pyesedb_record_t *pyesedb_record ) { static char *function = "pyesedb_record_init"; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return( -1 ); } /* Make sure libesedb record is set to NULL */ pyesedb_record->record = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of record not supported.", function ); return( -1 ); } /* Frees a record object */ void pyesedb_record_free( pyesedb_record_t *pyesedb_record ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_record_free"; int result = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid record.", function ); return; } ob_type = Py_TYPE( pyesedb_record ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_record->record != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_record_free( &( pyesedb_record->record ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb record.", function ); libcerror_error_free( &error ); } } if( pyesedb_record->parent_object != NULL ) { Py_DecRef( pyesedb_record->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_record ); } /* Retrieves the number of values * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_number_of_values( pyesedb_record_t *pyesedb_record, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_record_get_number_of_values"; int number_of_values = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_number_of_values( pyesedb_record->record, &number_of_values, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of values.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_values ); #else integer_object = PyInt_FromLong( (long) number_of_values ); #endif return( integer_object ); } /* Retrieves the column type * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_column_type( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_record_get_column_type"; static char *keyword_list[] = { "value_entry", NULL }; uint32_t column_type = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_column_type( pyesedb_record->record, value_entry, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column type: %d.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( (uint64_t) column_type ); return( integer_object ); } /* Retrieves the column name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_column_name( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *column_name = NULL; static char *function = "pyesedb_record_get_column_name"; static char *keyword_list[] = { "value_entry", NULL }; size_t column_name_size = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_utf8_column_name_size( pyesedb_record->record, value_entry, &column_name_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column name: %d size.", function, value_entry ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( column_name_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } column_name = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * column_name_size ); if( column_name == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create column name: %d.", function, value_entry ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_utf8_column_name( pyesedb_record->record, value_entry, column_name, column_name_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data.", function, value_entry ); 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 *) column_name, (Py_ssize_t) column_name_size - 1, NULL ); PyMem_Free( column_name ); return( string_object ); on_error: if( column_name != NULL ) { PyMem_Free( column_name ); } return( NULL ); } /* Retrieves the value data flags * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_flags( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_record_get_value_data_flags"; static char *keyword_list[] = { "value_entry", NULL }; uint8_t value_data_flags = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_data_flags( pyesedb_record->record, value_entry, &value_data_flags, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data flags.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( (uint64_t) value_data_flags ); return( integer_object ); } /* Determines if a specific entry is a long value * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_is_long_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_record_is_long_value"; static char *keyword_list[] = { "value_entry", NULL }; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_is_long_value( pyesedb_record->record, value_entry, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to determine if value: %d is a long value.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } else if( result != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); } /* Determines if a specific entry is a multi value * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_is_multi_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_record_is_multi_value"; static char *keyword_list[] = { "value_entry", NULL }; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_is_multi_value( pyesedb_record->record, value_entry, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to determine if value: %d is a multi value.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } else if( result != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); } /* Retrieves the value data * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *value_data = NULL; static char *function = "pyesedb_record_get_value_data"; static char *keyword_list[] = { "value_entry", NULL }; size_t value_data_size = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_data_size( pyesedb_record->record, value_entry, &value_data_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data size.", function, value_entry ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_data_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_data = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * value_data_size ); if( value_data == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create value: %d data.", function, value_entry ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_data( pyesedb_record->record, value_entry, value_data, value_data_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d data.", function, value_entry ); libcerror_error_free( &error ); goto on_error; } #if PY_MAJOR_VERSION >= 3 string_object = PyBytes_FromStringAndSize( (char *) value_data, (Py_ssize_t) value_data_size ); #else string_object = PyString_FromStringAndSize( (char *) value_data, (Py_ssize_t) value_data_size ); #endif PyMem_Free( value_data ); return( string_object ); on_error: if( value_data != NULL ) { PyMem_Free( value_data ); } return( NULL ); } /* Retrieves the value data represented as a boolean * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_as_boolean( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_record_get_value_data_as_boolean"; static char *keyword_list[] = { "value_entry", NULL }; uint32_t column_type = 0; uint8_t value_8bit = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_column_type( pyesedb_record->record, value_entry, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_BOOLEAN: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_boolean( pyesedb_record->record, value_entry, &value_8bit, &error ); Py_END_ALLOW_THREADS break; default: PyErr_Format( PyExc_IOError, "%s: value: %d is not a boolean type.", function, value_entry ); return( NULL ); } if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve boolean value: %d.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } if( value_8bit != 0 ) { Py_IncRef( (PyObject *) Py_True ); return( Py_True ); } Py_IncRef( (PyObject *) Py_False ); return( Py_False ); } /* Retrieves the value data represented as a floating point * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_as_floating_point( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *floating_point_object = NULL; static char *function = "pyesedb_record_get_value_data_as_floating_point"; static char *keyword_list[] = { "value_entry", NULL }; double value_64bit = 0.0; float value_32bit = 0.0; uint32_t column_type = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_column_type( pyesedb_record->record, value_entry, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_FLOAT_32BIT: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_floating_point_32bit( pyesedb_record->record, value_entry, &value_32bit, &error ); Py_END_ALLOW_THREADS value_64bit = (double) value_32bit; break; case LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_floating_point_64bit( pyesedb_record->record, value_entry, &value_64bit, &error ); Py_END_ALLOW_THREADS break; default: PyErr_Format( PyExc_IOError, "%s: value: %d is not a floating point type.", function, value_entry ); return( NULL ); } if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve floating point value: %d.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } floating_point_object = PyFloat_FromDouble( value_64bit ); return( floating_point_object ); } /* Retrieves the value data represented as an integer * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_as_integer( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_record_get_value_data_as_integer"; static char *keyword_list[] = { "value_entry", NULL }; uint64_t value_64bit = 0; int64_t integer_value = 0; uint32_t column_type = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; uint8_t value_is_signed = 0; uint8_t value_8bit = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_column_type( pyesedb_record->record, value_entry, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } switch( column_type ) { case LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_8bit( pyesedb_record->record, value_entry, &value_8bit, &error ); Py_END_ALLOW_THREADS /* Interpret the 8-bit value as unsigned */ integer_value = (uint8_t) value_8bit; break; case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_16bit( pyesedb_record->record, value_entry, &value_16bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ) { /* Interpret the 16-bit value as signed */ integer_value = (int16_t) value_16bit; value_is_signed = 1; } else { /* Interpret the 16-bit value as unsigned */ integer_value = (uint16_t) value_16bit; } break; case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED: case LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_32bit( pyesedb_record->record, value_entry, &value_32bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ) { /* Interpret the 32-bit value as signed */ integer_value = (int32_t) value_32bit; value_is_signed = 1; } else { /* Interpret the 32-bit value as unsigned */ integer_value = (uint32_t) value_32bit; } break; case LIBESEDB_COLUMN_TYPE_CURRENCY: case LIBESEDB_COLUMN_TYPE_DATE_TIME: case LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED: Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_64bit( pyesedb_record->record, value_entry, &value_64bit, &error ); Py_END_ALLOW_THREADS if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ) { /* Interpret the 64-bit value as signed */ integer_value = (int64_t) value_64bit; value_is_signed = 1; } else { /* Interpret the 64-bit value as unsigned */ integer_value = (uint64_t) value_64bit; } break; default: PyErr_Format( PyExc_IOError, "%s: value: %d is not an integer type.", function, value_entry ); return( NULL ); } if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve integer value: %d.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } if( value_is_signed != 0 ) { integer_object = pyesedb_integer_signed_new_from_64bit( integer_value ); } else { integer_object = pyesedb_integer_unsigned_new_from_64bit( integer_value ); } return( integer_object ); } /* Retrieves the value data represented as a string * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_as_string( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *value_string = NULL; static char *keyword_list[] = { "value_entry", NULL }; static char *function = "pyesedb_record_get_value_data_as_string"; size_t value_string_size = 0; uint32_t column_type = 0; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_column_type( pyesedb_record->record, value_entry, &column_type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve column: %d type.", function, value_entry ); libcerror_error_free( &error ); return( NULL ); } if( ( column_type != LIBESEDB_COLUMN_TYPE_TEXT ) && ( column_type != LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) ) { PyErr_Format( PyExc_IOError, "%s: value: %d is not a string type.", function, value_entry ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_utf8_string_size( pyesedb_record->record, value_entry, &value_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d string size.", function, value_entry ); 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 *) PyMem_Malloc( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create value: %d string.", function, value_entry ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_value_utf8_string( pyesedb_record->record, value_entry, value_string, value_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve value: %d string.", function, value_entry ); 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, NULL ); PyMem_Free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { PyMem_Free( value_string ); } return( NULL ); } /* Retrieves the value data represented as a long value * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_record_get_value_data_as_long_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; libesedb_long_value_t *long_value = NULL; PyObject *long_value_object = NULL; static char *keyword_list[] = { "value_entry", NULL }; static char *function = "pyesedb_record_get_value_data_as_long_value"; int result = 0; int value_entry = 0; if( pyesedb_record == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid record.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &value_entry ) == 0 ) { return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_record_get_long_value( pyesedb_record->record, value_entry, &long_value, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve long value: %d.", function, value_entry ); libcerror_error_free( &error ); goto on_error; } else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } long_value_object = pyesedb_long_value_new( long_value, (PyObject *) pyesedb_record ); if( long_value_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create long value object.", function ); goto on_error; } return( long_value_object ); on_error: if( long_value != NULL ) { libesedb_long_value_free( &long_value, NULL ); } return( NULL ); } libesedb-20240420/pyesedb/pyesedb_tables.c0000644000175000017500000002157114610727251021157 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of tables * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_table.h" #include "pyesedb_tables.h" PySequenceMethods pyesedb_tables_sequence_methods = { /* sq_length */ (lenfunc) pyesedb_tables_len, /* sq_concat */ 0, /* sq_repeat */ 0, /* sq_item */ (ssizeargfunc) pyesedb_tables_getitem, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ 0, /* sq_contains */ 0, /* sq_inplace_concat */ 0, /* sq_inplace_repeat */ 0 }; PyTypeObject pyesedb_tables_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.tables", /* tp_basicsize */ sizeof( pyesedb_tables_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_tables_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ &pyesedb_tables_sequence_methods, /* 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 | Py_TPFLAGS_HAVE_ITER, /* tp_doc */ "pyesedb sequence and iterator object of tables", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ (getiterfunc) pyesedb_tables_iter, /* tp_iternext */ (iternextfunc) pyesedb_tables_iternext, /* tp_methods */ 0, /* 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) pyesedb_tables_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 tables sequence and iterator object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_tables_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ) { pyesedb_tables_t *sequence_object = NULL; static char *function = "pyesedb_tables_new"; if( parent_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid parent object.", function ); return( NULL ); } if( get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid get item by index function.", function ); return( NULL ); } /* Make sure the tables values are initialized */ sequence_object = PyObject_New( struct pyesedb_tables, &pyesedb_tables_type_object ); if( sequence_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create sequence object.", function ); goto on_error; } sequence_object->parent_object = parent_object; sequence_object->get_item_by_index = get_item_by_index; sequence_object->current_index = 0; sequence_object->number_of_items = number_of_items; Py_IncRef( (PyObject *) sequence_object->parent_object ); return( (PyObject *) sequence_object ); on_error: if( sequence_object != NULL ) { Py_DecRef( (PyObject *) sequence_object ); } return( NULL ); } /* Initializes a tables sequence and iterator object * Returns 0 if successful or -1 on error */ int pyesedb_tables_init( pyesedb_tables_t *sequence_object ) { static char *function = "pyesedb_tables_init"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } /* Make sure the tables values are initialized */ sequence_object->parent_object = NULL; sequence_object->get_item_by_index = NULL; sequence_object->current_index = 0; sequence_object->number_of_items = 0; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of tables not supported.", function ); return( -1 ); } /* Frees a tables sequence object */ void pyesedb_tables_free( pyesedb_tables_t *sequence_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_tables_free"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return; } ob_type = Py_TYPE( sequence_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( sequence_object->parent_object != NULL ) { Py_DecRef( (PyObject *) sequence_object->parent_object ); } ob_type->tp_free( (PyObject*) sequence_object ); } /* The tables len() function */ Py_ssize_t pyesedb_tables_len( pyesedb_tables_t *sequence_object ) { static char *function = "pyesedb_tables_len"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( -1 ); } return( (Py_ssize_t) sequence_object->number_of_items ); } /* The tables getitem() function */ PyObject *pyesedb_tables_getitem( pyesedb_tables_t *sequence_object, Py_ssize_t item_index ) { PyObject *table_object = NULL; static char *function = "pyesedb_tables_getitem"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( ( item_index < 0 ) || ( item_index >= (Py_ssize_t) sequence_object->number_of_items ) ) { PyErr_Format( PyExc_ValueError, "%s: invalid invalid item index value out of bounds.", function ); return( NULL ); } table_object = sequence_object->get_item_by_index( sequence_object->parent_object, (int) item_index ); return( table_object ); } /* The tables iter() function */ PyObject *pyesedb_tables_iter( pyesedb_tables_t *sequence_object ) { static char *function = "pyesedb_tables_iter"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } Py_IncRef( (PyObject *) sequence_object ); return( (PyObject *) sequence_object ); } /* The tables iternext() function */ PyObject *pyesedb_tables_iternext( pyesedb_tables_t *sequence_object ) { PyObject *table_object = NULL; static char *function = "pyesedb_tables_iternext"; if( sequence_object == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object.", function ); return( NULL ); } if( sequence_object->get_item_by_index == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - missing get item by index function.", function ); return( NULL ); } if( sequence_object->current_index < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid current index.", function ); return( NULL ); } if( sequence_object->number_of_items < 0 ) { PyErr_Format( PyExc_ValueError, "%s: invalid sequence object - invalid number of items.", function ); return( NULL ); } if( sequence_object->current_index >= sequence_object->number_of_items ) { PyErr_SetNone( PyExc_StopIteration ); return( NULL ); } table_object = sequence_object->get_item_by_index( sequence_object->parent_object, sequence_object->current_index ); if( table_object != NULL ) { sequence_object->current_index++; } return( table_object ); } libesedb-20240420/pyesedb/pyesedb_file_object_io_handle.c0000644000175000017500000010213014610727251024143 0ustar00lordyestalordyesta/* * Python file object IO handle functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "pyesedb_error.h" #include "pyesedb_file_object_io_handle.h" #include "pyesedb_integer.h" #include "pyesedb_libbfio.h" #include "pyesedb_libcerror.h" #include "pyesedb_python.h" /* Creates a file object IO handle * Make sure the value file_object_io_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int pyesedb_file_object_io_handle_initialize( pyesedb_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ) { static char *function = "pyesedb_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 = (pyesedb_file_object_io_handle_t *) PyMem_Malloc( sizeof( pyesedb_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( pyesedb_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 ) { PyMem_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 pyesedb_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ) { pyesedb_file_object_io_handle_t *file_object_io_handle = NULL; static char *function = "pyesedb_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( pyesedb_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 **)) pyesedb_file_object_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) pyesedb_file_object_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) pyesedb_file_object_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) pyesedb_file_object_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) pyesedb_file_object_io_handle_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) pyesedb_file_object_io_handle_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) pyesedb_file_object_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) pyesedb_file_object_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) pyesedb_file_object_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) pyesedb_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 ) { pyesedb_file_object_io_handle_free( &file_object_io_handle, NULL ); } return( -1 ); } /* Frees a file object IO handle * Returns 1 if succesful or -1 on error */ int pyesedb_file_object_io_handle_free( pyesedb_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyesedb_file_object_io_handle_free"; 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 ); } if( *file_object_io_handle != NULL ) { gil_state = PyGILState_Ensure(); Py_DecRef( ( *file_object_io_handle )->file_object ); PyMem_Free( *file_object_io_handle ); *file_object_io_handle = NULL; PyGILState_Release( gil_state ); } return( 1 ); } /* Clones (duplicates) the file object IO handle and its attributes * Returns 1 if succesful or -1 on error */ int pyesedb_file_object_io_handle_clone( pyesedb_file_object_io_handle_t **destination_file_object_io_handle, pyesedb_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyesedb_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( pyesedb_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 pyesedb_file_object_io_handle_open( pyesedb_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "pyesedb_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 pyesedb_file_object_io_handle_close( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyesedb_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 pyesedb_file_object_read_buffer( PyObject *file_object, uint8_t *buffer, size_t size, libcerror_error_t **error ) { PyObject *argument_size = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; static char *function = "pyesedb_file_object_read_buffer"; char *safe_buffer = NULL; 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 ) { #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "read" ); #else method_name = PyString_FromString( "read" ); #endif argument_size = PyLong_FromSize_t( size ); PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_size, NULL ); if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object.", function ); goto on_error; } if( method_result == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing method result.", function ); goto on_error; } #if PY_MAJOR_VERSION >= 3 result = PyObject_IsInstance( method_result, (PyObject *) &PyBytes_Type ); #else result = PyObject_IsInstance( method_result, (PyObject *) &PyString_Type ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if method result is a binary string object.", function ); goto on_error; } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid method result value is not a binary string object.", function ); goto on_error; } #if PY_MAJOR_VERSION >= 3 result = PyBytes_AsStringAndSize( method_result, &safe_buffer, &safe_read_count ); #else result = PyString_AsStringAndSize( method_result, &safe_buffer, &safe_read_count ); #endif if( result == -1 ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object.", function ); 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 copy 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 pyesedb_file_object_io_handle_read( pyesedb_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pyesedb_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 = pyesedb_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 pyesedb_file_object_write_buffer( PyObject *file_object, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { PyObject *argument_string = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; static char *function = "pyesedb_file_object_write_buffer"; 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 SIZEOF_SIZE_T > SIZEOF_INT if( size > (size_t) INT_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( size > 0 ) { #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "write" ); #else method_name = PyString_FromString( "write" ); #endif #if PY_MAJOR_VERSION >= 3 argument_string = PyBytes_FromStringAndSize( (char *) buffer, size ); #else argument_string = PyString_FromStringAndSize( (char *) buffer, size ); #endif PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_string, NULL ); if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file object.", function ); goto on_error; } if( method_result == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing method result.", function ); goto on_error; } Py_DecRef( method_result ); Py_DecRef( argument_string ); Py_DecRef( method_name ); } return( (ssize_t) size ); 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 pyesedb_file_object_io_handle_write( pyesedb_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pyesedb_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 = pyesedb_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 pyesedb_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 *method_name = NULL; PyObject *method_result = NULL; static char *function = "pyesedb_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 defined( HAVE_LONG_LONG ) if( offset > (off64_t) INT64_MAX ) #else if( offset > (off64_t) LONG_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 PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "seek" ); #else method_name = PyString_FromString( "seek" ); #endif #if defined( HAVE_LONG_LONG ) argument_offset = PyLong_FromLongLong( (PY_LONG_LONG) offset ); #else argument_offset = PyLong_FromLongLong( (long) offset ); #endif #if PY_MAJOR_VERSION >= 3 argument_whence = PyLong_FromLong( (long) whence ); #else argument_whence = PyInt_FromLong( (long) whence ); #endif PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_offset, argument_whence, NULL ); if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek in file object.", function ); goto on_error; } if( method_result == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing method result.", function ); 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 pyesedb_file_object_get_offset( PyObject *file_object, off64_t *offset, libcerror_error_t **error ) { PyObject *method_name = NULL; PyObject *method_result = NULL; static char *function = "pyesedb_file_object_get_offset"; 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 ); } #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "get_offset" ); #else method_name = PyString_FromString( "get_offset" ); #endif 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 */ #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "tell" ); #else method_name = PyString_FromString( "tell" ); #endif } PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, NULL ); if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object.", function ); goto on_error; } if( method_result == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing method result.", function ); goto on_error; } if( pyesedb_integer_signed_copy_to_64bit( method_result, offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to convert method result into current offset of file object.", function ); goto on_error; } 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 pyesedb_file_object_io_handle_seek_offset( pyesedb_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "pyesedb_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( pyesedb_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( pyesedb_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 pyesedb_file_object_io_handle_exists( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyesedb_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 pyesedb_file_object_io_handle_is_open( pyesedb_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pyesedb_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 pyesedb_file_object_get_size( PyObject *file_object, size64_t *size, libcerror_error_t **error ) { PyObject *method_name = NULL; PyObject *method_result = NULL; static char *function = "pyesedb_file_object_get_size"; 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 ); } #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "get_size" ); #else method_name = PyString_FromString( "get_size" ); #endif PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, NULL ); if( PyErr_Occurred() ) { pyesedb_error_fetch( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file object.", function ); goto on_error; } if( method_result == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing method result.", function ); goto on_error; } if( pyesedb_integer_unsigned_copy_to_64bit( method_result, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to convert method result into size of file object.", function ); goto on_error; } 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 pyesedb_file_object_io_handle_get_size( pyesedb_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ) { PyObject *method_name = NULL; static char *function = "pyesedb_file_object_io_handle_get_size"; PyGILState_STATE gil_state = 0; off64_t current_offset = 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(); #if PY_MAJOR_VERSION >= 3 method_name = PyUnicode_FromString( "get_size" ); #else method_name = PyString_FromString( "get_size" ); #endif 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( pyesedb_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( pyesedb_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( pyesedb_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( pyesedb_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 ); pyesedb_file_object_seek_offset( file_object_io_handle->file_object, current_offset, SEEK_SET, NULL ); goto on_error; } if( pyesedb_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 ); } libesedb-20240420/pyesedb/pyesedb_unused.h0000644000175000017500000000257014610727251021213 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_UNUSED_H ) #define _PYESEDB_UNUSED_H #include #if !defined( PYESEDB_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define PYESEDB_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define PYESEDB_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define PYESEDB_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define PYESEDB_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _PYESEDB_UNUSED_H ) */ libesedb-20240420/pyesedb/pyesedb_datetime.h0000644000175000017500000000344214610727251021503 0ustar00lordyestalordyesta/* * Date and time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_DATETIME_H ) #define _PYESEDB_DATETIME_H #include #include #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pyesedb_datetime_new_from_time_elements( uint16_t year, uint64_t number_of_days, uint8_t hours, uint8_t minutes, uint8_t seconds, uint32_t micro_seconds ); PyObject *pyesedb_datetime_new_from_fat_date_time( uint32_t fat_date_time ); PyObject *pyesedb_datetime_new_from_filetime( uint64_t filetime ); PyObject *pyesedb_datetime_new_from_floatingtime( uint64_t floatingtime ); PyObject *pyesedb_datetime_new_from_hfs_time( uint32_t hfs_time ); PyObject *pyesedb_datetime_new_from_posix_time( int64_t posix_time ); PyObject *pyesedb_datetime_new_from_posix_time_in_micro_seconds( int64_t posix_time ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_DATETIME_H ) */ libesedb-20240420/pyesedb/pyesedb_value_flags.c0000644000175000017500000001412014610727251022165 0ustar00lordyestalordyesta/* * Python object definition of the libesedb value flags * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" #include "pyesedb_value_flags.h" PyTypeObject pyesedb_value_flags_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.value_flags", /* tp_basicsize */ sizeof( pyesedb_value_flags_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_value_flags_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 */ "pyesedb value flags object (wraps LIBESEDB_VALUE_FLAGS)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* 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) pyesedb_value_flags_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 }; /* Initializes the type object * Returns 1 if successful or -1 on error */ int pyesedb_value_flags_init_type( PyTypeObject *type_object ) { PyObject *value_object = NULL; if( type_object == NULL ) { return( -1 ); } type_object->tp_dict = PyDict_New(); if( type_object->tp_dict == NULL ) { return( -1 ); } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ); #else value_object = PyInt_FromLong( LIBESEDB_VALUE_FLAG_VARIABLE_SIZE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "VARIABLE_SIZE", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_VALUE_FLAG_COMPRESSED ); #else value_object = PyInt_FromLong( LIBESEDB_VALUE_FLAG_COMPRESSED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "COMPRESSED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_VALUE_FLAG_LONG_VALUE ); #else value_object = PyInt_FromLong( LIBESEDB_VALUE_FLAG_LONG_VALUE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "LONG_VALUE", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_VALUE_FLAG_MULTI_VALUE ); #else value_object = PyInt_FromLong( LIBESEDB_VALUE_FLAG_MULTI_VALUE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "MULTI_VALUE", value_object ) != 0 ) { goto on_error; } return( 1 ); on_error: if( type_object->tp_dict != NULL ) { Py_DecRef( type_object->tp_dict ); type_object->tp_dict = NULL; } return( -1 ); } /* Creates a new value flags object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_value_flags_new( void ) { pyesedb_value_flags_t *definitions_object = NULL; static char *function = "pyesedb_value_flags_new"; definitions_object = PyObject_New( struct pyesedb_value_flags, &pyesedb_value_flags_type_object ); if( definitions_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create definitions object.", function ); goto on_error; } if( pyesedb_value_flags_init( definitions_object ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize definitions object.", function ); goto on_error; } return( (PyObject *) definitions_object ); on_error: if( definitions_object != NULL ) { Py_DecRef( (PyObject *) definitions_object ); } return( NULL ); } /* Initializes a value flags object * Returns 0 if successful or -1 on error */ int pyesedb_value_flags_init( pyesedb_value_flags_t *definitions_object ) { static char *function = "pyesedb_value_flags_init"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return( -1 ); } return( 0 ); } /* Frees a value flags object */ void pyesedb_value_flags_free( pyesedb_value_flags_t *definitions_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_value_flags_free"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return; } ob_type = Py_TYPE( definitions_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } ob_type->tp_free( (PyObject*) definitions_object ); } libesedb-20240420/pyesedb/pyesedb_table.h0000644000175000017500000000573114610727625021006 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_table_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_TABLE_H ) #define _PYESEDB_TABLE_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_table pyesedb_table_t; struct pyesedb_table { /* Python object initialization */ PyObject_HEAD /* The libesedb table */ libesedb_table_t *table; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_table_object_methods[]; extern PyTypeObject pyesedb_table_type_object; PyObject *pyesedb_table_new( libesedb_table_t *table, PyObject *parent_object ); int pyesedb_table_init( pyesedb_table_t *pyesedb_table ); void pyesedb_table_free( pyesedb_table_t *pyesedb_table ); PyObject *pyesedb_table_get_identifier( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_name( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_template_name( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_number_of_columns( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_column_by_index( PyObject *pyesedb_table, int column_index ); PyObject *pyesedb_table_get_column( pyesedb_table_t *pyesedb_table, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_table_get_columns( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_number_of_records( pyesedb_table_t *pyesedb_table, PyObject *arguments ); PyObject *pyesedb_table_get_record_by_index( PyObject *pyesedb_table, int record_index ); PyObject *pyesedb_table_get_record( pyesedb_table_t *pyesedb_table, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_table_get_records( pyesedb_table_t *pyesedb_table, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_TABLE_H ) */ libesedb-20240420/pyesedb/pyesedb_column.h0000644000175000017500000000401214610727251021176 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_column_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_COLUMN_H ) #define _PYESEDB_COLUMN_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_column pyesedb_column_t; struct pyesedb_column { /* Python object initialization */ PyObject_HEAD /* The libesedb column */ libesedb_column_t *column; /* The parent object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_column_object_methods[]; extern PyTypeObject pyesedb_column_type_object; PyObject *pyesedb_column_new( libesedb_column_t *column, PyObject *parent_object ); int pyesedb_column_init( pyesedb_column_t *pyesedb_column ); void pyesedb_column_free( pyesedb_column_t *pyesedb_column ); PyObject *pyesedb_column_get_identifier( pyesedb_column_t *pyesedb_column, PyObject *arguments ); PyObject *pyesedb_column_get_type( pyesedb_column_t *pyesedb_column, PyObject *arguments ); PyObject *pyesedb_column_get_name( pyesedb_column_t *pyesedb_column, PyObject *arguments ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_COLUMN_H ) */ libesedb-20240420/pyesedb/pyesedb_indexes.h0000644000175000017500000000451614610727251021351 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of indexes * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_INDEXES_H ) #define _PYESEDB_INDEXES_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_indexes pyesedb_indexes_t; struct pyesedb_indexes { /* Python object initialization */ PyObject_HEAD /* The parent object */ PyObject *parent_object; /* The get item by index callback function */ PyObject* (*get_item_by_index)( PyObject *parent_object, int index ); /* The current index */ int current_index; /* The number of items */ int number_of_items; }; extern PyTypeObject pyesedb_indexes_type_object; PyObject *pyesedb_indexes_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyesedb_indexes_init( pyesedb_indexes_t *sequence_object ); void pyesedb_indexes_free( pyesedb_indexes_t *sequence_object ); Py_ssize_t pyesedb_indexes_len( pyesedb_indexes_t *sequence_object ); PyObject *pyesedb_indexes_getitem( pyesedb_indexes_t *sequence_object, Py_ssize_t item_index ); PyObject *pyesedb_indexes_iter( pyesedb_indexes_t *sequence_object ); PyObject *pyesedb_indexes_iternext( pyesedb_indexes_t *sequence_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_INDEXES_H ) */ libesedb-20240420/pyesedb/pyesedb_column.c0000644000175000017500000002500714610727625021205 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_column_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_column.h" #include "pyesedb_error.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_column_object_methods[] = { { "get_identifier", (PyCFunction) pyesedb_column_get_identifier, METH_NOARGS, "get_identifier() -> Integer\n" "\n" "Retrieves the identifier." }, { "get_type", (PyCFunction) pyesedb_column_get_type, METH_NOARGS, "get_type() -> Integer\n" "\n" "Retrieves the type." }, { "get_name", (PyCFunction) pyesedb_column_get_name, METH_NOARGS, "get_name() -> Unicode string\n" "\n" "Retrieves the name." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_column_object_get_set_definitions[] = { { "identifier", (getter) pyesedb_column_get_identifier, (setter) 0, "The identifier.", NULL }, { "type", (getter) pyesedb_column_get_type, (setter) 0, "The type.", NULL }, { "name", (getter) pyesedb_column_get_name, (setter) 0, "The name.", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_column_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.column", /* tp_basicsize */ sizeof( pyesedb_column_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_column_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 */ "pyesedb column object (wraps libesedb_column_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_column_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_column_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_column_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 column object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_column_new( libesedb_column_t *column, PyObject *parent_object ) { pyesedb_column_t *pyesedb_column = NULL; static char *function = "pyesedb_column_new"; if( column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_column = PyObject_New( struct pyesedb_column, &pyesedb_column_type_object ); if( pyesedb_column == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize column.", function ); goto on_error; } pyesedb_column->column = column; pyesedb_column->parent_object = parent_object; if( pyesedb_column->parent_object != NULL ) { Py_IncRef( pyesedb_column->parent_object ); } return( (PyObject *) pyesedb_column ); on_error: if( pyesedb_column != NULL ) { Py_DecRef( (PyObject *) pyesedb_column ); } return( NULL ); } /* Initializes a column object * Returns 0 if successful or -1 on error */ int pyesedb_column_init( pyesedb_column_t *pyesedb_column ) { static char *function = "pyesedb_column_init"; if( pyesedb_column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return( -1 ); } /* Make sure libesedb column is set to NULL */ pyesedb_column->column = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of column not supported.", function ); return( -1 ); } /* Frees a column object */ void pyesedb_column_free( pyesedb_column_t *pyesedb_column ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_column_free"; int result = 0; if( pyesedb_column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return; } ob_type = Py_TYPE( pyesedb_column ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_column->column != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_column_free( &( pyesedb_column->column ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb column.", function ); libcerror_error_free( &error ); } } if( pyesedb_column->parent_object != NULL ) { Py_DecRef( pyesedb_column->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_column ); } /* Retrieves the identifier * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_column_get_identifier( pyesedb_column_t *pyesedb_column, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_column_get_identifier"; uint32_t value_32bit = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_column_get_identifier( pyesedb_column->column, &value_32bit, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve identifier.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) value_32bit ); return( integer_object ); } /* Retrieves the type * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_column_get_type( pyesedb_column_t *pyesedb_column, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *integer_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_column_get_type"; uint32_t value_32bit = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_column_get_type( pyesedb_column->column, &value_32bit, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve type.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = PyLong_FromUnsignedLong( (unsigned long) value_32bit ); return( integer_object ); } /* Retrieves the name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_column_get_name( pyesedb_column_t *pyesedb_column, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_column_get_name"; char *utf8_string = NULL; size_t utf8_string_size = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_column == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid column.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_column_get_utf8_name_size( pyesedb_column->column, &utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to determine size of name as UTF-8 string.", function ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( utf8_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } utf8_string = (char *) PyMem_Malloc( sizeof( char ) * utf8_string_size ); if( utf8_string == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create UTF-8 string.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_column_get_utf8_name( pyesedb_column->column, (uint8_t *) utf8_string, utf8_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve name as UTF-8 string.", function ); 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( utf8_string, (Py_ssize_t) utf8_string_size - 1, NULL ); if( string_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert UTF-8 string into Unicode object.", function ); goto on_error; } PyMem_Free( utf8_string ); return( string_object ); on_error: if( utf8_string != NULL ) { PyMem_Free( utf8_string ); } return( NULL ); } libesedb-20240420/pyesedb/pyesedb_long_value.c0000644000175000017500000002460414610727625022045 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_long_value_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_error.h" #include "pyesedb_integer.h" #include "pyesedb_libcerror.h" #include "pyesedb_libesedb.h" #include "pyesedb_long_value.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" PyMethodDef pyesedb_long_value_object_methods[] = { /* Functions to access the data */ { "get_data", (PyCFunction) pyesedb_long_value_get_data, METH_NOARGS, "get_data() -> String or None\n" "\n" "Retrieves the data as a binary string." }, { "get_data_as_string", (PyCFunction) pyesedb_long_value_get_data_as_string, METH_NOARGS, "get_data_as_string() -> Unicode string or None\n" "\n" "Retrieves the data as a string." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_long_value_object_get_set_definitions[] = { { "data", (getter) pyesedb_long_value_get_data, (setter) 0, "The data", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_long_value_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.long_value", /* tp_basicsize */ sizeof( pyesedb_long_value_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_long_value_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 */ "pyesedb long value object (wraps libesedb_long_value_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_long_value_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_long_value_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pyesedb_long_value_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 long value object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_long_value_new( libesedb_long_value_t *long_value, PyObject *parent_object ) { pyesedb_long_value_t *pyesedb_long_value = NULL; static char *function = "pyesedb_long_value_new"; if( long_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid long value.", function ); return( NULL ); } /* PyObject_New does not invoke tp_init */ pyesedb_long_value = PyObject_New( struct pyesedb_long_value, &pyesedb_long_value_type_object ); if( pyesedb_long_value == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize long value.", function ); goto on_error; } pyesedb_long_value->long_value = long_value; pyesedb_long_value->parent_object = parent_object; if( pyesedb_long_value->parent_object != NULL ) { Py_IncRef( pyesedb_long_value->parent_object ); } return( (PyObject *) pyesedb_long_value ); on_error: if( pyesedb_long_value != NULL ) { Py_DecRef( (PyObject *) pyesedb_long_value ); } return( NULL ); } /* Initializes a long value object * Returns 0 if successful or -1 on error */ int pyesedb_long_value_init( pyesedb_long_value_t *pyesedb_long_value ) { static char *function = "pyesedb_long_value_init"; if( pyesedb_long_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid long value.", function ); return( -1 ); } /* Make sure libesedb long value is set to NULL */ pyesedb_long_value->long_value = NULL; PyErr_Format( PyExc_NotImplementedError, "%s: initialize of long value not supported.", function ); return( -1 ); } /* Frees a long value object */ void pyesedb_long_value_free( pyesedb_long_value_t *pyesedb_long_value ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_long_value_free"; int result = 0; if( pyesedb_long_value == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid long value.", function ); return; } ob_type = Py_TYPE( pyesedb_long_value ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_long_value->long_value != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_long_value_free( &( pyesedb_long_value->long_value ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb long value.", function ); libcerror_error_free( &error ); } } if( pyesedb_long_value->parent_object != NULL ) { Py_DecRef( pyesedb_long_value->parent_object ); } ob_type->tp_free( (PyObject*) pyesedb_long_value ); } /* Retrieves the data * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_long_value_get_data( pyesedb_long_value_t *pyesedb_long_value, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *data = NULL; static char *function = "pyesedb_long_value_get_data"; size64_t data_size = 0; int result = 0; if( pyesedb_long_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid long value.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_long_value_get_data_size( pyesedb_long_value->long_value, &data_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve data size.", function ); libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( data_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } if( data_size > (size64_t) SSIZE_MAX ) { PyErr_Format( PyExc_IOError, "%s: invalid data size value out of bounds.", function ); goto on_error; } data = (uint8_t *) PyMem_Malloc( sizeof( uint8_t ) * data_size ); if( data == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create data.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_long_value_get_data( pyesedb_long_value->long_value, data, data_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve data.", function ); libcerror_error_free( &error ); goto on_error; } #if PY_MAJOR_VERSION >= 3 string_object = PyBytes_FromStringAndSize( (char *) data, (Py_ssize_t) data_size ); #else string_object = PyString_FromStringAndSize( (char *) data, (Py_ssize_t) data_size ); #endif PyMem_Free( data ); return( string_object ); on_error: if( data != NULL ) { PyMem_Free( data ); } return( NULL ); } /* Retrieves the data represented as a string * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_long_value_get_data_as_string( pyesedb_long_value_t *pyesedb_long_value, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *string_object = NULL; uint8_t *value_string = NULL; static char *function = "pyesedb_long_value_get_data_as_string"; size_t value_string_size = 0; int result = 0; if( pyesedb_long_value == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid long value.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_long_value_get_utf8_string_size( pyesedb_long_value->long_value, &value_string_size, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve string size.", function ); 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 *) PyMem_Malloc( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create string.", function ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_long_value_get_utf8_string( pyesedb_long_value->long_value, value_string, value_string_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve string.", function ); 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, NULL ); PyMem_Free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { PyMem_Free( value_string ); } return( NULL ); } libesedb-20240420/pyesedb/pyesedb_file.c0000644000175000017500000006711314610727625020633 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_file_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_error.h" #include "pyesedb_file.h" #include "pyesedb_file_object_io_handle.h" #include "pyesedb_integer.h" #include "pyesedb_libbfio.h" #include "pyesedb_libcerror.h" #include "pyesedb_libclocale.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_table.h" #include "pyesedb_tables.h" #include "pyesedb_unused.h" #if !defined( LIBESEDB_HAVE_BFIO ) LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ PyMethodDef pyesedb_file_object_methods[] = { { "signal_abort", (PyCFunction) pyesedb_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) pyesedb_file_open, METH_VARARGS | METH_KEYWORDS, "open(filename, mode='r') -> None\n" "\n" "Opens a file." }, { "open_file_object", (PyCFunction) pyesedb_file_open_file_object, METH_VARARGS | METH_KEYWORDS, "open_file_object(file_object, mode='r') -> None\n" "\n" "Opens a file using a file-like object." }, { "close", (PyCFunction) pyesedb_file_close, METH_NOARGS, "close() -> None\n" "\n" "Closes a file." }, /* Functions to access the file values */ { "get_type", (PyCFunction) pyesedb_file_get_type, METH_NOARGS, "get_type() -> Integer\n" "\n" "Retrieves the type." }, { "get_format_version", (PyCFunction) pyesedb_file_get_format_version, METH_NOARGS, "get_format_version() -> Integer\n" "\n" "Retrieves the format version." }, { "get_creation_format_version", (PyCFunction) pyesedb_file_get_creation_format_version, METH_NOARGS, "get_creation_format_version() -> Integer\n" "\n" "Retrieves the creation format version." }, { "get_page_size", (PyCFunction) pyesedb_file_get_page_size, METH_NOARGS, "get_page_size() -> Integer\n" "\n" "Retrieves the page size." }, /* Functions to access the tables */ { "get_number_of_tables", (PyCFunction) pyesedb_file_get_number_of_tables, METH_NOARGS, "get_number_of_tables() -> Integer\n" "\n" "Retrieves the number of tables" }, { "get_table", (PyCFunction) pyesedb_file_get_table, METH_VARARGS | METH_KEYWORDS, "get_table(table_entry) -> Object or None\n" "\n" "Retrieves a specific table" }, { "get_table_by_name", (PyCFunction) pyesedb_file_get_table_by_name, METH_VARARGS | METH_KEYWORDS, "get_table_by_name(name) -> Object or None\n" "\n" "Retrieves a table specified by the name." }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pyesedb_file_object_get_set_definitions[] = { { "type", (getter) pyesedb_file_get_type, (setter) 0, "The type.", NULL }, { "format_version", (getter) pyesedb_file_get_format_version, (setter) 0, "The format version.", NULL }, { "creation_format_version", (getter) pyesedb_file_get_creation_format_version, (setter) 0, "The creation format version.", NULL }, { "page_size", (getter) pyesedb_file_get_page_size, (setter) 0, "The page size.", NULL }, { "number_of_tables", (getter) pyesedb_file_get_number_of_tables, (setter) 0, "The number of tables", NULL }, { "tables", (getter) pyesedb_file_get_tables, (setter) 0, "The tables", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pyesedb_file_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.file", /* tp_basicsize */ sizeof( pyesedb_file_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_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 */ "pyesedb file object (wraps libesedb_file_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pyesedb_file_object_methods, /* tp_members */ 0, /* tp_getset */ pyesedb_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) pyesedb_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 }; /* Initializes a file object * Returns 0 if successful or -1 on error */ int pyesedb_file_init( pyesedb_file_t *pyesedb_file ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_file_init"; if( pyesedb_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( -1 ); } /* Make sure libesedb file is set to NULL */ pyesedb_file->file = NULL; pyesedb_file->file_io_handle = NULL; if( libesedb_file_initialize( &( pyesedb_file->file ), &error ) != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to initialize file.", function ); libcerror_error_free( &error ); return( -1 ); } return( 0 ); } /* Frees a file object */ void pyesedb_file_free( pyesedb_file_t *pyesedb_file ) { struct _typeobject *ob_type = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_file_free"; int result = 0; if( pyesedb_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return; } ob_type = Py_TYPE( pyesedb_file ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } if( pyesedb_file->file_io_handle != NULL ) { if( pyesedb_file_close( pyesedb_file, NULL ) == NULL ) { return; } } if( pyesedb_file->file != NULL ) { Py_BEGIN_ALLOW_THREADS result = libesedb_file_free( &( pyesedb_file->file ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to free libesedb file.", function ); libcerror_error_free( &error ); } } ob_type->tp_free( (PyObject*) pyesedb_file ); } /* Signals the file to abort the current activity * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_signal_abort( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_file_signal_abort"; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_signal_abort( pyesedb_file->file, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to signal abort.", function ); 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 *pyesedb_file_open( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ) { PyObject *string_object = NULL; libcerror_error_t *error = NULL; static char *function = "pyesedb_file_open"; static char *keyword_list[] = { "filename", "mode", NULL }; const char *filename_narrow = NULL; char *mode = NULL; int result = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) const wchar_t *filename_wide = NULL; #else PyObject *utf8_string_object = NULL; #endif if( pyesedb_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } /* Note that PyArg_ParseTupleAndKeywords with "s" will force Unicode strings to be converted to narrow character string. * On Windows the narrow character strings contains an extended ASCII string with a codepage. Hence we get a conversion * exception. This will also fail if the default encoding is not set correctly. We cannot use "u" here either since that * does not allow us to pass non Unicode string objects and Python (at least 2.7) does not seems to automatically upcast them. */ if( PyArg_ParseTupleAndKeywords( arguments, keywords, "O|s", keyword_list, &string_object, &mode ) == 0 ) { return( NULL ); } if( ( mode != NULL ) && ( mode[ 0 ] != 'r' ) ) { PyErr_Format( PyExc_ValueError, "%s: unsupported mode: %s.", function, mode ); return( NULL ); } PyErr_Clear(); result = PyObject_IsInstance( string_object, (PyObject *) &PyUnicode_Type ); if( result == -1 ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type unicode.", function ); return( NULL ); } else if( result != 0 ) { PyErr_Clear(); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 filename_wide = (wchar_t *) PyUnicode_AsWideCharString( string_object, NULL ); #else filename_wide = (wchar_t *) PyUnicode_AsUnicode( string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_file_open_wide( pyesedb_file->file, filename_wide, LIBESEDB_OPEN_READ, &error ); Py_END_ALLOW_THREADS #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 PyMem_Free( filename_wide ); #endif #else utf8_string_object = PyUnicode_AsUTF8String( string_object ); if( utf8_string_object == NULL ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to convert unicode string to UTF-8.", function ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 filename_narrow = PyBytes_AsString( utf8_string_object ); #else filename_narrow = PyString_AsString( utf8_string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_file_open( pyesedb_file->file, filename_narrow, LIBESEDB_OPEN_READ, &error ); Py_END_ALLOW_THREADS Py_DecRef( utf8_string_object ); #endif if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to open file.", function ); libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } PyErr_Clear(); #if PY_MAJOR_VERSION >= 3 result = PyObject_IsInstance( string_object, (PyObject *) &PyBytes_Type ); #else result = PyObject_IsInstance( string_object, (PyObject *) &PyString_Type ); #endif if( result == -1 ) { pyesedb_error_fetch_and_raise( PyExc_RuntimeError, "%s: unable to determine if string object is of type string.", function ); return( NULL ); } else if( result != 0 ) { PyErr_Clear(); #if PY_MAJOR_VERSION >= 3 filename_narrow = PyBytes_AsString( string_object ); #else filename_narrow = PyString_AsString( string_object ); #endif Py_BEGIN_ALLOW_THREADS result = libesedb_file_open( pyesedb_file->file, filename_narrow, LIBESEDB_OPEN_READ, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to open file.", function ); libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } PyErr_Format( PyExc_TypeError, "%s: unsupported string object type.", function ); return( NULL ); } /* Opens a file using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_open_file_object( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ) { PyObject *file_object = NULL; libcerror_error_t *error = NULL; char *mode = NULL; static char *keyword_list[] = { "file_object", "mode", NULL }; static char *function = "pyesedb_file_open_file_object"; int result = 0; if( pyesedb_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "O|s", keyword_list, &file_object, &mode ) == 0 ) { return( NULL ); } if( ( mode != NULL ) && ( mode[ 0 ] != 'r' ) ) { PyErr_Format( PyExc_ValueError, "%s: unsupported mode: %s.", function, mode ); return( NULL ); } PyErr_Clear(); result = PyObject_HasAttrString( file_object, "read" ); if( result != 1 ) { PyErr_Format( PyExc_TypeError, "%s: unsupported file object - missing read attribute.", function ); return( NULL ); } PyErr_Clear(); result = PyObject_HasAttrString( file_object, "seek" ); if( result != 1 ) { PyErr_Format( PyExc_TypeError, "%s: unsupported file object - missing seek attribute.", function ); return( NULL ); } if( pyesedb_file->file_io_handle != NULL ) { pyesedb_error_raise( error, PyExc_IOError, "%s: invalid file - file IO handle already set.", function ); goto on_error; } if( pyesedb_file_object_initialize( &( pyesedb_file->file_io_handle ), file_object, &error ) != 1 ) { pyesedb_error_raise( error, PyExc_MemoryError, "%s: unable to initialize file IO handle.", function ); libcerror_error_free( &error ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libesedb_file_open_file_io_handle( pyesedb_file->file, pyesedb_file->file_io_handle, LIBESEDB_OPEN_READ, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to open file.", function ); libcerror_error_free( &error ); goto on_error; } Py_IncRef( Py_None ); return( Py_None ); on_error: if( pyesedb_file->file_io_handle != NULL ) { libbfio_handle_free( &( pyesedb_file->file_io_handle ), NULL ); } return( NULL ); } /* Closes a file * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_close( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pyesedb_file_close"; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_close( pyesedb_file->file, &error ); Py_END_ALLOW_THREADS if( result != 0 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to close file.", function ); libcerror_error_free( &error ); return( NULL ); } if( pyesedb_file->file_io_handle != NULL ) { Py_BEGIN_ALLOW_THREADS result = libbfio_handle_free( &( pyesedb_file->file_io_handle ), &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to free libbfio file IO handle.", function ); libcerror_error_free( &error ); return( NULL ); } } Py_IncRef( Py_None ); return( Py_None ); } /* Retrieves the type * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_type( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_file_get_type"; uint32_t type = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_type( pyesedb_file->file, &type, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve type.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( (uint64_t) type ); return( integer_object ); } /* Retrieves the format version * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_format_version( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_file_get_format_version"; uint32_t format_revision = 0; uint32_t format_version = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_format_version( pyesedb_file->file, &format_version, &format_revision, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve type.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( ( (uint64_t) format_version << 32 ) | (uint64_t) format_revision ); return( integer_object ); } /* Retrieves the creation format version * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_creation_format_version( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_file_get_creation_format_version"; uint32_t format_revision = 0; uint32_t format_version = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_creation_format_version( pyesedb_file->file, &format_version, &format_revision, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve type.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( ( (uint64_t) format_version << 32 ) | (uint64_t) format_revision ); return( integer_object ); } /* Retrieves the page size * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_page_size( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_file_get_page_size"; uint32_t page_size = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_page_size( pyesedb_file->file, &page_size, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve page size.", function ); libcerror_error_free( &error ); return( NULL ); } integer_object = pyesedb_integer_unsigned_new_from_64bit( (uint64_t) page_size ); return( integer_object ); } /* Retrieves the number of tables * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_number_of_tables( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *integer_object = NULL; static char *function = "pyesedb_file_get_number_of_tables"; int number_of_tables = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_number_of_tables( pyesedb_file->file, &number_of_tables, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of tables.", function ); libcerror_error_free( &error ); return( NULL ); } #if PY_MAJOR_VERSION >= 3 integer_object = PyLong_FromLong( (long) number_of_tables ); #else integer_object = PyInt_FromLong( (long) number_of_tables ); #endif return( integer_object ); } /* Retrieves a specific table by index * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_table_by_index( PyObject *pyesedb_file, int table_entry ) { libcerror_error_t *error = NULL; libesedb_table_t *table = NULL; PyObject *table_object = NULL; static char *function = "pyesedb_file_get_table_by_index"; int result = 0; if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_table( ( (pyesedb_file_t *) pyesedb_file )->file, table_entry, &table, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve table: %d.", function, table_entry ); libcerror_error_free( &error ); goto on_error; } table_object = pyesedb_table_new( table, pyesedb_file ); if( table_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create table object.", function ); goto on_error; } return( table_object ); on_error: if( table != NULL ) { libesedb_table_free( &table, NULL ); } return( NULL ); } /* Retrieves a specific table * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_table( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ) { PyObject *table_object = NULL; static char *keyword_list[] = { "table_entry", NULL }; int table_entry = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &table_entry ) == 0 ) { return( NULL ); } table_object = pyesedb_file_get_table_by_index( (PyObject *) pyesedb_file, table_entry ); return( table_object ); } /* Retrieves a tables sequence and iterator object for the tables * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_tables( pyesedb_file_t *pyesedb_file, PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; PyObject *tables_object = NULL; static char *function = "pyesedb_file_get_tables"; int number_of_tables = 0; int result = 0; PYESEDB_UNREFERENCED_PARAMETER( arguments ) if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_number_of_tables( pyesedb_file->file, &number_of_tables, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve number of tables.", function ); libcerror_error_free( &error ); return( NULL ); } tables_object = pyesedb_tables_new( (PyObject *) pyesedb_file, &pyesedb_file_get_table_by_index, number_of_tables ); if( tables_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create tables object.", function ); return( NULL ); } return( tables_object ); } /* Retrieves the table specified by the name * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_file_get_table_by_name( pyesedb_file_t *pyesedb_file, PyObject *arguments, PyObject *keywords ) { libcerror_error_t *error = NULL; libesedb_table_t *table = NULL; PyObject *table_object = NULL; char *table_name = NULL; static char *keyword_list[] = { "table_name", NULL }; static char *function = "pyesedb_file_get_table_by_name"; size_t table_name_length = 0; int result = 0; if( pyesedb_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "s", keyword_list, &table_name ) == 0 ) { goto on_error; } table_name_length = narrow_string_length( table_name ); Py_BEGIN_ALLOW_THREADS result = libesedb_file_get_table_by_utf8_name( pyesedb_file->file, (uint8_t *) table_name, table_name_length, &table, &error ); Py_END_ALLOW_THREADS if( result == -1 ) { pyesedb_error_raise( error, PyExc_IOError, "%s: unable to retrieve table.", function ); libcerror_error_free( &error ); goto on_error; } /* Check if the table is present */ else if( result == 0 ) { Py_IncRef( Py_None ); return( Py_None ); } table_object = pyesedb_table_new( table, (PyObject *) pyesedb_file ); if( table_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create table object.", function ); goto on_error; } return( table_object ); on_error: if( table != NULL ) { libesedb_table_free( &table, NULL ); } return( NULL ); } libesedb-20240420/pyesedb/pyesedb_columns.h0000644000175000017500000000451614610727251021372 0ustar00lordyestalordyesta/* * Python object definition of the sequence and iterator object of columns * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_COLUMNS_H ) #define _PYESEDB_COLUMNS_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_columns pyesedb_columns_t; struct pyesedb_columns { /* Python object initialization */ PyObject_HEAD /* The parent object */ PyObject *parent_object; /* The get item by index callback function */ PyObject* (*get_item_by_index)( PyObject *parent_object, int index ); /* The current index */ int current_index; /* The number of items */ int number_of_items; }; extern PyTypeObject pyesedb_columns_type_object; PyObject *pyesedb_columns_new( PyObject *parent_object, PyObject* (*get_item_by_index)( PyObject *parent_object, int index ), int number_of_items ); int pyesedb_columns_init( pyesedb_columns_t *sequence_object ); void pyesedb_columns_free( pyesedb_columns_t *sequence_object ); Py_ssize_t pyesedb_columns_len( pyesedb_columns_t *sequence_object ); PyObject *pyesedb_columns_getitem( pyesedb_columns_t *sequence_object, Py_ssize_t item_index ); PyObject *pyesedb_columns_iter( pyesedb_columns_t *sequence_object ); PyObject *pyesedb_columns_iternext( pyesedb_columns_t *sequence_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_COLUMNS_H ) */ libesedb-20240420/pyesedb/Makefile.in0000644000175000017500000017203214610746266020101 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = pyesedb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pyexecdir)" LTLIBRARIES = $(pyexec_LTLIBRARIES) @HAVE_PYTHON_TRUE@pyesedb_la_DEPENDENCIES = ../libesedb/libesedb.la am__pyesedb_la_SOURCES_DIST = pyesedb.c pyesedb.h pyesedb_column.c \ pyesedb_column.h pyesedb_column_types.c pyesedb_column_types.h \ pyesedb_columns.c pyesedb_columns.h pyesedb_datetime.c \ pyesedb_datetime.h pyesedb_error.c pyesedb_error.h \ pyesedb_file.c pyesedb_file.h pyesedb_file_object_io_handle.c \ pyesedb_file_object_io_handle.h pyesedb_file_types.c \ pyesedb_file_types.h pyesedb_index.c pyesedb_index.h \ pyesedb_indexes.c pyesedb_indexes.h pyesedb_integer.c \ pyesedb_integer.h pyesedb_libbfio.h pyesedb_libcerror.h \ pyesedb_libclocale.h pyesedb_libesedb.h pyesedb_long_value.c \ pyesedb_long_value.h pyesedb_multi_value.c \ pyesedb_multi_value.h pyesedb_python.h pyesedb_record.c \ pyesedb_record.h pyesedb_records.c pyesedb_records.h \ pyesedb_table.c pyesedb_table.h pyesedb_tables.c \ pyesedb_tables.h pyesedb_unused.h pyesedb_value_flags.c \ pyesedb_value_flags.h @HAVE_PYTHON_TRUE@am_pyesedb_la_OBJECTS = pyesedb_la-pyesedb.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_column.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_column_types.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_columns.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_datetime.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_error.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file_object_io_handle.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file_types.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_index.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_indexes.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_integer.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_long_value.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_multi_value.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_record.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_records.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_table.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_tables.lo \ @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_value_flags.lo pyesedb_la_OBJECTS = $(am_pyesedb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = pyesedb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(pyesedb_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_PYTHON_TRUE@am_pyesedb_la_rpath = -rpath $(pyexecdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/pyesedb_la-pyesedb.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_column.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_column_types.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_columns.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_datetime.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_long_value.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_multi_value.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_record.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_records.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_table.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_tables.Plo \ ./$(DEPDIR)/pyesedb_la-pyesedb_value_flags.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(pyesedb_la_SOURCES) DIST_SOURCES = $(am__pyesedb_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_PYTHON_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_PYTHON_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBESEDB_DLL_IMPORT@ @HAVE_PYTHON_TRUE@pyexec_LTLIBRARIES = pyesedb.la @HAVE_PYTHON_TRUE@pyesedb_la_SOURCES = \ @HAVE_PYTHON_TRUE@ pyesedb.c pyesedb.h \ @HAVE_PYTHON_TRUE@ pyesedb_column.c pyesedb_column.h \ @HAVE_PYTHON_TRUE@ pyesedb_column_types.c pyesedb_column_types.h \ @HAVE_PYTHON_TRUE@ pyesedb_columns.c pyesedb_columns.h \ @HAVE_PYTHON_TRUE@ pyesedb_datetime.c pyesedb_datetime.h \ @HAVE_PYTHON_TRUE@ pyesedb_error.c pyesedb_error.h \ @HAVE_PYTHON_TRUE@ pyesedb_file.c pyesedb_file.h \ @HAVE_PYTHON_TRUE@ pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \ @HAVE_PYTHON_TRUE@ pyesedb_file_types.c pyesedb_file_types.h \ @HAVE_PYTHON_TRUE@ pyesedb_index.c pyesedb_index.h \ @HAVE_PYTHON_TRUE@ pyesedb_indexes.c pyesedb_indexes.h \ @HAVE_PYTHON_TRUE@ pyesedb_integer.c pyesedb_integer.h \ @HAVE_PYTHON_TRUE@ pyesedb_libbfio.h \ @HAVE_PYTHON_TRUE@ pyesedb_libcerror.h \ @HAVE_PYTHON_TRUE@ pyesedb_libclocale.h \ @HAVE_PYTHON_TRUE@ pyesedb_libesedb.h \ @HAVE_PYTHON_TRUE@ pyesedb_long_value.c pyesedb_long_value.h \ @HAVE_PYTHON_TRUE@ pyesedb_multi_value.c pyesedb_multi_value.h \ @HAVE_PYTHON_TRUE@ pyesedb_python.h \ @HAVE_PYTHON_TRUE@ pyesedb_record.c pyesedb_record.h \ @HAVE_PYTHON_TRUE@ pyesedb_records.c pyesedb_records.h \ @HAVE_PYTHON_TRUE@ pyesedb_table.c pyesedb_table.h \ @HAVE_PYTHON_TRUE@ pyesedb_tables.c pyesedb_tables.h \ @HAVE_PYTHON_TRUE@ pyesedb_unused.h \ @HAVE_PYTHON_TRUE@ pyesedb_value_flags.c pyesedb_value_flags.h @HAVE_PYTHON_TRUE@pyesedb_la_LIBADD = \ @HAVE_PYTHON_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_PYTHON_TRUE@ ../libesedb/libesedb.la \ @HAVE_PYTHON_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCSPLIT_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBBFIO_LIBADD@ @HAVE_PYTHON_TRUE@pyesedb_la_CPPFLAGS = $(PYTHON_CPPFLAGS) @HAVE_PYTHON_TRUE@pyesedb_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) DISTCLEANFILES = \ Makefile \ 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 pyesedb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pyesedb/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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) @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 " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } pyesedb.la: $(pyesedb_la_OBJECTS) $(pyesedb_la_DEPENDENCIES) $(EXTRA_pyesedb_la_DEPENDENCIES) $(AM_V_CCLD)$(pyesedb_la_LINK) $(am_pyesedb_la_rpath) $(pyesedb_la_OBJECTS) $(pyesedb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_column.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_column_types.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_columns.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_datetime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_long_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_multi_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_records.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_table.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_tables.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_value_flags.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< pyesedb_la-pyesedb.lo: pyesedb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb.Tpo -c -o pyesedb_la-pyesedb.lo `test -f 'pyesedb.c' || echo '$(srcdir)/'`pyesedb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb.Tpo $(DEPDIR)/pyesedb_la-pyesedb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb.c' object='pyesedb_la-pyesedb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb.lo `test -f 'pyesedb.c' || echo '$(srcdir)/'`pyesedb.c pyesedb_la-pyesedb_column.lo: pyesedb_column.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_column.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_column.Tpo -c -o pyesedb_la-pyesedb_column.lo `test -f 'pyesedb_column.c' || echo '$(srcdir)/'`pyesedb_column.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_column.Tpo $(DEPDIR)/pyesedb_la-pyesedb_column.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_column.c' object='pyesedb_la-pyesedb_column.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_column.lo `test -f 'pyesedb_column.c' || echo '$(srcdir)/'`pyesedb_column.c pyesedb_la-pyesedb_column_types.lo: pyesedb_column_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_column_types.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_column_types.Tpo -c -o pyesedb_la-pyesedb_column_types.lo `test -f 'pyesedb_column_types.c' || echo '$(srcdir)/'`pyesedb_column_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_column_types.Tpo $(DEPDIR)/pyesedb_la-pyesedb_column_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_column_types.c' object='pyesedb_la-pyesedb_column_types.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_column_types.lo `test -f 'pyesedb_column_types.c' || echo '$(srcdir)/'`pyesedb_column_types.c pyesedb_la-pyesedb_columns.lo: pyesedb_columns.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_columns.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_columns.Tpo -c -o pyesedb_la-pyesedb_columns.lo `test -f 'pyesedb_columns.c' || echo '$(srcdir)/'`pyesedb_columns.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_columns.Tpo $(DEPDIR)/pyesedb_la-pyesedb_columns.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_columns.c' object='pyesedb_la-pyesedb_columns.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_columns.lo `test -f 'pyesedb_columns.c' || echo '$(srcdir)/'`pyesedb_columns.c pyesedb_la-pyesedb_datetime.lo: pyesedb_datetime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_datetime.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_datetime.Tpo -c -o pyesedb_la-pyesedb_datetime.lo `test -f 'pyesedb_datetime.c' || echo '$(srcdir)/'`pyesedb_datetime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_datetime.Tpo $(DEPDIR)/pyesedb_la-pyesedb_datetime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_datetime.c' object='pyesedb_la-pyesedb_datetime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_datetime.lo `test -f 'pyesedb_datetime.c' || echo '$(srcdir)/'`pyesedb_datetime.c pyesedb_la-pyesedb_error.lo: pyesedb_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_error.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_error.Tpo -c -o pyesedb_la-pyesedb_error.lo `test -f 'pyesedb_error.c' || echo '$(srcdir)/'`pyesedb_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_error.Tpo $(DEPDIR)/pyesedb_la-pyesedb_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_error.c' object='pyesedb_la-pyesedb_error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_error.lo `test -f 'pyesedb_error.c' || echo '$(srcdir)/'`pyesedb_error.c pyesedb_la-pyesedb_file.lo: pyesedb_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file.Tpo -c -o pyesedb_la-pyesedb_file.lo `test -f 'pyesedb_file.c' || echo '$(srcdir)/'`pyesedb_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file.c' object='pyesedb_la-pyesedb_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file.lo `test -f 'pyesedb_file.c' || echo '$(srcdir)/'`pyesedb_file.c pyesedb_la-pyesedb_file_object_io_handle.lo: pyesedb_file_object_io_handle.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Tpo -c -o pyesedb_la-pyesedb_file_object_io_handle.lo `test -f 'pyesedb_file_object_io_handle.c' || echo '$(srcdir)/'`pyesedb_file_object_io_handle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_object_io_handle.c' object='pyesedb_la-pyesedb_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_object_io_handle.lo `test -f 'pyesedb_file_object_io_handle.c' || echo '$(srcdir)/'`pyesedb_file_object_io_handle.c pyesedb_la-pyesedb_file_types.lo: pyesedb_file_types.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file_types.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_types.c' object='pyesedb_la-pyesedb_file_types.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c pyesedb_la-pyesedb_index.lo: pyesedb_index.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_index.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_index.Tpo -c -o pyesedb_la-pyesedb_index.lo `test -f 'pyesedb_index.c' || echo '$(srcdir)/'`pyesedb_index.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_index.Tpo $(DEPDIR)/pyesedb_la-pyesedb_index.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_index.c' object='pyesedb_la-pyesedb_index.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_index.lo `test -f 'pyesedb_index.c' || echo '$(srcdir)/'`pyesedb_index.c pyesedb_la-pyesedb_indexes.lo: pyesedb_indexes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_indexes.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_indexes.Tpo -c -o pyesedb_la-pyesedb_indexes.lo `test -f 'pyesedb_indexes.c' || echo '$(srcdir)/'`pyesedb_indexes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_indexes.Tpo $(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_indexes.c' object='pyesedb_la-pyesedb_indexes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_indexes.lo `test -f 'pyesedb_indexes.c' || echo '$(srcdir)/'`pyesedb_indexes.c pyesedb_la-pyesedb_integer.lo: pyesedb_integer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_integer.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_integer.Tpo -c -o pyesedb_la-pyesedb_integer.lo `test -f 'pyesedb_integer.c' || echo '$(srcdir)/'`pyesedb_integer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_integer.Tpo $(DEPDIR)/pyesedb_la-pyesedb_integer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_integer.c' object='pyesedb_la-pyesedb_integer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_integer.lo `test -f 'pyesedb_integer.c' || echo '$(srcdir)/'`pyesedb_integer.c pyesedb_la-pyesedb_long_value.lo: pyesedb_long_value.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_long_value.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_long_value.Tpo -c -o pyesedb_la-pyesedb_long_value.lo `test -f 'pyesedb_long_value.c' || echo '$(srcdir)/'`pyesedb_long_value.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_long_value.Tpo $(DEPDIR)/pyesedb_la-pyesedb_long_value.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_long_value.c' object='pyesedb_la-pyesedb_long_value.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_long_value.lo `test -f 'pyesedb_long_value.c' || echo '$(srcdir)/'`pyesedb_long_value.c pyesedb_la-pyesedb_multi_value.lo: pyesedb_multi_value.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_multi_value.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_multi_value.Tpo -c -o pyesedb_la-pyesedb_multi_value.lo `test -f 'pyesedb_multi_value.c' || echo '$(srcdir)/'`pyesedb_multi_value.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_multi_value.Tpo $(DEPDIR)/pyesedb_la-pyesedb_multi_value.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_multi_value.c' object='pyesedb_la-pyesedb_multi_value.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_multi_value.lo `test -f 'pyesedb_multi_value.c' || echo '$(srcdir)/'`pyesedb_multi_value.c pyesedb_la-pyesedb_record.lo: pyesedb_record.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_record.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_record.Tpo -c -o pyesedb_la-pyesedb_record.lo `test -f 'pyesedb_record.c' || echo '$(srcdir)/'`pyesedb_record.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_record.Tpo $(DEPDIR)/pyesedb_la-pyesedb_record.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_record.c' object='pyesedb_la-pyesedb_record.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_record.lo `test -f 'pyesedb_record.c' || echo '$(srcdir)/'`pyesedb_record.c pyesedb_la-pyesedb_records.lo: pyesedb_records.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_records.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_records.Tpo -c -o pyesedb_la-pyesedb_records.lo `test -f 'pyesedb_records.c' || echo '$(srcdir)/'`pyesedb_records.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_records.Tpo $(DEPDIR)/pyesedb_la-pyesedb_records.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_records.c' object='pyesedb_la-pyesedb_records.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_records.lo `test -f 'pyesedb_records.c' || echo '$(srcdir)/'`pyesedb_records.c pyesedb_la-pyesedb_table.lo: pyesedb_table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_table.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_table.Tpo -c -o pyesedb_la-pyesedb_table.lo `test -f 'pyesedb_table.c' || echo '$(srcdir)/'`pyesedb_table.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_table.Tpo $(DEPDIR)/pyesedb_la-pyesedb_table.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_table.c' object='pyesedb_la-pyesedb_table.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_table.lo `test -f 'pyesedb_table.c' || echo '$(srcdir)/'`pyesedb_table.c pyesedb_la-pyesedb_tables.lo: pyesedb_tables.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_tables.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_tables.Tpo -c -o pyesedb_la-pyesedb_tables.lo `test -f 'pyesedb_tables.c' || echo '$(srcdir)/'`pyesedb_tables.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_tables.Tpo $(DEPDIR)/pyesedb_la-pyesedb_tables.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_tables.c' object='pyesedb_la-pyesedb_tables.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_tables.lo `test -f 'pyesedb_tables.c' || echo '$(srcdir)/'`pyesedb_tables.c pyesedb_la-pyesedb_value_flags.lo: pyesedb_value_flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_value_flags.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_value_flags.Tpo -c -o pyesedb_la-pyesedb_value_flags.lo `test -f 'pyesedb_value_flags.c' || echo '$(srcdir)/'`pyesedb_value_flags.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_value_flags.Tpo $(DEPDIR)/pyesedb_la-pyesedb_value_flags.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_value_flags.c' object='pyesedb_la-pyesedb_value_flags.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_value_flags.lo `test -f 'pyesedb_value_flags.c' || echo '$(srcdir)/'`pyesedb_value_flags.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_column.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_column_types.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_columns.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_datetime.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_long_value.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_multi_value.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_record.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_records.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_table.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_tables.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_value_flags.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/pyesedb_la-pyesedb.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_column.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_column_types.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_columns.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_datetime.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_long_value.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_multi_value.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_record.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_records.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_table.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_tables.Plo -rm -f ./$(DEPDIR)/pyesedb_la-pyesedb_value_flags.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-pyexecLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-pyexecLTLIBRARIES .PRECIOUS: 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: libesedb-20240420/pyesedb/pyesedb_value_flags.h0000644000175000017500000000314214610727251022174 0ustar00lordyestalordyesta/* * Python object definition of the libesedb value flags * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_VALUE_FLAGS_H ) #define _PYESEDB_VALUE_FLAGS_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_value_flags pyesedb_value_flags_t; struct pyesedb_value_flags { /* Python object initialization */ PyObject_HEAD }; extern PyTypeObject pyesedb_value_flags_type_object; int pyesedb_value_flags_init_type( PyTypeObject *type_object ); PyObject *pyesedb_value_flags_new( void ); int pyesedb_value_flags_init( pyesedb_value_flags_t *definitions_object ); void pyesedb_value_flags_free( pyesedb_value_flags_t *definitions_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_VALUE_FLAGS_H ) */ libesedb-20240420/pyesedb/pyesedb_file_types.h0000644000175000017500000000312414610727251022047 0ustar00lordyestalordyesta/* * Python object definition of the libesedb file types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_FILE_TYPES_H ) #define _PYESEDB_FILE_TYPES_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_file_types pyesedb_file_types_t; struct pyesedb_file_types { /* Python object initialization */ PyObject_HEAD }; extern PyTypeObject pyesedb_file_types_type_object; int pyesedb_file_types_init_type( PyTypeObject *type_object ); PyObject *pyesedb_file_types_new( void ); int pyesedb_file_types_init( pyesedb_file_types_t *definitions_object ); void pyesedb_file_types_free( pyesedb_file_types_t *definitions_object ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_FILE_TYPES_H ) */ libesedb-20240420/pyesedb/pyesedb_column_types.c0000644000175000017500000002553314610727251022430 0ustar00lordyestalordyesta/* * Python object definition of the libesedb column types * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pyesedb_column_types.h" #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #include "pyesedb_unused.h" PyTypeObject pyesedb_column_types_type_object = { PyVarObject_HEAD_INIT( NULL, 0 ) /* tp_name */ "pyesedb.column_types", /* tp_basicsize */ sizeof( pyesedb_column_types_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pyesedb_column_types_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 */ "pyesedb column types object (wraps LIBESEDB_COLUMN_TYPES)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* 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) pyesedb_column_types_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 }; /* Initializes the type object * Returns 1 if successful or -1 on error */ int pyesedb_column_types_init_type( PyTypeObject *type_object ) { PyObject *value_object = NULL; if( type_object == NULL ) { return( -1 ); } type_object->tp_dict = PyDict_New(); if( type_object->tp_dict == NULL ) { return( -1 ); } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_NULL ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_NULL ); #endif if( PyDict_SetItemString( type_object->tp_dict, "NULL", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_BOOLEAN ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_BOOLEAN ); #endif if( PyDict_SetItemString( type_object->tp_dict, "BOOLEAN", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_8BIT_UNSIGNED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_16BIT_SIGNED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_32BIT_SIGNED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_CURRENCY ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_CURRENCY ); #endif if( PyDict_SetItemString( type_object->tp_dict, "CURRENCY", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_FLOAT_32BIT ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_FLOAT_32BIT ); #endif if( PyDict_SetItemString( type_object->tp_dict, "FLOAT_32BIT", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT ); #endif if( PyDict_SetItemString( type_object->tp_dict, "DOUBLE_64BIT", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_DATE_TIME ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_DATE_TIME ); #endif if( PyDict_SetItemString( type_object->tp_dict, "DATE_TIME", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_BINARY_DATA ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_BINARY_DATA ); #endif if( PyDict_SetItemString( type_object->tp_dict, "BINARY_DATA", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_TEXT ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_TEXT ); #endif if( PyDict_SetItemString( type_object->tp_dict, "TEXT", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA ); #endif if( PyDict_SetItemString( type_object->tp_dict, "LARGE_BINARY_DATA", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_LARGE_TEXT ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_LARGE_TEXT ); #endif if( PyDict_SetItemString( type_object->tp_dict, "LARGE_TEXT", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE ); #endif if( PyDict_SetItemString( type_object->tp_dict, "SUPER_LARGE_VALUE", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_32BIT_UNSIGNED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_64BIT_SIGNED", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_GUID ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_GUID ); #endif if( PyDict_SetItemString( type_object->tp_dict, "GUID", value_object ) != 0 ) { goto on_error; } #if PY_MAJOR_VERSION >= 3 value_object = PyLong_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED ); #else value_object = PyInt_FromLong( LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED ); #endif if( PyDict_SetItemString( type_object->tp_dict, "INTEGER_16BIT_UNSIGNED", value_object ) != 0 ) { goto on_error; } return( 1 ); on_error: if( type_object->tp_dict != NULL ) { Py_DecRef( type_object->tp_dict ); type_object->tp_dict = NULL; } return( -1 ); } /* Creates a new column types object * Returns a Python object if successful or NULL on error */ PyObject *pyesedb_column_types_new( void ) { pyesedb_column_types_t *definitions_object = NULL; static char *function = "pyesedb_column_types_new"; definitions_object = PyObject_New( struct pyesedb_column_types, &pyesedb_column_types_type_object ); if( definitions_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create definitions object.", function ); goto on_error; } if( pyesedb_column_types_init( definitions_object ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize definitions object.", function ); goto on_error; } return( (PyObject *) definitions_object ); on_error: if( definitions_object != NULL ) { Py_DecRef( (PyObject *) definitions_object ); } return( NULL ); } /* Initializes a column types object * Returns 0 if successful or -1 on error */ int pyesedb_column_types_init( pyesedb_column_types_t *definitions_object ) { static char *function = "pyesedb_column_types_init"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return( -1 ); } return( 0 ); } /* Frees a column types object */ void pyesedb_column_types_free( pyesedb_column_types_t *definitions_object ) { struct _typeobject *ob_type = NULL; static char *function = "pyesedb_column_types_free"; if( definitions_object == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid definitions object.", function ); return; } ob_type = Py_TYPE( definitions_object ); if( ob_type == NULL ) { PyErr_Format( PyExc_ValueError, "%s: missing ob_type.", function ); return; } if( ob_type->tp_free == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid ob_type - missing tp_free.", function ); return; } ob_type->tp_free( (PyObject*) definitions_object ); } libesedb-20240420/pyesedb/pyesedb_record.h0000644000175000017500000000701214610727625021167 0ustar00lordyestalordyesta/* * Python object wrapper of libesedb_record_t * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _PYESEDB_RECORD_H ) #define _PYESEDB_RECORD_H #include #include #include "pyesedb_libesedb.h" #include "pyesedb_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pyesedb_record pyesedb_record_t; struct pyesedb_record { /* Python object initialization */ PyObject_HEAD /* The libesedb record */ libesedb_record_t *record; /* The parent (table or index) object */ PyObject *parent_object; }; extern PyMethodDef pyesedb_record_object_methods[]; extern PyTypeObject pyesedb_record_type_object; PyObject *pyesedb_record_new( libesedb_record_t *record, PyObject *parent_object ); int pyesedb_record_init( pyesedb_record_t *pyesedb_record ); void pyesedb_record_free( pyesedb_record_t *pyesedb_record ); PyObject *pyesedb_record_get_number_of_values( pyesedb_record_t *pyesedb_record, PyObject *arguments ); PyObject *pyesedb_record_get_column_type( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_column_name( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_flags( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_is_long_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_is_multi_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_as_boolean( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_as_floating_point( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_as_integer( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_as_string( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); PyObject *pyesedb_record_get_value_data_as_long_value( pyesedb_record_t *pyesedb_record, PyObject *arguments, PyObject *keywords ); #if defined( __cplusplus ) } #endif #endif /* !defined( _PYESEDB_RECORD_H ) */ libesedb-20240420/config.rpath0000755000175000017500000004421614533041675016707 0ustar00lordyestalordyesta#! /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-2020 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 _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; 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 _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no 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 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 aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # 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 ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-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 ;; 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 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 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*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; 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. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) 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=: ;; *nto* | *qnx*) ;; 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 _LT_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' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) 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' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) 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 | kopensolaris*-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' ;; tpf*) 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 program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_THREAD_H ) #define _LIBCTHREADS_INTERNAL_THREAD_H #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_thread libcthreads_internal_thread_t; struct libcthreads_internal_thread { #if defined( WINAPI ) /* The thread handle */ HANDLE thread_handle; /* The thread identifier */ DWORD thread_identifier; #elif defined( HAVE_PTHREAD_H ) /* The thread */ pthread_t thread; #else #error Missing thread type #endif /* The callback function */ int (*callback_function)( void *arguments ); /* The callback function arguments */ void *callback_function_arguments; }; LIBCTHREADS_EXTERN \ int libcthreads_thread_create( libcthreads_thread_t **thread, const libcthreads_thread_attributes_t *thread_attributes, int (*callback_function)( void *arguments ), void *callback_function_arguments, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_thread_join( libcthreads_thread_t **thread, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_THREAD_H ) */ libesedb-20240420/libcthreads/libcthreads_read_write_lock.h0000644000175000017500000000617314610746233024533 0ustar00lordyestalordyesta/* * Read/Write lock functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H ) #define _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_read_write_lock libcthreads_internal_read_write_lock_t; struct libcthreads_internal_read_write_lock { #if defined( WINAPI ) && ( WINVER >= 0x0600 ) /* The slim read/write lock */ SRWLOCK slim_read_write_lock; #elif defined( WINAPI ) /* The read critical section */ CRITICAL_SECTION read_critical_section; /* The write critical section */ CRITICAL_SECTION write_critical_section; /* The number of readers */ int number_of_readers; /* The no read event handle */ HANDLE no_read_event_handle; #elif defined( HAVE_PTHREAD_H ) /* The read/write lock */ pthread_rwlock_t read_write_lock; #else #error Missing read/write lock type #endif }; LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_initialize( libcthreads_read_write_lock_t **read_write_lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_free( libcthreads_read_write_lock_t **read_write_lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_grab_for_read( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_grab_for_write( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_release_for_read( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_read_write_lock_release_for_write( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H ) */ libesedb-20240420/libcthreads/libcthreads_thread.c0000644000175000017500000002372614610746233022643 0ustar00lordyestalordyesta/* * Thread functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_libcerror.h" #include "libcthreads_thread.h" #include "libcthreads_thread_attributes.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) #if defined( WINAPI ) /* Start function helper function for WINAPI * Returns 0 if successful or 1 on error */ DWORD WINAPI libcthreads_thread_callback_function_helper( void *arguments ) { libcthreads_internal_thread_t *internal_thread = NULL; DWORD result = 1; int callback_function_result = 0; if( arguments != NULL ) { internal_thread = (libcthreads_internal_thread_t *) arguments; if( ( internal_thread != NULL ) && ( internal_thread->callback_function != NULL ) ) { callback_function_result = internal_thread->callback_function( internal_thread->callback_function_arguments ); } result = (DWORD) ( callback_function_result != 1 ); } ExitThread( result ); } #elif defined( HAVE_PTHREAD_H ) /* Start function helper function for pthread * Returns a pointer to a newly allocated int containing 1 if successful or -1 on error * NULL is return if the helper function was unable to run the callback */ void *libcthreads_thread_callback_function_helper( void *arguments ) { libcthreads_internal_thread_t *internal_thread = NULL; int *result = NULL; if( arguments != NULL ) { internal_thread = (libcthreads_internal_thread_t *) arguments; if( ( internal_thread != NULL ) && ( internal_thread->callback_function != NULL ) ) { result = (int *) memory_allocate( sizeof( int ) ); if( result != NULL ) { *result = internal_thread->callback_function( internal_thread->callback_function_arguments ); } } } pthread_exit( (void *) result ); } #endif /* Creates a thread * Make sure the value thread is referencing, is set to NULL * * The callback_function should return 1 if successful and -1 on error * Returns 1 if successful or -1 on error */ int libcthreads_thread_create( libcthreads_thread_t **thread, const libcthreads_thread_attributes_t *thread_attributes, int (*callback_function)( void *arguments ), void *callback_function_arguments, libcerror_error_t **error ) { libcthreads_internal_thread_t *internal_thread = NULL; static char *function = "libcthreads_thread_create"; #if defined( WINAPI ) SECURITY_ATTRIBUTES *security_attributes = NULL; HANDLE thread_handle = NULL; DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) pthread_attr_t *attributes = NULL; int pthread_result = 0; #endif if( thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread.", function ); return( -1 ); } if( *thread != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid thread value already set.", function ); return( -1 ); } if( callback_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid callback function.", function ); return( -1 ); } internal_thread = memory_allocate_structure( libcthreads_internal_thread_t ); if( internal_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create thread.", function ); goto on_error; } if( memory_set( internal_thread, 0, sizeof( libcthreads_internal_thread_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear thread.", function ); memory_free( internal_thread ); return( -1 ); } internal_thread->callback_function = callback_function; internal_thread->callback_function_arguments = callback_function_arguments; #if defined( WINAPI ) if( thread_attributes != NULL ) { security_attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->security_attributes ); } thread_handle = CreateThread( security_attributes, 0, /* stack size */ &libcthreads_thread_callback_function_helper, (void *) internal_thread, 0, /* creation flags */ &( internal_thread->thread_identifier ) ); if( thread_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread handle.", function ); goto on_error; } internal_thread->thread_handle = thread_handle; #elif defined( HAVE_PTHREAD_H ) if( thread_attributes != NULL ) { attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->attributes ); } pthread_result = pthread_create( &( internal_thread->thread ), attributes, &libcthreads_thread_callback_function_helper, (void *) internal_thread ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread.", function ); goto on_error; } #endif *thread = (libcthreads_thread_t *) internal_thread; return( 1 ); on_error: if( internal_thread != NULL ) { memory_free( internal_thread ); } return( -1 ); } /* Joins the current with a specified thread * The the thread is freed after join * Returns 1 if successful or -1 on error */ int libcthreads_thread_join( libcthreads_thread_t **thread, libcerror_error_t **error ) { libcthreads_internal_thread_t *internal_thread = NULL; static char *function = "libcthreads_thread_join"; int result = 1; #if defined( WINAPI ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) int *thread_return_value = NULL; int pthread_result = 0; #endif if( thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread.", function ); return( -1 ); } if( *thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing thread value.", function ); return( -1 ); } internal_thread = (libcthreads_internal_thread_t *) *thread; *thread = NULL; #if defined( WINAPI ) wait_status = WaitForSingleObject( internal_thread->thread_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: wait for thread failed.", function ); result = -1; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_join( internal_thread->thread, (void **) &thread_return_value ); if( pthread_result == EDEADLK ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread with error: Deadlock condition detected.", function ); result = -1; } else if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread.", function ); result = -1; } /* If the thread returns NULL it never got around to launching the callback function */ else if( ( thread_return_value != NULL ) && ( *thread_return_value != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: thread returned an error status of: %d.", function, *thread_return_value ); result = -1; } if( thread_return_value != NULL ) { memory_free( thread_return_value ); thread_return_value = NULL; } #endif memory_free( internal_thread ); return( result ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_thread_pool.h0000644000175000017500000001011714610746233023667 0ustar00lordyestalordyesta/* * Thread pool functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_THREAD_POOL_H ) #define _LIBCTHREADS_INTERNAL_THREAD_POOL_H #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_thread_pool libcthreads_internal_thread_pool_t; struct libcthreads_internal_thread_pool { #if defined( WINAPI ) && ( WINVER >= 0x0602 ) /* The thread pool */ TP_POOL *thread_pool; /* The cleanup group. */ TP_CLEANUP_GROUP *cleanup_group; /* The callback environment */ TP_CALLBACK_ENVIRON callback_environment; #else /* The number of threads in the pool */ int number_of_threads; #if defined( WINAPI ) /* The thread handles array */ HANDLE *thread_handles_array; /* The thread identifiers array */ DWORD *thread_identifiers_array; #elif defined( HAVE_PTHREAD_H ) /* The threads array */ pthread_t *threads_array; #else #error Missing thread type #endif #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ /* The callback function */ int (*callback_function)( intptr_t *value, void *arguments ); /* The value function arguments */ void *callback_function_arguments; /* The (current) pop index */ int pop_index; /* The (current) push index */ int push_index; /* The number of values */ int number_of_values; /* The allocated number of values */ int allocated_number_of_values; /* The values array */ intptr_t **values_array; /* The condition mutex */ libcthreads_mutex_t *condition_mutex; /* The queue empty condition */ libcthreads_condition_t *empty_condition; /* The queue full condition */ libcthreads_condition_t *full_condition; /* The status */ uint8_t status; }; LIBCTHREADS_EXTERN \ int libcthreads_thread_pool_create( libcthreads_thread_pool_t **thread_pool, const libcthreads_thread_attributes_t *thread_attributes, int number_of_threads, int maximum_number_of_values, int (*callback_function)( intptr_t *value, void *arguments ), void *callback_function_arguments, libcerror_error_t **error ); int libcthreads_internal_thread_pool_pop( libcthreads_internal_thread_pool_t *internal_thread_pool, intptr_t **value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_thread_pool_push( libcthreads_thread_pool_t *thread_pool, intptr_t *value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_thread_pool_push_sorted( libcthreads_thread_pool_t *thread_pool, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t sort_flags, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_thread_pool_join( libcthreads_thread_pool_t **thread_pool, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_THREAD_POOL_H ) */ libesedb-20240420/libcthreads/libcthreads_support.h0000644000175000017500000000234614610746233023110 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_SUPPORT_H ) #define _LIBCTHREADS_SUPPORT_H #include #include #include "libcthreads_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) LIBCTHREADS_EXTERN \ const char *libcthreads_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_SUPPORT_H ) */ libesedb-20240420/libcthreads/libcthreads_lock.h0000644000175000017500000000424014610746233022317 0ustar00lordyestalordyesta/* * Lock functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_LOCK_H ) #define _LIBCTHREADS_INTERNAL_LOCK_H #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_lock libcthreads_internal_lock_t; struct libcthreads_internal_lock { #if defined( WINAPI ) /* The critical section */ CRITICAL_SECTION critical_section; #elif defined( HAVE_PTHREAD_H ) /* The mutex */ pthread_mutex_t mutex; #else #error Missing lock type #endif }; LIBCTHREADS_EXTERN \ int libcthreads_lock_initialize( libcthreads_lock_t **lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_lock_free( libcthreads_lock_t **lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_lock_grab( const libcthreads_lock_t *lock, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_lock_release( const libcthreads_lock_t *lock, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_LOCK_H ) */ libesedb-20240420/libcthreads/libcthreads_unused.h0000644000175000017500000000263014610746233022673 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_UNUSED_H ) #define _LIBCTHREADS_UNUSED_H #include #if !defined( LIBCTHREADS_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCTHREADS_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCTHREADS_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCTHREADS_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCTHREADS_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBCTHREADS_UNUSED_H ) */ libesedb-20240420/libcthreads/libcthreads_lock.c0000644000175000017500000002106114610746233022312 0ustar00lordyestalordyesta/* * Lock functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_libcerror.h" #include "libcthreads_lock.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates a lock * Make sure the value lock is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_lock_initialize( libcthreads_lock_t **lock, libcerror_error_t **error ) { libcthreads_internal_lock_t *internal_lock = NULL; static char *function = "libcthreads_lock_initialize"; #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid lock.", function ); return( -1 ); } if( *lock != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid lock value already set.", function ); return( -1 ); } internal_lock = memory_allocate_structure( libcthreads_internal_lock_t ); if( internal_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create lock.", function ); goto on_error; } if( memory_set( internal_lock, 0, sizeof( libcthreads_internal_lock_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear lock.", function ); memory_free( internal_lock ); return( -1 ); } #if defined( WINAPI ) InitializeCriticalSection( &( internal_lock->critical_section ) ); #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_init( &( internal_lock->mutex ), NULL ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize mutex with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize mutex.", function ); goto on_error; } #endif *lock = (libcthreads_lock_t *) internal_lock; return( 1 ); on_error: if( internal_lock != NULL ) { memory_free( internal_lock ); } return( -1 ); } /* Frees a lock * Returns 1 if successful or -1 on error */ int libcthreads_lock_free( libcthreads_lock_t **lock, libcerror_error_t **error ) { libcthreads_internal_lock_t *internal_lock = NULL; static char *function = "libcthreads_lock_free"; int result = 1; #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid lock.", function ); return( -1 ); } if( *lock != NULL ) { internal_lock = (libcthreads_internal_lock_t *) *lock; *lock = NULL; #if defined( WINAPI ) DeleteCriticalSection( &( internal_lock->critical_section ) ); #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_destroy( &( internal_lock->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex with error: Insufficient resources.", function ); result = -1; break; case EBUSY: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex with error: Resource busy.", function ); result = -1; break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex.", function ); result = -1; break; } #endif memory_free( internal_lock ); } return( result ); } /* Grabs a lock * Returns 1 if successful or -1 on error */ int libcthreads_lock_grab( const libcthreads_lock_t *lock, libcerror_error_t **error ) { libcthreads_internal_lock_t *internal_lock = NULL; static char *function = "libcthreads_lock_grab"; #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid lock.", function ); return( -1 ); } internal_lock = (libcthreads_internal_lock_t *) lock; #if defined( WINAPI ) EnterCriticalSection( &( internal_lock->critical_section ) ); #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_lock( &( internal_lock->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex.", function ); return( -1 ); } #endif return( 1 ); } /* Releases a lock * Returns 1 if successful or -1 on error */ int libcthreads_lock_release( const libcthreads_lock_t *lock, libcerror_error_t **error ) { libcthreads_internal_lock_t *internal_lock = NULL; static char *function = "libcthreads_lock_release"; #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid lock.", function ); return( -1 ); } internal_lock = (libcthreads_internal_lock_t *) lock; #if defined( WINAPI ) LeaveCriticalSection( &( internal_lock->critical_section ) ); #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_unlock( &( internal_lock->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_condition.h0000644000175000017500000000574014610746233023363 0ustar00lordyestalordyesta/* * Condition functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_CONDITION_H ) #define _LIBCTHREADS_INTERNAL_CONDITION_H #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_condition libcthreads_internal_condition_t; struct libcthreads_internal_condition { #if defined( WINAPI ) && ( WINVER >= 0x0600 ) /* The condition variable */ CONDITION_VARIABLE condition_variable; #elif defined( WINAPI ) /* The number of waiting threads */ int number_of_waiting_threads; /* The wait critical section */ CRITICAL_SECTION wait_critical_section; /* Semaphore handle used to signal the waiting threads */ HANDLE signal_semaphore_handle; /* Event handle used to signal the waiting threads */ HANDLE signal_event_handle; /* Value to indicate last signal was a broadcast */ uint8_t signal_is_broadcast; #elif defined( HAVE_PTHREAD_H ) /* The condition */ pthread_cond_t condition; #else #error Missing condition type #endif }; LIBCTHREADS_EXTERN \ int libcthreads_condition_initialize( libcthreads_condition_t **condition, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_condition_free( libcthreads_condition_t **condition, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_condition_broadcast( libcthreads_condition_t *condition, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_condition_signal( libcthreads_condition_t *condition, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_condition_wait( libcthreads_condition_t *condition, libcthreads_mutex_t *mutex, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_CONDITION_H ) */ libesedb-20240420/libcthreads/libcthreads_repeating_thread.h0000644000175000017500000000546614610746233024707 0ustar00lordyestalordyesta/* * Repeating thread functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_REPEATING_THREAD_H ) #define _LIBCTHREADS_INTERNAL_REPEATING_THREAD_H #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_repeating_thread libcthreads_internal_repeating_thread_t; struct libcthreads_internal_repeating_thread { #if defined( WINAPI ) /* The thread handle */ HANDLE thread_handle; /* The thread identifier */ DWORD thread_identifier; #elif defined( HAVE_PTHREAD_H ) /* The thread */ pthread_t thread; #else #error Missing thread type #endif /* The start function */ int (*start_function)( void *arguments ); /* The start function arguments */ void *start_function_arguments; /* The start functions return value */ int start_function_result; /* The condition mutex */ libcthreads_mutex_t *condition_mutex; /* The status condition */ libcthreads_condition_t *status_condition; /* The status */ uint8_t status; }; LIBCTHREADS_EXTERN \ int libcthreads_repeating_thread_create( libcthreads_repeating_thread_t **repeating_thread, const libcthreads_thread_attributes_t *thread_attributes, int (*start_function)( void *arguments ), void *start_function_arguments, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_repeating_thread_push( libcthreads_repeating_thread_t *repeating_thread, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_repeating_thread_join( libcthreads_repeating_thread_t **repeating_thread, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_REPEATING_THREAD_H ) */ libesedb-20240420/libcthreads/Makefile.am0000644000175000017500000000221714610746233020710 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCTHREADS AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libcthreads.la libcthreads_la_SOURCES = \ libcthreads_condition.c libcthreads_condition.h \ libcthreads_definitions.h \ libcthreads_error.c libcthreads_error.h \ libcthreads_extern.h \ libcthreads_libcerror.h \ libcthreads_lock.c libcthreads_lock.h \ libcthreads_mutex.c libcthreads_mutex.h \ libcthreads_queue.c libcthreads_queue.h \ libcthreads_read_write_lock.c libcthreads_read_write_lock.h \ libcthreads_repeating_thread.c libcthreads_repeating_thread.h \ libcthreads_support.c libcthreads_support.h \ libcthreads_thread.c libcthreads_thread.h \ libcthreads_thread_attributes.c libcthreads_thread_attributes.h \ libcthreads_thread_pool.c libcthreads_thread_pool.h \ libcthreads_types.h \ libcthreads_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcthreads ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcthreads_la_SOURCES) libesedb-20240420/libcthreads/libcthreads_support.c0000644000175000017500000000222214610746233023074 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libcthreads_definitions.h" #include "libcthreads_support.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) /* Returns the library version as a string */ const char *libcthreads_get_version( void ) { return( (const char *) LIBCTHREADS_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ libesedb-20240420/libcthreads/libcthreads_mutex.c0000644000175000017500000003244114610746233022530 0ustar00lordyestalordyesta/* * Mutex functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_libcerror.h" #include "libcthreads_mutex.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates a mutex * Make sure the value mutex is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_mutex_initialize( libcthreads_mutex_t **mutex, libcerror_error_t **error ) { libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_mutex_initialize"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } if( *mutex != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid mutex value already set.", function ); return( -1 ); } internal_mutex = memory_allocate_structure( libcthreads_internal_mutex_t ); if( internal_mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create mutex.", function ); goto on_error; } if( memory_set( internal_mutex, 0, sizeof( libcthreads_internal_mutex_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear mutex.", function ); memory_free( internal_mutex ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0600 ) InitializeCriticalSection( &( internal_mutex->critical_section ) ); #elif defined( WINAPI ) internal_mutex->mutex_handle = CreateMutex( NULL, FALSE, NULL ); if( internal_mutex->mutex_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize mutex handle.", function ); goto on_error; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_init( &( internal_mutex->mutex ), NULL ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize mutex with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize mutex.", function ); goto on_error; } #endif *mutex = (libcthreads_mutex_t *) internal_mutex; return( 1 ); on_error: if( internal_mutex != NULL ) { memory_free( internal_mutex ); } return( -1 ); } /* Frees a mutex * Returns 1 if successful or -1 on error */ int libcthreads_mutex_free( libcthreads_mutex_t **mutex, libcerror_error_t **error ) { libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_mutex_free"; int result = 1; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } if( *mutex != NULL ) { internal_mutex = (libcthreads_internal_mutex_t *) *mutex; *mutex = NULL; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) DeleteCriticalSection( &( internal_mutex->critical_section ) ); #elif defined( WINAPI ) if( CloseHandle( internal_mutex->mutex_handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free mutex handle.", function ); result = -1; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_destroy( &( internal_mutex->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex with error: Insufficient resources.", function ); result = -1; break; case EBUSY: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex with error: Resource busy.", function ); result = -1; break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy mutex.", function ); result = -1; break; } #endif memory_free( internal_mutex ); } return( result ); } /* Grabs a mutex * Returns 1 if successful or -1 on error */ int libcthreads_mutex_grab( libcthreads_mutex_t *mutex, libcerror_error_t **error ) { libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_mutex_grab"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } internal_mutex = (libcthreads_internal_mutex_t *) mutex; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) EnterCriticalSection( &( internal_mutex->critical_section ) ); #elif defined( WINAPI ) wait_status = WaitForSingleObject( internal_mutex->mutex_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: wait for mutex handle failed.", function ); return( -1 ); } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_lock( &( internal_mutex->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock mutex.", function ); return( -1 ); } #endif return( 1 ); } /* Tries to grabs a mutex * Returns 1 if successful, 0 if not or -1 on error */ int libcthreads_mutex_try_grab( libcthreads_mutex_t *mutex, libcerror_error_t **error ) { libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_mutex_try_grab"; int result = 1; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } internal_mutex = (libcthreads_internal_mutex_t *) mutex; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) if( TryEnterCriticalSection( &( internal_mutex->critical_section ) ) != 0 ) { result = 1; } else { result = 0; } #elif defined( WINAPI ) wait_status = WaitForSingleObject( internal_mutex->mutex_handle, 0 ); if( wait_status == WAIT_TIMEOUT ) { result = 0; } else if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: wait for mutex handle failed.", function ); return( -1 ); } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_trylock( &( internal_mutex->mutex ) ); switch( pthread_result ) { case 0: break; case EBUSY: result = 0; break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to try lock mutex with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to try lock mutex with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to try lock mutex.", function ); return( -1 ); } #endif return( result ); } /* Releases a mutex * Returns 1 if successful or -1 on error */ int libcthreads_mutex_release( libcthreads_mutex_t *mutex, libcerror_error_t **error ) { libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_mutex_release"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; BOOL result = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } internal_mutex = (libcthreads_internal_mutex_t *) mutex; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) LeaveCriticalSection( &( internal_mutex->critical_section ) ); #elif defined( WINAPI ) result = ReleaseMutex( internal_mutex->mutex_handle ); if( result == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to relates mutex handle.", function ); return( -1 ); } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_mutex_unlock( &( internal_mutex->mutex ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to unlock mutex.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_queue.c0000644000175000017500000006362714610746233022524 0ustar00lordyestalordyesta/* * Queue functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcthreads_condition.h" #include "libcthreads_definitions.h" #include "libcthreads_libcerror.h" #include "libcthreads_mutex.h" #include "libcthreads_queue.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates a queue * Make sure the value queue is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_queue_initialize( libcthreads_queue_t **queue, int maximum_number_of_values, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_initialize"; size_t values_array_size = 0; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } if( *queue != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid queue value already set.", function ); return( -1 ); } if( maximum_number_of_values < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid maximum number of values value less than zero.", function ); return( -1 ); } #if SIZEOF_INT <= SIZEOF_SIZE_T if( (size_t) maximum_number_of_values > (size_t) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #else if( maximum_number_of_values > (int) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum number of values value exceeds maximum.", function ); return( -1 ); } values_array_size = sizeof( intptr_t * ) * maximum_number_of_values; if( values_array_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid values array size value exceeds maximum.", function ); goto on_error; } internal_queue = memory_allocate_structure( libcthreads_internal_queue_t ); if( internal_queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create queue.", function ); goto on_error; } if( memory_set( internal_queue, 0, sizeof( libcthreads_internal_queue_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear queue.", function ); memory_free( internal_queue ); return( -1 ); } internal_queue->values_array = (intptr_t **) memory_allocate( values_array_size ); if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create values array.", function ); goto on_error; } if( memory_set( internal_queue->values_array, 0, values_array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear values array.", function ); goto on_error; } internal_queue->allocated_number_of_values = maximum_number_of_values; if( libcthreads_mutex_initialize( &( internal_queue->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create condition mutex.", function ); goto on_error; } if( libcthreads_condition_initialize( &( internal_queue->empty_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create empty condition.", function ); goto on_error; } if( libcthreads_condition_initialize( &( internal_queue->full_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create full condition.", function ); goto on_error; } *queue = (libcthreads_queue_t *) internal_queue; return( 1 ); on_error: if( internal_queue != NULL ) { if( internal_queue->empty_condition != NULL ) { libcthreads_condition_free( &( internal_queue->empty_condition ), NULL ); } if( internal_queue->condition_mutex != NULL ) { libcthreads_mutex_free( &( internal_queue->condition_mutex ), NULL ); } if( internal_queue->values_array != NULL ) { memory_free( internal_queue->values_array ); } memory_free( internal_queue ); } return( -1 ); } /* Frees a queue * Uses the value_free_function to free the value * Returns 1 if successful or -1 on error */ int libcthreads_queue_free( libcthreads_queue_t **queue, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_free"; int result = 1; int value_index = 0; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } if( *queue != NULL ) { internal_queue = (libcthreads_internal_queue_t *) *queue; *queue = NULL; if( value_free_function != NULL ) { for( value_index = 0; value_index < internal_queue->number_of_values; value_index++ ) { if( value_free_function( &( internal_queue->values_array[ value_index ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value: %d.", function, value_index ); result = -1; } } } memory_free( internal_queue->values_array ); if( libcthreads_condition_free( &( internal_queue->full_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free full condition.", function ); result = -1; } if( libcthreads_condition_free( &( internal_queue->empty_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free empty condition.", function ); result = -1; } if( libcthreads_mutex_free( &( internal_queue->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free condition mutex.", function ); result = -1; } memory_free( internal_queue ); } return( result ); } /* Empties a queue * Returns 1 if successful or -1 on error */ int libcthreads_queue_empty( libcthreads_queue_t *queue, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_empty"; int result = 1; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", function ); return( -1 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_queue->number_of_values != 0 ) { if( libcthreads_condition_wait( internal_queue->full_condition, internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } /* Tries to pop a value off the queue * Returns 1 if successful, 0 if not or -1 on error */ int libcthreads_queue_try_pop( libcthreads_queue_t *queue, intptr_t **value, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_try_pop"; int result = 1; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } if( internal_queue->number_of_values == 0 ) { result = 0; } else { *value = internal_queue->values_array[ internal_queue->pop_index ]; internal_queue->pop_index++; if( internal_queue->pop_index >= internal_queue->allocated_number_of_values ) { internal_queue->pop_index = 0; } internal_queue->number_of_values--; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_queue->full_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast full condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } /* Pops a value off the queue * Returns 1 if successful or -1 on error */ int libcthreads_queue_pop( libcthreads_queue_t *queue, intptr_t **value, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_pop"; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_queue->number_of_values == 0 ) { if( libcthreads_condition_wait( internal_queue->empty_condition, internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for empty condition.", function ); goto on_error; } } *value = internal_queue->values_array[ internal_queue->pop_index ]; internal_queue->pop_index++; if( internal_queue->pop_index >= internal_queue->allocated_number_of_values ) { internal_queue->pop_index = 0; } internal_queue->number_of_values--; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_queue->full_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast full condition.", function ); goto on_error; } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( 1 ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } /* Tries to push a value onto the queue * Returns 1 if successful, 0 if not or -1 on error */ int libcthreads_queue_try_push( libcthreads_queue_t *queue, intptr_t *value, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_try_push"; int result = 1; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } if( internal_queue->number_of_values == internal_queue->allocated_number_of_values ) { result = 0; } else { internal_queue->values_array[ internal_queue->push_index ] = value; internal_queue->push_index++; if( internal_queue->push_index >= internal_queue->allocated_number_of_values ) { internal_queue->push_index = 0; } internal_queue->number_of_values++; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_queue->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } /* Pushes a value onto the queue * Returns 1 if successful or -1 on error */ int libcthreads_queue_push( libcthreads_queue_t *queue, intptr_t *value, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_push"; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_queue->number_of_values == internal_queue->allocated_number_of_values ) { if( libcthreads_condition_wait( internal_queue->full_condition, internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); goto on_error; } } internal_queue->values_array[ internal_queue->push_index ] = value; internal_queue->push_index++; if( internal_queue->push_index >= internal_queue->allocated_number_of_values ) { internal_queue->push_index = 0; } internal_queue->number_of_values++; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_queue->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); goto on_error; } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( 1 ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } /* Pushes a value onto the queue in sorted order * * Uses the value_compare_function to determine the similarity of the values * The value_compare_function should return LIBCTHREADS_COMPARE_LESS, * LIBCTHREADS_COMPARE_EQUAL, LIBCTHREADS_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if the value already exists or -1 on error */ int libcthreads_queue_push_sorted( libcthreads_queue_t *queue, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t sort_flags, libcerror_error_t **error ) { libcthreads_internal_queue_t *internal_queue = NULL; static char *function = "libcthreads_queue_push_sorted"; int compare_result = 0; int pop_index = 0; int previous_push_index = 0; int push_index = 0; int result = 1; int value_index = 0; if( queue == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid queue.", function ); return( -1 ); } internal_queue = (libcthreads_internal_queue_t *) queue; if( internal_queue->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } 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( ( sort_flags & ~( LIBCTHREADS_SORT_FLAG_UNIQUE_VALUES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported sort flags: 0x%02" PRIx8 ".", function, sort_flags ); return( -1 ); } if( libcthreads_mutex_grab( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_queue->number_of_values == internal_queue->allocated_number_of_values ) { if( libcthreads_condition_wait( internal_queue->full_condition, internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); goto on_error; } } pop_index = internal_queue->pop_index; for( value_index = 0; value_index < internal_queue->number_of_values; value_index++ ) { compare_result = value_compare_function( value, internal_queue->values_array[ pop_index ], error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare value: %d.", function, value_index ); goto on_error; } else if( compare_result == LIBCTHREADS_COMPARE_EQUAL ) { if( ( sort_flags & LIBCTHREADS_SORT_FLAG_UNIQUE_VALUES ) != 0 ) { result = 0; break; } } else if( compare_result == LIBCTHREADS_COMPARE_LESS ) { result = 1; break; } else if( compare_result != LIBCTHREADS_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, compare_result ); goto on_error; } pop_index++; if( pop_index >= internal_queue->allocated_number_of_values ) { pop_index = 0; } } if( result != 0 ) { push_index = internal_queue->push_index; if( compare_result == LIBCTHREADS_COMPARE_LESS ) { previous_push_index = push_index - 1; while( push_index != pop_index ) { if( previous_push_index < 0 ) { previous_push_index = internal_queue->allocated_number_of_values - 1; } internal_queue->values_array[ push_index ] = internal_queue->values_array[ previous_push_index ]; push_index = previous_push_index; previous_push_index--; } } internal_queue->values_array[ push_index ] = value; internal_queue->push_index++; if( internal_queue->push_index >= internal_queue->allocated_number_of_values ) { internal_queue->push_index = 0; } internal_queue->number_of_values++; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_queue->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_queue->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); on_error: libcthreads_mutex_release( internal_queue->condition_mutex, NULL ); return( -1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_mutex.h0000644000175000017500000000460214610746233022533 0ustar00lordyestalordyesta/* * Mutex functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_MUTEX_H ) #define _LIBCTHREADS_INTERNAL_MUTEX_H #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_mutex libcthreads_internal_mutex_t; struct libcthreads_internal_mutex { #if defined( WINAPI ) && ( WINVER >= 0x0600 ) /* The critical section */ CRITICAL_SECTION critical_section; #elif defined( WINAPI ) /* The mutex handle */ HANDLE mutex_handle; #elif defined( HAVE_PTHREAD_H ) /* The mutex */ pthread_mutex_t mutex; #else #error Missing mutex type #endif }; LIBCTHREADS_EXTERN \ int libcthreads_mutex_initialize( libcthreads_mutex_t **mutex, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_mutex_free( libcthreads_mutex_t **mutex, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_mutex_grab( libcthreads_mutex_t *mutex, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_mutex_try_grab( libcthreads_mutex_t *mutex, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_mutex_release( libcthreads_mutex_t *mutex, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_MUTEX_H ) */ libesedb-20240420/libcthreads/libcthreads_types.h0000644000175000017500000000471614610746233022543 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_TYPES_H ) #define _LIBCTHREADS_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads * The definitions in are copied here * for local use of libcthreads */ #if defined( HAVE_LOCAL_LIBCTHREADS ) && defined( HAVE_MULTI_THREAD_SUPPORT ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcthreads_condition {} libcthreads_condition_t; typedef struct libcthreads_lock {} libcthreads_lock_t; typedef struct libcthreads_mutex {} libcthreads_mutex_t; typedef struct libcthreads_queue {} libcthreads_queue_t; typedef struct libcthreads_read_write_lock {} libcthreads_read_write_lock_t; typedef struct libcthreads_repeating_thread {} libcthreads_repeating_thread_t; typedef struct libcthreads_thread {} libcthreads_thread_t; typedef struct libcthreads_thread_attributes {} libcthreads_thread_attributes_t; typedef struct libcthreads_thread_pool {} libcthreads_thread_pool_t; #else typedef intptr_t libcthreads_condition_t; typedef intptr_t libcthreads_lock_t; typedef intptr_t libcthreads_mutex_t; typedef intptr_t libcthreads_queue_t; typedef intptr_t libcthreads_read_write_lock_t; typedef intptr_t libcthreads_repeating_thread_t; typedef intptr_t libcthreads_thread_t; typedef intptr_t libcthreads_thread_attributes_t; typedef intptr_t libcthreads_thread_pool_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBCTHREADS ) && defined( HAVE_MULTI_THREAD_SUPPORT ) */ #endif /* !defined( _LIBCTHREADS_INTERNAL_TYPES_H ) */ libesedb-20240420/libcthreads/libcthreads_thread_attributes.h0000644000175000017500000000413214610746233025104 0ustar00lordyestalordyesta/* * Thread attributes functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_THREAD_ATTRIBUTES_H ) #define _LIBCTHREADS_THREAD_ATTRIBUTES_H #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_thread_attributes libcthreads_internal_thread_attributes_t; struct libcthreads_internal_thread_attributes { #if defined( WINAPI ) /* The security attributes */ SECURITY_ATTRIBUTES security_attributes; #elif defined( HAVE_PTHREAD_H ) /* The attributes */ pthread_attr_t attributes; #else #error Missing thread attributes type #endif }; LIBCTHREADS_EXTERN \ int libcthreads_thread_attributes_initialize( libcthreads_thread_attributes_t **thread_attributes, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_thread_attributes_free( libcthreads_thread_attributes_t **thread_attributes, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_THREAD_ATTRIBUTES_H ) */ libesedb-20240420/libcthreads/libcthreads_condition.c0000644000175000017500000004355114610746233023360 0ustar00lordyestalordyesta/* * Condition functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_condition.h" #include "libcthreads_libcerror.h" #include "libcthreads_mutex.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates a condition * Make sure the value condition is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_condition_initialize( libcthreads_condition_t **condition, libcerror_error_t **error ) { libcthreads_internal_condition_t *internal_condition = NULL; static char *function = "libcthreads_condition_initialize"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid condition.", function ); return( -1 ); } if( *condition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid condition value already set.", function ); return( -1 ); } internal_condition = memory_allocate_structure( libcthreads_internal_condition_t ); if( internal_condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create condition.", function ); goto on_error; } if( memory_set( internal_condition, 0, sizeof( libcthreads_internal_condition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear condition.", function ); memory_free( internal_condition ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0600 ) InitializeConditionVariable( &( internal_condition->condition_variable ) ); #elif defined( WINAPI ) InitializeCriticalSection( &( internal_condition->wait_critical_section ) ); internal_condition->signal_semaphore_handle = CreateSemaphore ( NULL, 0, INT_MAX, NULL ); if( internal_condition->signal_semaphore_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize signal semaphore handle.", function ); goto on_error; } internal_condition->signal_event_handle = CreateEvent ( NULL, FALSE, FALSE, NULL ); if( internal_condition->signal_event_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize signal event handle.", function ); goto on_error; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_cond_init( &( internal_condition->condition ), NULL ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize condition with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize condition.", function ); goto on_error; } #endif *condition = (libcthreads_condition_t *) internal_condition; return( 1 ); on_error: if( internal_condition != NULL ) { #if defined( WINAPI ) && ( WINVER < 0x0600 ) if( internal_condition->signal_semaphore_handle != NULL ) { CloseHandle( internal_condition->signal_semaphore_handle ); } DeleteCriticalSection( &( internal_condition->wait_critical_section ) ); #endif memory_free( internal_condition ); } return( -1 ); } /* Frees a condition * Returns 1 if successful or -1 on error */ int libcthreads_condition_free( libcthreads_condition_t **condition, libcerror_error_t **error ) { libcthreads_internal_condition_t *internal_condition = NULL; static char *function = "libcthreads_condition_free"; int result = 1; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid condition.", function ); return( -1 ); } if( *condition != NULL ) { internal_condition = (libcthreads_internal_condition_t *) *condition; *condition = NULL; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) #elif defined( WINAPI ) if( CloseHandle( internal_condition->signal_event_handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free signal event handle.", function ); result = -1; } if( CloseHandle( internal_condition->signal_semaphore_handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free signal semaphore handle.", function ); result = -1; } DeleteCriticalSection( &( internal_condition->wait_critical_section ) ); #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_cond_destroy( &( internal_condition->condition ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy condition with error: Insufficient resources.", function ); result = -1; break; case EBUSY: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy condition with error: Resource busy.", function ); result = -1; break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy condition.", function ); result = -1; break; } #endif memory_free( internal_condition ); } return( result ); } /* Broadcasts a condition * The of this function must be locked by the same mutex as used to wait * This is necessary for the WINAPI pre Vista (0x0600) implementation * Returns 1 if successful or -1 on error */ int libcthreads_condition_broadcast( libcthreads_condition_t *condition, libcerror_error_t **error ) { libcthreads_internal_condition_t *internal_condition = NULL; static char *function = "libcthreads_condition_broadcast"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; DWORD wait_status = 0; BOOL result = 1; int number_of_waiting_threads = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid condition.", function ); return( -1 ); } internal_condition = (libcthreads_internal_condition_t *) condition; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) WakeAllConditionVariable( &( internal_condition->condition_variable ) ); #elif defined( WINAPI ) EnterCriticalSection( &( internal_condition->wait_critical_section ) ); number_of_waiting_threads = internal_condition->number_of_waiting_threads; if( number_of_waiting_threads > 0 ) { internal_condition->signal_is_broadcast = 1; result = ReleaseSemaphore( internal_condition->signal_semaphore_handle, number_of_waiting_threads, 0 ); if( result == 0 ) { error_code = GetLastError(); internal_condition->signal_is_broadcast = 0; } } LeaveCriticalSection( &( internal_condition->wait_critical_section ) ); if( result == 0 ) { libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release signal semaphore handle.", function ); return( -1 ); } if( number_of_waiting_threads > 0 ) { wait_status = WaitForSingleObject( internal_condition->signal_event_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); internal_condition->signal_is_broadcast = 0; libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: wait for no read event handle failed.", function ); return( -1 ); } internal_condition->signal_is_broadcast = 0; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_cond_broadcast( &( internal_condition->condition ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast condition.", function ); return( -1 ); } #endif return( 1 ); } /* Signals a condition * The of this function must be locked by the same mutex as used to wait * This is necessary for the WINAPI pre Vista (0x0600) implementation * Returns 1 if successful or -1 on error */ int libcthreads_condition_signal( libcthreads_condition_t *condition, libcerror_error_t **error ) { libcthreads_internal_condition_t *internal_condition = NULL; static char *function = "libcthreads_condition_signal"; #if defined( WINAPI ) && ( WINVER < 0x0600 ) DWORD error_code = 0; BOOL result = 1; int number_of_waiting_threads = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid condition.", function ); return( -1 ); } internal_condition = (libcthreads_internal_condition_t *) condition; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) WakeConditionVariable( &( internal_condition->condition_variable ) ); #elif defined( WINAPI ) EnterCriticalSection( &( internal_condition->wait_critical_section ) ); number_of_waiting_threads = internal_condition->number_of_waiting_threads; LeaveCriticalSection( &( internal_condition->wait_critical_section ) ); if( number_of_waiting_threads > 0 ) { result = ReleaseSemaphore( internal_condition->signal_semaphore_handle, 1, 0 ); if( result == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release signal semaphore handle.", function ); return( -1 ); } } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_cond_signal( &( internal_condition->condition ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal condition.", function ); return( -1 ); } #endif return( 1 ); } /* Waits for a condition * Returns 1 if successful or -1 on error */ int libcthreads_condition_wait( libcthreads_condition_t *condition, libcthreads_mutex_t *mutex, libcerror_error_t **error ) { libcthreads_internal_condition_t *internal_condition = NULL; libcthreads_internal_mutex_t *internal_mutex = NULL; static char *function = "libcthreads_condition_wait"; #if defined( WINAPI ) DWORD error_code = 0; #if ( WINVER >= 0x0600 ) BOOL result = 0; #elif ( WINVER >= 0x0400 ) DWORD wait_status = 0; int is_last_waiting_thread = 0; #endif #elif defined( HAVE_PTHREAD_H ) int pthread_result = 0; #endif if( condition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid condition.", function ); return( -1 ); } internal_condition = (libcthreads_internal_condition_t *) condition; if( mutex == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid mutex.", function ); return( -1 ); } internal_mutex = (libcthreads_internal_mutex_t *) mutex; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) result = SleepConditionVariableCS( &( internal_condition->condition_variable ), &( internal_mutex->critical_section ), INFINITE ); if( result == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to sleep on condition variable.", function ); return( -1 ); } #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) EnterCriticalSection( &( internal_condition->wait_critical_section ) ); internal_condition->number_of_waiting_threads++; LeaveCriticalSection( &( internal_condition->wait_critical_section ) ); wait_status = SignalObjectAndWait( internal_mutex->mutex_handle, internal_condition->signal_semaphore_handle, INFINITE, FALSE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable signal mutex handle and wait for signal semaphore handle.", function ); return( -1 ); } EnterCriticalSection( &( internal_condition->wait_critical_section ) ); internal_condition->number_of_waiting_threads--; if( ( internal_condition->number_of_waiting_threads == 0 ) && ( internal_condition->signal_is_broadcast != 0 ) ) { is_last_waiting_thread = 1; } LeaveCriticalSection( &( internal_condition->wait_critical_section ) ); if( is_last_waiting_thread != 0 ) { wait_status = SignalObjectAndWait( internal_condition->signal_event_handle, internal_mutex->mutex_handle, INFINITE, FALSE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to signal signal event handle and wait for mutex handle.", function ); return( -1 ); } } else { wait_status = WaitForSingleObject( internal_mutex->mutex_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: wait for mutex handle failed.", function ); return( -1 ); } } #elif defined( WINAPI ) #error libcthreads_condition_wait for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_cond_wait( &( internal_condition->condition ), &( internal_mutex->mutex ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to wait for condition.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_error.c0000644000175000017500000000561014610746233022515 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libcthreads_error.h" #include "libcthreads_libcerror.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) /* Free an error and its elements */ void libcthreads_error_free( libcthreads_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 libcthreads_error_fprint( libcthreads_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libcthreads_error_sprint( libcthreads_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcthreads_error_backtrace_fprint( libcthreads_error_t *error, FILE *stream ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libcthreads_error_backtrace_sprint( libcthreads_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ libesedb-20240420/libcthreads/libcthreads_read_write_lock.c0000644000175000017500000004377214610746233024534 0ustar00lordyestalordyesta/* * Read/Write lock functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_libcerror.h" #include "libcthreads_read_write_lock.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates a read/write lock * Make sure the value read_write_lock is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_initialize( libcthreads_read_write_lock_t **read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_initialize"; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } if( *read_write_lock != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid read/write lock value already set.", function ); return( -1 ); } internal_read_write_lock = memory_allocate_structure( libcthreads_internal_read_write_lock_t ); if( internal_read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create read/write lock.", function ); goto on_error; } if( memory_set( internal_read_write_lock, 0, sizeof( libcthreads_internal_read_write_lock_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear read/write lock.", function ); memory_free( internal_read_write_lock ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0600 ) InitializeSRWLock( &( internal_read_write_lock->slim_read_write_lock ) ); #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) InitializeCriticalSection( &( internal_read_write_lock->write_critical_section ) ); InitializeCriticalSection( &( internal_read_write_lock->read_critical_section ) ); internal_read_write_lock->no_read_event_handle = CreateEvent( NULL, TRUE, TRUE, NULL ); if( internal_read_write_lock->no_read_event_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize no read event handle.", function ); goto on_error; } #elif defined( WINAPI ) #error libcthreads_read_write_lock_initialize for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_init( &( internal_read_write_lock->read_write_lock ), NULL ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize read/write lock with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to initialize read/write lock.", function ); goto on_error; } #endif *read_write_lock = (libcthreads_read_write_lock_t *) internal_read_write_lock; return( 1 ); on_error: if( internal_read_write_lock != NULL ) { #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DeleteCriticalSection( &( internal_read_write_lock->read_critical_section ) ); DeleteCriticalSection( &( internal_read_write_lock->write_critical_section ) ); #endif memory_free( internal_read_write_lock ); } return( -1 ); } /* Frees a read/write lock * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_free( libcthreads_read_write_lock_t **read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_free"; int result = 1; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } if( *read_write_lock != NULL ) { internal_read_write_lock = (libcthreads_internal_read_write_lock_t *) *read_write_lock; *read_write_lock = NULL; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) if( CloseHandle( internal_read_write_lock->no_read_event_handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free no read event handle.", function ); result = -1; } DeleteCriticalSection( &( internal_read_write_lock->read_critical_section ) ); DeleteCriticalSection( &( internal_read_write_lock->write_critical_section ) ); #elif defined( WINAPI ) && ( WINVER < 0x0400 ) #error libcthreads_read_write_lock_free for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_destroy( &( internal_read_write_lock->read_write_lock ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy read/write lock with error: Insufficient resources.", function ); result = -1; break; case EBUSY: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy read/write lock with error: Resource busy.", function ); result = -1; break; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to destroy read/write lock.", function ); result = -1; break; } #endif memory_free( internal_read_write_lock ); } return( result ); } /* Grabs a read/write lock for reading * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_grab_for_read( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_grab_for_read"; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DWORD error_code = 0; BOOL result = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } internal_read_write_lock = (libcthreads_internal_read_write_lock_t *) read_write_lock; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) AcquireSRWLockShared( &( internal_read_write_lock->slim_read_write_lock ) ); #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) EnterCriticalSection( &( internal_read_write_lock->write_critical_section ) ); EnterCriticalSection( &( internal_read_write_lock->read_critical_section ) ); internal_read_write_lock->number_of_readers++; if( internal_read_write_lock->number_of_readers == 1 ) { result = ResetEvent( internal_read_write_lock->no_read_event_handle ); if( result == 0 ) { error_code = GetLastError(); internal_read_write_lock->number_of_readers--; } } else { result = 1; } LeaveCriticalSection( &( internal_read_write_lock->read_critical_section ) ); LeaveCriticalSection( &( internal_read_write_lock->write_critical_section ) ); if( result == 0 ) { libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: reset of no read event failed.", function ); return( -1 ); } #elif defined( WINAPI ) #error libcthreads_read_write_lock_grab_for_read for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_rdlock( &( internal_read_write_lock->read_write_lock ) ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock read/write lock for read with error: Maximum number of locks exceeded.", function ); return( -1 ); case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock read/write lock for read with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock read/write lock for read.", function ); return( -1 ); } #endif return( 1 ); } /* Grabs a read/write lock for writing * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_grab_for_write( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_grab_for_write"; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } internal_read_write_lock = (libcthreads_internal_read_write_lock_t *) read_write_lock; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) AcquireSRWLockExclusive( &( internal_read_write_lock->slim_read_write_lock ) ); #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) EnterCriticalSection( &( internal_read_write_lock->write_critical_section ) ); wait_status = WaitForSingleObject( internal_read_write_lock->no_read_event_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); LeaveCriticalSection( &( internal_read_write_lock->write_critical_section ) ); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: wait for no read event handle failed.", function ); return( -1 ); } #elif defined( WINAPI ) #error libcthreads_read_write_lock_grab_for_write for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_wrlock( &( internal_read_write_lock->read_write_lock ) ); switch( pthread_result ) { case 0: break; case EDEADLK: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock read/write lock for write with error: Deadlock condition detected.", function ); return( -1 ); default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to lock read/write lock for write.", function ); return( -1 ); } #endif return( 1 ); } /* Releases a read/write lock for reading * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_release_for_read( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_release_for_read"; #if defined( WINAPI ) && ( WINVER >= 0x0400 ) && ( WINVER < 0x0600 ) DWORD error_code = 0; BOOL result = 0; #elif defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } internal_read_write_lock = (libcthreads_internal_read_write_lock_t *) read_write_lock; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) ReleaseSRWLockShared( &( internal_read_write_lock->slim_read_write_lock ) ); #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) EnterCriticalSection( &( internal_read_write_lock->read_critical_section ) ); internal_read_write_lock->number_of_readers--; if( internal_read_write_lock->number_of_readers == 0 ) { result = SetEvent( internal_read_write_lock->no_read_event_handle ); if( result == 0 ) { error_code = GetLastError(); internal_read_write_lock->number_of_readers++; } } else { result = 1; } LeaveCriticalSection( &( internal_read_write_lock->read_critical_section ) ); if( result == 0 ) { libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: set of no read event failed.", function ); return( -1 ); } #elif defined( WINAPI ) #error libcthreads_read_write_lock_release_for_read for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_unlock( &( internal_read_write_lock->read_write_lock ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to unlock read/write lock.", function ); return( -1 ); } #endif return( 1 ); } /* Releases a read/write lock for writing * Returns 1 if successful or -1 on error */ int libcthreads_read_write_lock_release_for_write( libcthreads_read_write_lock_t *read_write_lock, libcerror_error_t **error ) { libcthreads_internal_read_write_lock_t *internal_read_write_lock = NULL; static char *function = "libcthreads_read_write_lock_release_for_write"; #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) int pthread_result = 0; #endif if( read_write_lock == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read/write lock.", function ); return( -1 ); } internal_read_write_lock = (libcthreads_internal_read_write_lock_t *) read_write_lock; #if defined( WINAPI ) && ( WINVER >= 0x0600 ) ReleaseSRWLockExclusive( &( internal_read_write_lock->slim_read_write_lock ) ); #elif defined( WINAPI ) && ( WINVER >= 0x0400 ) LeaveCriticalSection( &( internal_read_write_lock->write_critical_section ) ); #elif defined( WINAPI ) #error libcthreads_read_write_lock_release_for_write for Windows earlier than NT4 not implemented #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_rwlock_unlock( &( internal_read_write_lock->read_write_lock ) ); if( pthread_result != 0 ) { libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to unlock read/write lock.", function ); return( -1 ); } #endif return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_libcerror.h0000644000175000017500000000264714610746233023363 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_LIBCERROR_H ) #define _LIBCTHREADS_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCTHREADS_LIBCERROR_H ) */ libesedb-20240420/libcthreads/libcthreads_definitions.h0000644000175000017500000000412014610746233023677 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( LIBCTHREADS_INTERNAL_DEFINITIONS_H ) #define LIBCTHREADS_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads */ #if !defined( HAVE_LOCAL_LIBCTHREADS ) #include /* The definitions in are copied here * for local use of libcthreads */ #else #define LIBCTHREADS_VERSION 20240413 /* The libcthreads version string */ #define LIBCTHREADS_VERSION_STRING "20240413" /* The comparison function definitions */ enum LIBCTHREADS_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBCTHREADS_COMPARE_LESS, /* The first and second values are equal */ LIBCTHREADS_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBCTHREADS_COMPARE_GREATER }; /* The sort flag definitions */ enum LIBCTHREADS_SORT_FLAGS { /* Allow duplicate values */ LIBCTHREADS_SORT_FLAG_NON_UNIQUE_VALUES = 0x00, /* Only allow unique values, no duplicates */ LIBCTHREADS_SORT_FLAG_UNIQUE_VALUES = 0x01 }; #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ /* The status definitions */ enum LIBCTHREADS_STATUS { LIBCTHREADS_STATUS_EXIT = 1 }; #endif /* !defined( LIBCTHREADS_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libcthreads/libcthreads_thread_pool.c0000644000175000017500000012447114610746233023673 0ustar00lordyestalordyesta/* * Thread pool functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #endif #include "libcthreads_condition.h" #include "libcthreads_definitions.h" #include "libcthreads_libcerror.h" #include "libcthreads_mutex.h" #include "libcthreads_queue.h" #include "libcthreads_thread.h" #include "libcthreads_thread_attributes.h" #include "libcthreads_thread_pool.h" #include "libcthreads_types.h" #include "libcthreads_unused.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) #if defined( WINAPI ) && ( WINVER >= 0x0602 ) void CALLBACK libcthreads_thread_pool_callback_function_helper( TP_CALLBACK_INSTANCE *callback_instance, void *arguments, TP_WORK *thread_pool_work ) { libcerror_error_t *error = NULL; libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; intptr_t *value = NULL; int callback_function_result = 0; int pop_result = 0; LIBCTHREADS_UNREFERENCED_PARAMETER( callback_instance ) LIBCTHREADS_UNREFERENCED_PARAMETER( thread_pool_work ) if( arguments == NULL ) { return; } internal_thread_pool = (libcthreads_internal_thread_pool_t *) arguments; if( ( internal_thread_pool == NULL ) || ( internal_thread_pool->callback_function == NULL ) ) { return; } pop_result = libcthreads_internal_thread_pool_pop( internal_thread_pool, &value, &error ); if( pop_result == -1 ) { #if defined( HAVE_VERBOSE_OUTPUT ) libcerror_error_backtrace_fprint( error, stdout ); #endif libcerror_error_free( &error ); return; } if( pop_result == 0 ) { return; } callback_function_result = internal_thread_pool->callback_function( value, internal_thread_pool->callback_function_arguments ); if( callback_function_result != 1 ) { #if defined( HAVE_VERBOSE_OUTPUT ) libcerror_error_backtrace_fprint( error, stdout ); #endif libcerror_error_free( &error ); } } #elif defined( WINAPI ) /* Start function helper function for WINAPI * Returns 0 if successful or 1 on error */ DWORD WINAPI libcthreads_thread_pool_callback_function_helper( void *arguments ) { libcerror_error_t *error = NULL; libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; intptr_t *value = NULL; DWORD result = 1; int callback_function_result = 0; int pop_result = 0; if( arguments != NULL ) { internal_thread_pool = (libcthreads_internal_thread_pool_t *) arguments; if( ( internal_thread_pool != NULL ) && ( internal_thread_pool->callback_function != NULL ) ) { result = 0; do { pop_result = libcthreads_internal_thread_pool_pop( internal_thread_pool, &value, &error ); if( pop_result == -1 ) { break; } else if( pop_result != 0 ) { callback_function_result = internal_thread_pool->callback_function( value, internal_thread_pool->callback_function_arguments ); if( ( callback_function_result != 1 ) && ( result == 1 ) ) { result = callback_function_result; } } else if( internal_thread_pool->status == LIBCTHREADS_STATUS_EXIT ) { break; } } while( pop_result != -1 ); if( pop_result == -1 ) { result = 1; } if( error != NULL ) { #if defined( HAVE_VERBOSE_OUTPUT ) libcerror_error_backtrace_fprint( error, stdout ); #endif libcerror_error_free( &error ); } } } ExitThread( result ); } #elif defined( HAVE_PTHREAD_H ) /* Start function helper function for pthread * Returns a pointer to a newly allocated int containing 1 if successful or -1 on error * NULL is return if the helper function was unable to run the callback */ void *libcthreads_thread_pool_callback_function_helper( void *arguments ) { libcerror_error_t *error = NULL; libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; intptr_t *value = NULL; int *result = NULL; int callback_function_result = 0; int pop_result = 0; if( arguments != NULL ) { internal_thread_pool = (libcthreads_internal_thread_pool_t *) arguments; if( ( internal_thread_pool != NULL ) && ( internal_thread_pool->callback_function != NULL ) ) { result = (int *) memory_allocate( sizeof( int ) ); if( result != NULL ) { *result = 1; do { pop_result = libcthreads_internal_thread_pool_pop( internal_thread_pool, &value, &error ); if( pop_result == -1 ) { break; } else if( pop_result != 0 ) { callback_function_result = internal_thread_pool->callback_function( value, internal_thread_pool->callback_function_arguments ); if( ( callback_function_result != 1 ) && ( *result == 1 ) ) { *result = callback_function_result; } } else if( internal_thread_pool->status == LIBCTHREADS_STATUS_EXIT ) { break; } } while( pop_result != -1 ); if( pop_result == -1 ) { *result = -1; } if( error != NULL ) { #if defined( HAVE_VERBOSE_OUTPUT ) libcerror_error_backtrace_fprint( error, stdout ); #endif libcerror_error_free( &error ); } } } } pthread_exit( (void *) result ); } #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ /* Creates a thread pool * Make sure the value thread_pool is referencing, is set to NULL * * The callback_function should return 1 if successful and -1 on error * Returns 1 if successful or -1 on error */ int libcthreads_thread_pool_create( libcthreads_thread_pool_t **thread_pool, const libcthreads_thread_attributes_t *thread_attributes, int number_of_threads, int maximum_number_of_values, int (*callback_function)( intptr_t *value, void *arguments ), void *callback_function_arguments, libcerror_error_t **error ) { libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; static char *function = "libcthreads_thread_pool_create"; size_t array_size = 0; #if !defined( WINAPI ) || ( WINVER < 0x0602 ) int thread_index = 0; #endif #if defined( WINAPI ) DWORD error_code = 0; #endif #if defined( WINAPI ) && ( WINVER >= 0x0602 ) BOOL result = FALSE; #elif defined( WINAPI ) SECURITY_ATTRIBUTES *security_attributes = NULL; HANDLE thread_handle = NULL; #elif defined( HAVE_PTHREAD_H ) pthread_attr_t *attributes = NULL; int *thread_return_value = NULL; int pthread_result = 0; #endif #if defined( WINAPI ) && ( WINVER >= 0x0602 ) LIBCTHREADS_UNREFERENCED_PARAMETER( thread_attributes ) #endif if( thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread pool.", function ); return( -1 ); } if( *thread_pool != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid thread pool value already set.", function ); return( -1 ); } if( number_of_threads <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of threads value zero or less.", function ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0602 ) #if SIZEOF_INT > 4 if( number_of_threads > (int) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of threads value exceeds maximum.", function ); return( -1 ); } #endif /* SIZEOF_INT > 4 */ #else #if SIZEOF_INT <= SIZEOF_SIZE_T if( (size_t) number_of_threads > (size_t) ( SSIZE_MAX / sizeof( libcthreads_thread_t * ) ) ) #else if( number_of_threads > (int) ( SSIZE_MAX / sizeof( libcthreads_thread_t * ) ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of threads value exceeds maximum.", function ); return( -1 ); } #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ if( maximum_number_of_values <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid maximum number of values value zero or less.", function ); return( -1 ); } #if SIZEOF_INT <= SIZEOF_SIZE_T if( (size_t) maximum_number_of_values > (size_t) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #else if( maximum_number_of_values > (int) ( SSIZE_MAX / sizeof( intptr_t * ) ) ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum number of values value exceeds maximum.", function ); return( -1 ); } if( callback_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid callback function.", function ); return( -1 ); } internal_thread_pool = memory_allocate_structure( libcthreads_internal_thread_pool_t ); if( internal_thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create thread pool.", function ); goto on_error; } if( memory_set( internal_thread_pool, 0, sizeof( libcthreads_internal_thread_pool_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear thread pool.", function ); memory_free( internal_thread_pool ); return( -1 ); } array_size = sizeof( intptr_t * ) * maximum_number_of_values; if( array_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid values array size value exceeds maximum.", function ); goto on_error; } internal_thread_pool->values_array = (intptr_t **) memory_allocate( array_size ); if( internal_thread_pool->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create values array.", function ); goto on_error; } if( memory_set( internal_thread_pool->values_array, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear values array.", function ); goto on_error; } internal_thread_pool->allocated_number_of_values = maximum_number_of_values; /* The callback must be set before the callback function helper threads are created */ internal_thread_pool->callback_function = callback_function; internal_thread_pool->callback_function_arguments = callback_function_arguments; if( libcthreads_mutex_initialize( &( internal_thread_pool->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create condition mutex.", function ); goto on_error; } if( libcthreads_condition_initialize( &( internal_thread_pool->empty_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create empty condition.", function ); goto on_error; } if( libcthreads_condition_initialize( &( internal_thread_pool->full_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create full condition.", function ); goto on_error; } #if defined( WINAPI ) && ( WINVER >= 0x0602 ) InitializeThreadpoolEnvironment( &( internal_thread_pool->callback_environment ) ); internal_thread_pool->thread_pool = CreateThreadpool( NULL ); if( internal_thread_pool->thread_pool == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread pool.", function ); goto on_error; } internal_thread_pool->cleanup_group = CreateThreadpoolCleanupGroup(); result = SetThreadpoolThreadMinimum( internal_thread_pool->thread_pool, (DWORD) number_of_threads ); if( result != TRUE ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set minimum number of threads.", function ); goto on_error; } SetThreadpoolThreadMaximum( internal_thread_pool->thread_pool, (DWORD) number_of_threads ); if( internal_thread_pool->cleanup_group == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread pool cleanup group.", function ); goto on_error; } SetThreadpoolCallbackPool( &( internal_thread_pool->callback_environment ), internal_thread_pool->thread_pool ); SetThreadpoolCallbackCleanupGroup( &( internal_thread_pool->callback_environment ), internal_thread_pool->cleanup_group, NULL ); #elif defined( WINAPI ) array_size = sizeof( HANDLE ) * number_of_threads; if( array_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid thread handles array size value out of bounds.", function ); goto on_error; } internal_thread_pool->thread_handles_array = (HANDLE *) memory_allocate( array_size ); if( internal_thread_pool->thread_handles_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create thread handles array.", function ); goto on_error; } if( memory_set( internal_thread_pool->thread_handles_array, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear thread handles array.", function ); goto on_error; } internal_thread_pool->number_of_threads = number_of_threads; array_size = sizeof( DWORD ) * number_of_threads; if( array_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid thread identifiers array size value out of bounds.", function ); goto on_error; } internal_thread_pool->thread_identifiers_array = (DWORD *) memory_allocate( array_size ); if( internal_thread_pool->thread_identifiers_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create thread identifiers array.", function ); goto on_error; } if( memory_set( internal_thread_pool->thread_identifiers_array, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear thread identifiers array.", function ); goto on_error; } if( thread_attributes != NULL ) { security_attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->security_attributes ); } for( thread_index = 0; thread_index < number_of_threads; thread_index++ ) { thread_handle = CreateThread( security_attributes, 0, /* stack size */ &libcthreads_thread_pool_callback_function_helper, (void *) internal_thread_pool, 0, /* creation flags */ &( internal_thread_pool->thread_identifiers_array[ thread_index ] ) ); if( thread_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread handle: %d.", function, thread_index ); goto on_error; } internal_thread_pool->thread_handles_array[ thread_index ] = thread_handle; } #elif defined( HAVE_PTHREAD_H ) array_size = sizeof( pthread_t ) * number_of_threads; if( array_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid threads array size value out of bounds.", function ); goto on_error; } internal_thread_pool->threads_array = (pthread_t *) memory_allocate( array_size ); if( internal_thread_pool->threads_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create threads array.", function ); goto on_error; } if( memory_set( internal_thread_pool->threads_array, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear threads array.", function ); goto on_error; } internal_thread_pool->number_of_threads = number_of_threads; if( thread_attributes != NULL ) { attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->attributes ); } for( thread_index = 0; thread_index < number_of_threads; thread_index++ ) { pthread_result = pthread_create( &( internal_thread_pool->threads_array[ thread_index ] ), attributes, &libcthreads_thread_pool_callback_function_helper, (void *) internal_thread_pool ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread: %d with error: Insufficient resources.", function, thread_index ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread: %d.", function, thread_index ); goto on_error; } } #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ *thread_pool = (libcthreads_thread_pool_t *) internal_thread_pool; return( 1 ); on_error: if( internal_thread_pool != NULL ) { #if defined( WINAPI ) && ( WINVER >= 0x0602 ) if( internal_thread_pool->cleanup_group != NULL ) { CloseThreadpoolCleanupGroup( internal_thread_pool->cleanup_group ); internal_thread_pool->cleanup_group = NULL; } if( internal_thread_pool->thread_pool != NULL ) { CloseThreadpool( internal_thread_pool->thread_pool ); internal_thread_pool->thread_pool = NULL; } #elif defined( WINAPI ) if( internal_thread_pool->thread_identifiers_array != NULL ) { memory_free( internal_thread_pool->thread_identifiers_array ); } if( internal_thread_pool->thread_handles_array != NULL ) { while( thread_index >= 0 ) { WaitForSingleObject( internal_thread_pool->thread_handles_array[ thread_index ], INFINITE ); thread_index--; } memory_free( internal_thread_pool->thread_handles_array ); } #elif defined( HAVE_PTHREAD_H ) if( internal_thread_pool->threads_array != NULL ) { while( thread_index >= 0 ) { pthread_join( internal_thread_pool->threads_array[ thread_index ], (void **) &thread_return_value ); if( thread_return_value != NULL ) { memory_free( thread_return_value ); thread_return_value = NULL; } thread_index--; } memory_free( internal_thread_pool->threads_array ); } #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ if( internal_thread_pool->full_condition != NULL ) { libcthreads_condition_free( &( internal_thread_pool->full_condition ), NULL ); } if( internal_thread_pool->empty_condition != NULL ) { libcthreads_condition_free( &( internal_thread_pool->empty_condition ), NULL ); } if( internal_thread_pool->condition_mutex != NULL ) { libcthreads_mutex_free( &( internal_thread_pool->condition_mutex ), NULL ); } if( internal_thread_pool->values_array != NULL ) { memory_free( internal_thread_pool->values_array ); } memory_free( internal_thread_pool ); } return( -1 ); } /* Pops a value off the queue of the thread pool * Returns 1 if successful, 0 if no value available or -1 on error */ int libcthreads_internal_thread_pool_pop( libcthreads_internal_thread_pool_t *internal_thread_pool, intptr_t **value, libcerror_error_t **error ) { static char *function = "libcthreads_internal_thread_pool_pop"; int result = 0; if( internal_thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread pool.", function ); return( -1 ); } if( internal_thread_pool->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid thread pool - missing values array.", function ); return( -1 ); } if( libcthreads_mutex_grab( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_thread_pool->number_of_values == 0 ) { if( internal_thread_pool->status == LIBCTHREADS_STATUS_EXIT ) { break; } if( libcthreads_condition_wait( internal_thread_pool->empty_condition, internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for empty condition.", function ); goto on_error; } } if( internal_thread_pool->number_of_values > 0 ) { *value = internal_thread_pool->values_array[ internal_thread_pool->pop_index ]; internal_thread_pool->pop_index++; if( internal_thread_pool->pop_index >= internal_thread_pool->allocated_number_of_values ) { internal_thread_pool->pop_index = 0; } internal_thread_pool->number_of_values--; result = 1; if( libcthreads_condition_broadcast( internal_thread_pool->full_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast full condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); on_error: libcthreads_mutex_release( internal_thread_pool->condition_mutex, NULL ); return( -1 ); } /* Pushes a value onto the queue of the thread pool * Returns 1 if successful or -1 on error */ int libcthreads_thread_pool_push( libcthreads_thread_pool_t *thread_pool, intptr_t *value, libcerror_error_t **error ) { libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; static char *function = "libcthreads_thread_pool_push"; #if defined( WINAPI ) && ( WINVER >= 0x0602 ) TP_WORK *thread_pool_work = NULL; DWORD error_code = 0; #endif if( thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread pool.", function ); return( -1 ); } internal_thread_pool = (libcthreads_internal_thread_pool_t *) thread_pool; if( internal_thread_pool->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid thread pool - missing values array.", 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 ); } if( libcthreads_mutex_grab( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_thread_pool->number_of_values == internal_thread_pool->allocated_number_of_values ) { if( libcthreads_condition_wait( internal_thread_pool->full_condition, internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); goto on_error; } } internal_thread_pool->values_array[ internal_thread_pool->push_index ] = value; internal_thread_pool->push_index++; if( internal_thread_pool->push_index >= internal_thread_pool->allocated_number_of_values ) { internal_thread_pool->push_index = 0; } internal_thread_pool->number_of_values++; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_thread_pool->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); goto on_error; } if( libcthreads_mutex_release( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0602 ) thread_pool_work = CreateThreadpoolWork( &libcthreads_thread_pool_callback_function_helper, (void *) internal_thread_pool, &( internal_thread_pool->callback_environment ) ); if( thread_pool_work == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread pool work.", function ); return( -1 ); } SubmitThreadpoolWork( thread_pool_work ); #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ return( 1 ); on_error: libcthreads_mutex_release( internal_thread_pool->condition_mutex, NULL ); return( -1 ); } /* Pushes a value onto the thread pool in sorted order * * Uses the value_compare_function to determine the similarity of the values * The value_compare_function should return LIBCTHREADS_COMPARE_LESS, * LIBCTHREADS_COMPARE_EQUAL, LIBCTHREADS_COMPARE_GREATER if successful or -1 on error * * Returns 1 if successful, 0 if the value already exists or -1 on error */ int libcthreads_thread_pool_push_sorted( libcthreads_thread_pool_t *thread_pool, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t sort_flags, libcerror_error_t **error ) { libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; static char *function = "libcthreads_thread_pool_push_sorted"; int compare_result = 0; int pop_index = 0; int previous_push_index = 0; int push_index = 0; int result = 1; int value_index = 0; #if defined( WINAPI ) && ( WINVER >= 0x0602 ) TP_WORK *thread_pool_work = NULL; DWORD error_code = 0; #endif if( thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread pool.", function ); return( -1 ); } internal_thread_pool = (libcthreads_internal_thread_pool_t *) thread_pool; if( internal_thread_pool->values_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid queue - missing values array.", 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 ); } 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( ( sort_flags & ~( LIBCTHREADS_SORT_FLAG_UNIQUE_VALUES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported sort flags: 0x%02" PRIx8 ".", function, sort_flags ); return( -1 ); } if( libcthreads_mutex_grab( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } while( internal_thread_pool->number_of_values == internal_thread_pool->allocated_number_of_values ) { if( libcthreads_condition_wait( internal_thread_pool->full_condition, internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); goto on_error; } } pop_index = internal_thread_pool->pop_index; for( value_index = 0; value_index < internal_thread_pool->number_of_values; value_index++ ) { compare_result = value_compare_function( value, internal_thread_pool->values_array[ pop_index ], error ); if( compare_result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare value: %d.", function, value_index ); goto on_error; } else if( compare_result == LIBCTHREADS_COMPARE_EQUAL ) { if( ( sort_flags & LIBCTHREADS_SORT_FLAG_UNIQUE_VALUES ) != 0 ) { result = 0; break; } } else if( compare_result == LIBCTHREADS_COMPARE_LESS ) { result = 1; break; } else if( compare_result != LIBCTHREADS_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, compare_result ); goto on_error; } pop_index++; if( pop_index >= internal_thread_pool->allocated_number_of_values ) { pop_index = 0; } } if( result != 0 ) { push_index = internal_thread_pool->push_index; if( compare_result == LIBCTHREADS_COMPARE_LESS ) { previous_push_index = push_index - 1; while( push_index != pop_index ) { if( previous_push_index < 0 ) { previous_push_index = internal_thread_pool->allocated_number_of_values - 1; } internal_thread_pool->values_array[ push_index ] = internal_thread_pool->values_array[ previous_push_index ]; push_index = previous_push_index; previous_push_index--; } } internal_thread_pool->values_array[ push_index ] = value; internal_thread_pool->push_index++; if( internal_thread_pool->push_index >= internal_thread_pool->allocated_number_of_values ) { internal_thread_pool->push_index = 0; } internal_thread_pool->number_of_values++; /* The condition broadcast must be protected by the mutex for the WINAPI version */ if( libcthreads_condition_broadcast( internal_thread_pool->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); goto on_error; } } if( libcthreads_mutex_release( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0602 ) thread_pool_work = CreateThreadpoolWork( &libcthreads_thread_pool_callback_function_helper, (void *) internal_thread_pool, &( internal_thread_pool->callback_environment ) ); if( thread_pool_work == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread pool work.", function ); return( -1 ); } SubmitThreadpoolWork( thread_pool_work ); #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ return( result ); on_error: libcthreads_mutex_release( internal_thread_pool->condition_mutex, NULL ); return( -1 ); } /* Joins the current with a specified thread pool * The the thread is freed after join * Returns 1 if successful or -1 on error */ int libcthreads_thread_pool_join( libcthreads_thread_pool_t **thread_pool, libcerror_error_t **error ) { libcthreads_internal_thread_pool_t *internal_thread_pool = NULL; static char *function = "libcthreads_thread_pool_join"; int result = 1; #if !defined( WINAPI ) || ( WINVER < 0x0602 ) int thread_index = 0; #if defined( WINAPI ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) int *thread_return_value = NULL; int pthread_result = 0; #endif #endif /* !defined( WINAPI ) || ( WINVER < 0x0602 ) */ if( thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread pool.", function ); return( -1 ); } if( *thread_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing thread pool value.", function ); return( -1 ); } internal_thread_pool = (libcthreads_internal_thread_pool_t *) *thread_pool; *thread_pool = NULL; if( libcthreads_mutex_grab( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } internal_thread_pool->status = LIBCTHREADS_STATUS_EXIT; /* Wake up the worker threads */ if( libcthreads_condition_broadcast( internal_thread_pool->empty_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to broadcast empty condition.", function ); result = -1; } while( internal_thread_pool->number_of_values != 0 ) { /* Wait here to all the values in the queue have been processed */ if( libcthreads_condition_wait( internal_thread_pool->full_condition, internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to wait for full condition.", function ); result = -1; break; } } if( libcthreads_mutex_release( internal_thread_pool->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0602 ) CloseThreadpoolCleanupGroupMembers( internal_thread_pool->cleanup_group, FALSE, NULL ); CloseThreadpoolCleanupGroup( internal_thread_pool->cleanup_group ); internal_thread_pool->cleanup_group = NULL; CloseThreadpool( internal_thread_pool->thread_pool ); internal_thread_pool->thread_pool = NULL; #elif defined( WINAPI ) for( thread_index = 0; thread_index < internal_thread_pool->number_of_threads; thread_index++ ) { wait_status = WaitForSingleObject( internal_thread_pool->thread_handles_array[ thread_index ], INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: wait for thread: %d failed.", function, thread_index ); result = -1; } } #elif defined( HAVE_PTHREAD_H ) for( thread_index = 0; thread_index < internal_thread_pool->number_of_threads; thread_index++ ) { pthread_result = pthread_join( internal_thread_pool->threads_array[ thread_index ], (void **) &thread_return_value ); if( pthread_result == EDEADLK ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread: %d with error: Deadlock condition detected.", function, thread_index ); result = -1; } else if( pthread_result != 0 ) { libcerror_system_set_error( error, result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread: %d.", function, thread_index ); result = -1; } /* If the thread returns NULL it never got around to launching the callback function */ else if( ( thread_return_value != NULL ) && ( *thread_return_value != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: thread: %d returned an error status of: %d.", function, thread_index, *thread_return_value ); result = -1; } if( thread_return_value != NULL ) { memory_free( thread_return_value ); thread_return_value = NULL; } } #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */ if( libcthreads_condition_free( &( internal_thread_pool->full_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free full condition.", function ); result = -1; } if( libcthreads_condition_free( &( internal_thread_pool->empty_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free empty condition.", function ); result = -1; } if( libcthreads_mutex_free( &( internal_thread_pool->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free condition mutex.", function ); result = -1; } #if defined( WINAPI ) && ( WINVER < 0x0602 ) memory_free( internal_thread_pool->thread_identifiers_array ); memory_free( internal_thread_pool->thread_handles_array ); #elif defined( HAVE_PTHREAD_H ) memory_free( internal_thread_pool->threads_array ); #endif memory_free( internal_thread_pool->values_array ); memory_free( internal_thread_pool ); return( result ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_error.h0000644000175000017500000000351014610746233022517 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_ERROR_H ) #define _LIBCTHREADS_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCTHREADS ) #include #endif #include "libcthreads_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) LIBCTHREADS_EXTERN \ void libcthreads_error_free( libcthreads_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_error_fprint( libcthreads_error_t *error, FILE *stream ); LIBCTHREADS_EXTERN \ int libcthreads_error_sprint( libcthreads_error_t *error, char *string, size_t size ); LIBCTHREADS_EXTERN \ int libcthreads_error_backtrace_fprint( libcthreads_error_t *error, FILE *stream ); LIBCTHREADS_EXTERN \ int libcthreads_error_backtrace_sprint( libcthreads_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_ERROR_H ) */ libesedb-20240420/libcthreads/libcthreads_thread_attributes.c0000644000175000017500000001000014610746233025066 0ustar00lordyestalordyesta/* * Thread attributes functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_libcerror.h" #include "libcthreads_thread_attributes.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) /* Creates thread attributes * Make sure the value thread_attributes is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libcthreads_thread_attributes_initialize( libcthreads_thread_attributes_t **thread_attributes, libcerror_error_t **error ) { libcthreads_internal_thread_attributes_t *internal_thread_attributes = NULL; static char *function = "libcthreads_thread_attributes_initialize"; if( thread_attributes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread attributes.", function ); return( -1 ); } if( *thread_attributes != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid thread attributes value already set.", function ); return( -1 ); } internal_thread_attributes = memory_allocate_structure( libcthreads_internal_thread_attributes_t ); if( internal_thread_attributes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create thread attributes.", function ); goto on_error; } if( memory_set( internal_thread_attributes, 0, sizeof( libcthreads_internal_thread_attributes_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear thread attributes.", function ); memory_free( internal_thread_attributes ); return( -1 ); } /* TODO */ *thread_attributes = (libcthreads_thread_attributes_t *) internal_thread_attributes; return( 1 ); on_error: if( internal_thread_attributes != NULL ) { memory_free( internal_thread_attributes ); } return( -1 ); } /* Frees thread attributes * Returns 1 if successful or -1 on error */ int libcthreads_thread_attributes_free( libcthreads_thread_attributes_t **thread_attributes, libcerror_error_t **error ) { libcthreads_internal_thread_attributes_t *internal_thread_attributes = NULL; static char *function = "libcthreads_thread_attributes_free"; int result = 1; if( thread_attributes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid thread attributes.", function ); return( -1 ); } if( *thread_attributes != NULL ) { internal_thread_attributes = (libcthreads_internal_thread_attributes_t *) *thread_attributes; *thread_attributes = NULL; /* TODO */ memory_free( internal_thread_attributes ); } return( result ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/libcthreads_extern.h0000644000175000017500000000262414610746233022700 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_EXTERN_H ) #define _LIBCTHREADS_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCTHREADS for local use of libcthreads */ #if !defined( HAVE_LOCAL_LIBCTHREADS ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCTHREADS_EXTERN_VARIABLE extern #else #define LIBCTHREADS_EXTERN_VARIABLE LIBCTHREADS_EXTERN #endif #else #define LIBCTHREADS_EXTERN /* extern */ #define LIBCTHREADS_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */ #endif /* !defined( _LIBCTHREADS_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcthreads/libcthreads_repeating_thread.c0000644000175000017500000004211114610746233024666 0ustar00lordyestalordyesta/* * Repeating thread functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( _MSC_VER ) && defined( WINAPI ) && ( WINVER >= 0x0602 ) #include #include #endif #if defined( HAVE_PTHREAD_H ) && !defined( WINAPI ) #include #endif #include "libcthreads_condition.h" #include "libcthreads_definitions.h" #include "libcthreads_libcerror.h" #include "libcthreads_mutex.h" #include "libcthreads_repeating_thread.h" #include "libcthreads_thread_attributes.h" #include "libcthreads_types.h" #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) #if defined( WINAPI ) /* Start function helper function for WINAPI * Returns 0 if successful or 1 on error */ DWORD WINAPI libcthreads_repeating_thread_start_function_helper( void *arguments ) { libcthreads_internal_repeating_thread_t *internal_repeating_thread = NULL; DWORD result = 0; int start_function_result = 0; if( arguments != NULL ) { internal_repeating_thread = (libcthreads_internal_repeating_thread_t *) arguments; if( ( internal_repeating_thread != NULL ) && ( internal_repeating_thread->start_function != NULL ) ) { internal_repeating_thread->start_function_result = 1; do { libcthreads_mutex_grab( internal_repeating_thread->condition_mutex, NULL ); /* Check for exit status in case of the situation where the thread * is created after the join has been called */ while( internal_repeating_thread->status != LIBCTHREADS_STATUS_EXIT ) { libcthreads_condition_wait( internal_repeating_thread->status_condition, internal_repeating_thread->condition_mutex, NULL ); } libcthreads_mutex_release( internal_repeating_thread->condition_mutex, NULL ); start_function_result = internal_repeating_thread->start_function( internal_repeating_thread->start_function_arguments ); if( ( start_function_result != 1 ) && ( internal_repeating_thread->start_function_result == 1 ) ) { internal_repeating_thread->start_function_result = start_function_result; } } while( internal_repeating_thread->status != LIBCTHREADS_STATUS_EXIT ); if( internal_repeating_thread->start_function_result != 1 ) { result = 1; } } } ExitThread( result ); } #elif defined( HAVE_PTHREAD_H ) /* Start function helper function for pthread * Returns a pointer to the start function result if successful or NULL on error */ void *libcthreads_repeating_thread_start_function_helper( void *arguments ) { libcthreads_internal_repeating_thread_t *internal_repeating_thread = NULL; void *result = NULL; int start_function_result = 0; if( arguments != NULL ) { internal_repeating_thread = (libcthreads_internal_repeating_thread_t *) arguments; if( ( internal_repeating_thread != NULL ) && ( internal_repeating_thread->start_function != NULL ) ) { internal_repeating_thread->start_function_result = 1; do { libcthreads_mutex_grab( internal_repeating_thread->condition_mutex, NULL ); /* Check for exit status in case of the situation where the thread * is created after the join has been called */ while( internal_repeating_thread->status != LIBCTHREADS_STATUS_EXIT ) { libcthreads_condition_wait( internal_repeating_thread->status_condition, internal_repeating_thread->condition_mutex, NULL ); } libcthreads_mutex_release( internal_repeating_thread->condition_mutex, NULL ); start_function_result = internal_repeating_thread->start_function( internal_repeating_thread->start_function_arguments ); if( ( start_function_result != 1 ) && ( internal_repeating_thread->start_function_result == 1 ) ) { internal_repeating_thread->start_function_result = start_function_result; } } while( internal_repeating_thread->status != LIBCTHREADS_STATUS_EXIT ); result = (void *) &( internal_repeating_thread->start_function_result ); } } pthread_exit( result ); } #endif /* defined( WINAPI ) else defined( HAVE_PTHREAD_H ) */ /* Creates a repeating thread * Make sure the value repeating_thread is referencing, is set to NULL * * The start_function should return 1 if successful and -1 on error * Returns 1 if successful or -1 on error */ int libcthreads_repeating_thread_create( libcthreads_repeating_thread_t **repeating_thread, const libcthreads_thread_attributes_t *thread_attributes, int (*start_function)( void *arguments ), void *start_function_arguments, libcerror_error_t **error ) { libcthreads_internal_repeating_thread_t *internal_repeating_thread = NULL; static char *function = "libcthreads_repeating_thread_create"; #if defined( WINAPI ) SECURITY_ATTRIBUTES *security_attributes = NULL; DWORD error_code = 0; #elif defined( HAVE_PTHREAD_H ) pthread_attr_t *attributes = NULL; int pthread_result = 0; #endif if( repeating_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid repeating thread.", function ); return( -1 ); } if( *repeating_thread != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid repeating thread value already set.", function ); return( -1 ); } if( start_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid start function.", function ); return( -1 ); } internal_repeating_thread = memory_allocate_structure( libcthreads_internal_repeating_thread_t ); if( internal_repeating_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create repeating thread.", function ); goto on_error; } if( memory_set( internal_repeating_thread, 0, sizeof( libcthreads_internal_repeating_thread_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear repeating thread.", function ); memory_free( internal_repeating_thread ); return( -1 ); } if( libcthreads_mutex_initialize( &( internal_repeating_thread->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create condition mutex.", function ); goto on_error; } if( libcthreads_condition_initialize( &( internal_repeating_thread->status_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create status condition.", function ); goto on_error; } internal_repeating_thread->start_function = start_function; internal_repeating_thread->start_function_arguments = start_function_arguments; #if defined( WINAPI ) if( thread_attributes != NULL ) { security_attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->security_attributes ); } internal_repeating_thread->thread_handle = CreateThread( security_attributes, 0, /* stack size */ &libcthreads_repeating_thread_start_function_helper, (void *) internal_repeating_thread, 0, /* creation flags */ &( internal_repeating_thread->thread_identifier ) ); if( internal_repeating_thread->thread_handle == NULL ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create thread handle.", function ); goto on_error; } #elif defined( HAVE_PTHREAD_H ) if( thread_attributes != NULL ) { attributes = &( ( (libcthreads_internal_thread_attributes_t *) thread_attributes )->attributes ); } pthread_result = pthread_create( &( internal_repeating_thread->thread ), attributes, &libcthreads_repeating_thread_start_function_helper, (void *) internal_repeating_thread ); switch( pthread_result ) { case 0: break; case EAGAIN: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread with error: Insufficient resources.", function ); goto on_error; default: libcerror_system_set_error( error, pthread_result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to create thread.", function ); goto on_error; } #endif *repeating_thread = (libcthreads_repeating_thread_t *) internal_repeating_thread; return( 1 ); on_error: if( internal_repeating_thread != NULL ) { if( internal_repeating_thread->status_condition != NULL ) { libcthreads_condition_free( &( internal_repeating_thread->status_condition ), NULL ); } if( internal_repeating_thread->condition_mutex != NULL ) { libcthreads_mutex_free( &( internal_repeating_thread->condition_mutex ), NULL ); } memory_free( internal_repeating_thread ); } return( -1 ); } /* Gives the thread a push * Returns 1 if successful or -1 on error */ int libcthreads_repeating_thread_push( libcthreads_repeating_thread_t *repeating_thread, libcerror_error_t **error ) { libcthreads_internal_repeating_thread_t *internal_repeating_thread = NULL; static char *function = "libcthreads_repeating_thread_push"; int result = 1; if( repeating_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid repeating thread.", function ); return( -1 ); } internal_repeating_thread = (libcthreads_internal_repeating_thread_t *) repeating_thread; /* TODO some work */ if( libcthreads_mutex_grab( internal_repeating_thread->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } if( libcthreads_condition_signal( internal_repeating_thread->status_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal status condition.", function ); result = -1; } if( libcthreads_mutex_release( internal_repeating_thread->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } return( result ); } /* Joins the current with a specified repeating thread * The the thread is freed after join * Returns 1 if successful or -1 on error */ int libcthreads_repeating_thread_join( libcthreads_repeating_thread_t **repeating_thread, libcerror_error_t **error ) { libcthreads_internal_repeating_thread_t *internal_repeating_thread = NULL; static char *function = "libcthreads_repeating_thread_join"; int result = 1; #if defined( WINAPI ) DWORD error_code = 0; DWORD wait_status = 0; #elif defined( HAVE_PTHREAD_H ) int *thread_return_value = NULL; int pthread_result = 0; #endif if( repeating_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid repeating thread.", function ); return( -1 ); } if( *repeating_thread == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing repeating thread value.", function ); return( -1 ); } internal_repeating_thread = (libcthreads_internal_repeating_thread_t *) *repeating_thread; *repeating_thread = NULL; if( libcthreads_mutex_grab( internal_repeating_thread->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to grab condition mutex.", function ); return( -1 ); } internal_repeating_thread->status = LIBCTHREADS_STATUS_EXIT; if( libcthreads_condition_signal( internal_repeating_thread->status_condition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal status condition.", function ); result = -1; } if( libcthreads_mutex_release( internal_repeating_thread->condition_mutex, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to release condition mutex.", function ); return( -1 ); } if( result != 1 ) { return( -1 ); } #if defined( WINAPI ) wait_status = WaitForSingleObject( internal_repeating_thread->thread_handle, INFINITE ); if( wait_status == WAIT_FAILED ) { error_code = GetLastError(); libcerror_system_set_error( error, error_code, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: wait for thread failed.", function ); result = -1; } #elif defined( HAVE_PTHREAD_H ) pthread_result = pthread_join( internal_repeating_thread->thread, (void **) &thread_return_value ); if( pthread_result == EDEADLK ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread with error: Deadlock condition detected.", function ); result = -1; } else if( pthread_result != 0 ) { libcerror_system_set_error( error, result, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to join thread.", function ); result = -1; } else if( ( thread_return_value == NULL ) || ( thread_return_value != &( internal_repeating_thread->start_function_result ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: invalid thread return value.", function ); result = -1; } else if( *thread_return_value != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: thread returned an error status.", function, *thread_return_value ); result = -1; } #endif if( libcthreads_condition_free( &( internal_repeating_thread->status_condition ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free status condition.", function ); result = -1; } if( libcthreads_mutex_free( &( internal_repeating_thread->condition_mutex ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free condition mutex.", function ); result = -1; } memory_free( internal_repeating_thread ); return( result ); } #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ libesedb-20240420/libcthreads/Makefile.in0000644000175000017500000010302614610746265020726 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = libcthreads ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcthreads_la_LIBADD = am__libcthreads_la_SOURCES_DIST = libcthreads_condition.c \ libcthreads_condition.h libcthreads_definitions.h \ libcthreads_error.c libcthreads_error.h libcthreads_extern.h \ libcthreads_libcerror.h libcthreads_lock.c libcthreads_lock.h \ libcthreads_mutex.c libcthreads_mutex.h libcthreads_queue.c \ libcthreads_queue.h libcthreads_read_write_lock.c \ libcthreads_read_write_lock.h libcthreads_repeating_thread.c \ libcthreads_repeating_thread.h libcthreads_support.c \ libcthreads_support.h libcthreads_thread.c \ libcthreads_thread.h libcthreads_thread_attributes.c \ libcthreads_thread_attributes.h libcthreads_thread_pool.c \ libcthreads_thread_pool.h libcthreads_types.h \ libcthreads_unused.h @HAVE_LOCAL_LIBCTHREADS_TRUE@am_libcthreads_la_OBJECTS = \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_condition.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_error.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_lock.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_mutex.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_queue.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_read_write_lock.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_repeating_thread.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_support.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread_attributes.lo \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread_pool.lo libcthreads_la_OBJECTS = $(am_libcthreads_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCTHREADS_TRUE@am_libcthreads_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcthreads_condition.Plo \ ./$(DEPDIR)/libcthreads_error.Plo \ ./$(DEPDIR)/libcthreads_lock.Plo \ ./$(DEPDIR)/libcthreads_mutex.Plo \ ./$(DEPDIR)/libcthreads_queue.Plo \ ./$(DEPDIR)/libcthreads_read_write_lock.Plo \ ./$(DEPDIR)/libcthreads_repeating_thread.Plo \ ./$(DEPDIR)/libcthreads_support.Plo \ ./$(DEPDIR)/libcthreads_thread.Plo \ ./$(DEPDIR)/libcthreads_thread_attributes.Plo \ ./$(DEPDIR)/libcthreads_thread_pool.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcthreads_la_SOURCES) DIST_SOURCES = $(am__libcthreads_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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_LIBCTHREADS_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ -I../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBCTHREADS_TRUE@noinst_LTLIBRARIES = libcthreads.la @HAVE_LOCAL_LIBCTHREADS_TRUE@libcthreads_la_SOURCES = \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_condition.c libcthreads_condition.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_definitions.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_error.c libcthreads_error.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_extern.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_libcerror.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_lock.c libcthreads_lock.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_mutex.c libcthreads_mutex.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_queue.c libcthreads_queue.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_read_write_lock.c libcthreads_read_write_lock.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_repeating_thread.c libcthreads_repeating_thread.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_support.c libcthreads_support.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread.c libcthreads_thread.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread_attributes.c libcthreads_thread_attributes.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_thread_pool.c libcthreads_thread_pool.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_types.h \ @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_unused.h DISTCLEANFILES = \ Makefile \ 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 libcthreads/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcthreads/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcthreads.la: $(libcthreads_la_OBJECTS) $(libcthreads_la_DEPENDENCIES) $(EXTRA_libcthreads_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libcthreads_la_rpath) $(libcthreads_la_OBJECTS) $(libcthreads_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_condition.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_lock.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_mutex.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_queue.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_read_write_lock.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_repeating_thread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread_attributes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcthreads_thread_pool.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcthreads_condition.Plo -rm -f ./$(DEPDIR)/libcthreads_error.Plo -rm -f ./$(DEPDIR)/libcthreads_lock.Plo -rm -f ./$(DEPDIR)/libcthreads_mutex.Plo -rm -f ./$(DEPDIR)/libcthreads_queue.Plo -rm -f ./$(DEPDIR)/libcthreads_read_write_lock.Plo -rm -f ./$(DEPDIR)/libcthreads_repeating_thread.Plo -rm -f ./$(DEPDIR)/libcthreads_support.Plo -rm -f ./$(DEPDIR)/libcthreads_thread.Plo -rm -f ./$(DEPDIR)/libcthreads_thread_attributes.Plo -rm -f ./$(DEPDIR)/libcthreads_thread_pool.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcthreads_condition.Plo -rm -f ./$(DEPDIR)/libcthreads_error.Plo -rm -f ./$(DEPDIR)/libcthreads_lock.Plo -rm -f ./$(DEPDIR)/libcthreads_mutex.Plo -rm -f ./$(DEPDIR)/libcthreads_queue.Plo -rm -f ./$(DEPDIR)/libcthreads_read_write_lock.Plo -rm -f ./$(DEPDIR)/libcthreads_repeating_thread.Plo -rm -f ./$(DEPDIR)/libcthreads_support.Plo -rm -f ./$(DEPDIR)/libcthreads_thread.Plo -rm -f ./$(DEPDIR)/libcthreads_thread_attributes.Plo -rm -f ./$(DEPDIR)/libcthreads_thread_pool.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcthreads ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcthreads_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: libesedb-20240420/libcthreads/libcthreads_queue.h0000644000175000017500000000641514610746233022521 0ustar00lordyestalordyesta/* * Queue functions * * Copyright (C) 2012-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCTHREADS_INTERNAL_QUEUE_H ) #define _LIBCTHREADS_INTERNAL_QUEUE_H #include #include #include "libcthreads_extern.h" #include "libcthreads_libcerror.h" #include "libcthreads_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) typedef struct libcthreads_internal_queue libcthreads_internal_queue_t; struct libcthreads_internal_queue { /* The (current) pop index */ int pop_index; /* The (current) push index */ int push_index; /* The number of values */ int number_of_values; /* The allocated number of values */ int allocated_number_of_values; /* The values array */ intptr_t **values_array; /* The condition mutex */ libcthreads_mutex_t *condition_mutex; /* The queue empty condition */ libcthreads_condition_t *empty_condition; /* The queue full condition */ libcthreads_condition_t *full_condition; }; LIBCTHREADS_EXTERN \ int libcthreads_queue_initialize( libcthreads_queue_t **queue, int maximum_number_of_values, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_free( libcthreads_queue_t **queue, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_empty( libcthreads_queue_t *queue, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_try_pop( libcthreads_queue_t *queue, intptr_t **value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_pop( libcthreads_queue_t *queue, intptr_t **value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_try_push( libcthreads_queue_t *queue, intptr_t *value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_push( libcthreads_queue_t *queue, intptr_t *value, libcerror_error_t **error ); LIBCTHREADS_EXTERN \ int libcthreads_queue_push_sorted( libcthreads_queue_t *queue, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t sort_flags, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCTHREADS_INTERNAL_QUEUE_H ) */ libesedb-20240420/test-driver0000755000175000017500000001141714610746266016576 0ustar00lordyestalordyesta#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libesedb-20240420/libcpath/0000755000175000017500000000000014610746413016154 5ustar00lordyestalordyestalibesedb-20240420/libcpath/libcpath_support.c0000644000175000017500000000444014610746230021701 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libcpath_definitions.h" #include "libcpath_libcerror.h" #include "libcpath_libclocale.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 ); } /* 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 libcpath_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libcpath_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 libcpath_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libcpath_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_LIBCPATH ) */ libesedb-20240420/libcpath/libcpath_libcerror.h0000644000175000017500000000263614610746230022162 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCPATH_LIBCERROR_H ) */ libesedb-20240420/libcpath/libcpath_definitions.h0000644000175000017500000000370614610746230022511 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libcpath version string */ #define LIBCPATH_VERSION_STRING "20240414" #if defined( WINAPI ) #define LIBCPATH_SEPARATOR '\\' #else #define LIBCPATH_SEPARATOR '/' #endif /* defined( WINAPI ) */ #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #if defined( WINAPI ) #define LIBCPATH_ESCAPE_CHARACTER '^' #else #define LIBCPATH_ESCAPE_CHARACTER '\\' #endif /* defined( WINAPI ) */ #if defined( WINAPI ) enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_DEVICE, LIBCPATH_TYPE_EXTENDED_LENGTH, LIBCPATH_TYPE_EXTENDED_LENGTH_UNC, LIBCPATH_TYPE_RELATIVE, LIBCPATH_TYPE_UNC }; #else enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_RELATIVE }; #endif /* defined( WINAPI ) */ #endif /* !defined( LIBCPATH_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libcpath/Makefile.am0000644000175000017500000000150614610746230020207 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCPATH AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ noinst_LTLIBRARIES = libcpath.la libcpath_la_SOURCES = \ libcpath_definitions.h \ libcpath_error.c libcpath_error.h \ libcpath_extern.h \ libcpath_path.c libcpath_path.h \ libcpath_libcerror.h \ libcpath_libclocale.h \ libcpath_libcsplit.h \ libcpath_libuna.h \ libcpath_support.c libcpath_support.h \ libcpath_system_string.c libcpath_system_string.h \ libcpath_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) libesedb-20240420/libcpath/libcpath_error.c0000644000175000017500000000553614610746230021325 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libcpath_error_sprint( libcpath_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libcpath_error_backtrace_sprint( libcpath_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ libesedb-20240420/libcpath/libcpath_extern.h0000644000175000017500000000255514610746230021504 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCPATH_EXTERN_VARIABLE extern #else #define LIBCPATH_EXTERN_VARIABLE LIBCPATH_EXTERN #endif #else #define LIBCPATH_EXTERN /* extern */ #define LIBCPATH_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #endif /* !defined( _LIBCPATH_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcpath/libcpath_system_string.h0000644000175000017500000000541214610746230023104 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCPATH_SYSTEM_STRING_H ) #define _LIBCPATH_SYSTEM_STRING_H #include #include #include "libcpath_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libcpath_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ); int libcpath_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); int libcpath_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ); int libcpath_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int libcpath_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ); int libcpath_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); int libcpath_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ); int libcpath_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCPATH_SYSTEM_STRING_H ) */ libesedb-20240420/libcpath/libcpath_support.h0000644000175000017500000000266514610746230021715 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBCPATH_EXTERN \ int libcpath_get_codepage( int *codepage, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCPATH_SUPPORT_H ) */ libesedb-20240420/libcpath/libcpath_libcsplit.h0000644000175000017500000000300014610746230022146 0ustar00lordyestalordyesta/* * The internal libcsplit header * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif /* !defined( _LIBCPATH_LIBCSPLIT_H ) */ libesedb-20240420/libcpath/libcpath_system_string.c0000644000175000017500000006173014610746230023104 0ustar00lordyestalordyesta/* * System string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "libcpath_libcerror.h" #include "libcpath_libclocale.h" #include "libcpath_libuna.h" #include "libcpath_system_string.h" #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4 #error Unsupported size of wchar_t #endif /* Determines the size of a narrow string from a system string * Returns 1 if successful or -1 on error */ int libcpath_system_string_size_to_narrow_string( const system_character_t *system_string, size_t system_string_size, size_t *narrow_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_size_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) system_string, system_string_size, libclocale_codepage, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow string size.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string size.", function ); return( -1 ); } *narrow_string_size = system_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a narrow string * Returns 1 if successful or -1 on error */ int libcpath_system_string_copy_to_narrow_string( const system_character_t *system_string, size_t system_string_size, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_copy_to_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf32_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf16_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid narrow string size value too small.", function ); return( -1 ); } if( system_string_copy( narrow_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } narrow_string[ system_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a narrow string * Returns 1 if successful or -1 on error */ int libcpath_system_string_size_from_narrow_string( const char *narrow_string, size_t narrow_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_size_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) narrow_string, narrow_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine system string size.", function ); return( -1 ); } #else if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = narrow_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a narrow string * Returns 1 if successful or -1 on error */ int libcpath_system_string_copy_from_narrow_string( system_character_t *system_string, size_t system_string_size, const char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_copy_from_narrow_string"; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) system_string, system_string_size, (libuna_utf8_character_t *) narrow_string, narrow_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) system_string, system_string_size, (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set system string.", function ); return( -1 ); } #else if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < narrow_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, narrow_string, narrow_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } system_string[ narrow_string_size - 1 ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines the size of a wide string from a system string * Returns 1 if successful or -1 on error */ int libcpath_system_string_size_to_wide_string( const system_character_t *system_string, size_t system_string_size, size_t *wide_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_size_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string size.", function ); return( -1 ); } *wide_string_size = system_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) system_string, system_string_size, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) system_string, system_string_size, libclocale_codepage, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string to a wide string * Returns 1 if successful or -1 on error */ int libcpath_system_string_copy_to_wide_string( const system_character_t *system_string, size_t system_string_size, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_copy_to_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( wide_string_size < system_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid wide string size value too small.", function ); return( -1 ); } if( system_string_copy( wide_string, system_string, system_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } wide_string[ system_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) wide_string, wide_string_size, (libuna_utf8_character_t *) system_string, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) wide_string, wide_string_size, (uint8_t *) system_string, system_string_size, libclocale_codepage, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Determines the size of a system string from a wide string * Returns 1 if successful or -1 on error */ int libcpath_system_string_size_from_wide_string( const wchar_t *wide_string, size_t wide_string_size, size_t *system_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_size_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string size.", function ); return( -1 ); } *system_string_size = wide_string_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) wide_string, wide_string_size, libclocale_codepage, system_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Copies a system string from a wide string * Returns 1 if successful or -1 on error */ int libcpath_system_string_copy_from_wide_string( system_character_t *system_string, size_t system_string_size, const wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "libcpath_system_string_copy_from_wide_string"; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid system string.", function ); return( -1 ); } if( system_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid system string size value exceeds maximum.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } if( system_string_size < wide_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid system string size value too small.", function ); return( -1 ); } if( system_string_copy( system_string, wide_string, wide_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } system_string[ wide_string_size - 1 ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) system_string, system_string_size, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf32_character_t *) wide_string, wide_string_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) system_string, system_string_size, libclocale_codepage, (libuna_utf16_character_t *) wide_string, wide_string_size, error ); #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libcpath/libcpath_libclocale.h0000644000175000017500000000266314610746230022270 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCPATH_LIBCLOCALE_H ) */ libesedb-20240420/libcpath/libcpath_error.h0000644000175000017500000000340314610746230021321 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCPATH_INTERNAL_ERROR_H ) */ libesedb-20240420/libcpath/Makefile.in0000644000175000017500000007470414610746265020242 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_error.c \ libcpath_error.h libcpath_extern.h libcpath_path.c \ libcpath_path.h libcpath_libcerror.h libcpath_libclocale.h \ libcpath_libcsplit.h libcpath_libuna.h libcpath_support.c \ libcpath_support.h libcpath_system_string.c \ libcpath_system_string.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 \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_system_string.lo libcpath_la_OBJECTS = $(am_libcpath_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCPATH_TRUE@am_libcpath_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcpath_error.Plo \ ./$(DEPDIR)/libcpath_path.Plo ./$(DEPDIR)/libcpath_support.Plo \ ./$(DEPDIR)/libcpath_system_string.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcpath_la_SOURCES) DIST_SOURCES = $(am__libcpath_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCPATH_TRUE@ -I../common -I$(top_srcdir)/common \ @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@noinst_LTLIBRARIES = libcpath.la @HAVE_LOCAL_LIBCPATH_TRUE@libcpath_la_SOURCES = \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_definitions.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_error.c libcpath_error.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_extern.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_libuna.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_support.c libcpath_support.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_system_string.c libcpath_system_string.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_unused.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcpath.la: $(libcpath_la_OBJECTS) $(libcpath_la_DEPENDENCIES) $(EXTRA_libcpath_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_path.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_system_string.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcpath_error.Plo -rm -f ./$(DEPDIR)/libcpath_path.Plo -rm -f ./$(DEPDIR)/libcpath_support.Plo -rm -f ./$(DEPDIR)/libcpath_system_string.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcpath_error.Plo -rm -f ./$(DEPDIR)/libcpath_path.Plo -rm -f ./$(DEPDIR)/libcpath_support.Plo -rm -f ./$(DEPDIR)/libcpath_system_string.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libcpath/libcpath_libuna.h0000644000175000017500000000331014610746230021437 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBCPATH_LIBUNA_H ) */ libesedb-20240420/libcpath/libcpath_unused.h0000644000175000017500000000260014610746230021471 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCPATH_UNUSED_H ) #define _LIBCPATH_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 /* !defined( _LIBCPATH_UNUSED_H ) */ libesedb-20240420/libcpath/libcpath_path.c0000644000175000017500000053004514610746230021126 0ustar00lordyestalordyesta/* * Path functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( WINAPI ) && ( WINVER <= 0x0500 ) #include #endif #if defined( HAVE_ERRNO_H ) #include #endif #if defined( HAVE_SYS_STAT_H ) #include #endif #if defined( HAVE_LIMITS_H ) || defined( WINAPI ) /* Include for PATH_MAX */ #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #include "libcpath_definitions.h" #include "libcpath_libcerror.h" #include "libcpath_libcsplit.h" #include "libcpath_path.h" #include "libcpath_system_string.h" #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of CloseHandle * Returns TRUE if successful or FALSE on error */ BOOL libcpath_CloseHandle( HANDLE file_handle ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "CloseHandle" ); 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 /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of SetCurrentDirectoryA * Returns TRUE if successful or FALSE on error */ BOOL libcpath_SetCurrentDirectoryA( LPCSTR path ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( path == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "SetCurrentDirectoryA" ); if( function != NULL ) { result = function( path ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( FALSE ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Changes the directory * 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 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 defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_SetCurrentDirectoryA( directory_name ) == 0 ) #else if( SetCurrentDirectoryA( directory_name ) == 0 ) #endif { 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( HAVE_CHDIR ) /* 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( 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 ); } return( 1 ); } #else #error Missing change directory function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of GetCurrentDirectoryA * Returns the number of characters in the current directory string or 0 on error */ DWORD libcpath_GetCurrentDirectoryA( DWORD buffer_size, LPCSTR buffer ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "GetCurrentDirectoryA" ); if( function != NULL ) { result = function( buffer_size, buffer ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( 0 ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Retrieves the current working directory * 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 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 ); } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) safe_current_working_directory_size = libcpath_GetCurrentDirectoryA( 0, NULL ); #else safe_current_working_directory_size = GetCurrentDirectoryA( 0, NULL ); #endif 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 = 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( memory_set( *current_working_directory, 0, sizeof( char ) * *current_working_directory_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear current working directory.", function ); goto on_error; } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_GetCurrentDirectoryA( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) #else if( GetCurrentDirectoryA( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) #endif { 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( HAVE_GETCWD ) /* 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 ); } *current_working_directory_size = (size_t) PATH_MAX; *current_working_directory = 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( memory_set( *current_working_directory, 0, sizeof( char ) * *current_working_directory_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear current working directory.", function ); goto on_error; } 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; } 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 path type * Returns 1 if succesful or -1 on error */ int libcpath_path_get_path_type( const char *path, size_t path_length, uint8_t *path_type, libcerror_error_t **error ) { static char *function = "libcpath_path_get_path_type"; 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 - 1 ) ) { 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( path_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path type.", function ); return( -1 ); } *path_type = LIBCPATH_TYPE_RELATIVE; /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) && ( ( path[ 2 ] == '.' ) || ( path[ 2 ] == '?' ) ) && ( path[ 3 ] == '\\' ) ) { if( path[ 2 ] == '.' ) { *path_type = LIBCPATH_TYPE_DEVICE; } /* Determine if the path in an extended-length UNC path * \\?\UNC\server\share */ else if( ( path_length >= 8 ) && ( path[ 4 ] == 'U' ) && ( path[ 5 ] == 'N' ) && ( path[ 6 ] == 'C' ) && ( path[ 7 ] == '\\' ) ) { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH_UNC; } else { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } } /* Determine if the path is an UNC path * \\server\share */ else if( ( path_length >= 2 ) && ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) ) { *path_type = LIBCPATH_TYPE_UNC; } else if( path[ 0 ] == '\\' ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } else if( ( path_length >= 3 ) && ( path[ 1 ] == ':' ) && ( path[ 2 ] == '\\' ) && ( ( ( path[ 0 ] >= 'A' ) && ( path[ 0 ] <= 'Z' ) ) || ( ( path[ 0 ] >= 'a' ) && ( path[ 0 ] <= 'z' ) ) ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } return( 1 ); } /* Determines the volume name * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name( const char *path, size_t path_length, char **volume_name, size_t *volume_name_length, size_t *directory_name_index, libcerror_error_t **error ) { static char *function = "libcpath_path_get_volume_name"; size_t path_index = 0; size_t share_name_index = 0; size_t volume_name_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 - 1 ) ) { 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( volume_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid volume name.", function ); return( -1 ); } if( volume_name_length == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid volume name length.", function ); return( -1 ); } if( directory_name_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name index.", function ); return( -1 ); } *volume_name = NULL; *volume_name_length = 0; *directory_name_index = 0; /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) && ( ( path[ 2 ] == '.' ) || ( path[ 2 ] == '?' ) ) && ( path[ 3 ] == '\\' ) ) { if( path[ 2 ] == '.' ) { volume_name_index = 4; } /* Determine if the path in an extended-length UNC path * \\?\UNC\server\share */ else if( ( path_length >= 8 ) && ( path[ 4 ] == 'U' ) && ( path[ 5 ] == 'N' ) && ( path[ 6 ] == 'C' ) && ( path[ 7 ] == '\\' ) ) { volume_name_index = 8; } else { volume_name_index = 4; } } /* Determine if the path is an UNC path * \\server\share */ else if( ( path_length >= 2 ) && ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) ) { volume_name_index = 2; } /* Check if the path contains a volume letter */ if( ( path_length >= 2 ) && ( volume_name_index <= ( path_length - 2 ) ) && ( path[ volume_name_index + 1 ] == ':' ) && ( ( ( path[ volume_name_index ] >= 'A' ) && ( path[ volume_name_index ] <= 'Z' ) ) || ( ( path[ volume_name_index ] >= 'a' ) && ( path[ volume_name_index ] <= 'z' ) ) ) ) { path_index = volume_name_index + 2; if( ( path_index < path_length ) && ( path[ path_index ] == '\\' ) ) { path_index++; } *volume_name = (char *) &( path[ volume_name_index ] ); *volume_name_length = path_index - volume_name_index; if( path[ path_index - 1 ] == '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } else if( volume_name_index == 4 ) { for( path_index = volume_name_index; path_index < path_length; path_index++ ) { if( path[ path_index ] == '\\' ) { path_index++; break; } } *volume_name = (char *) &( path[ 4 ] ); *volume_name_length = path_index - 4; if( path[ path_index - 1 ] == '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } else if( ( volume_name_index == 2 ) || ( volume_name_index == 8 ) ) { for( share_name_index = volume_name_index; share_name_index < path_length; share_name_index++ ) { if( path[ share_name_index ] == '\\' ) { 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 ); return( -1 ); } for( path_index = share_name_index; path_index < path_length; path_index++ ) { if( path[ path_index ] == '\\' ) { path_index++; break; } } *volume_name = (char *) &( path[ volume_name_index ] ); *volume_name_length = path_index - volume_name_index; if( path[ path_index - 1 ] == '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } return( 1 ); } /* Retrieves the current working directory of a specific volume * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory_by_volume( char *volume_name, size_t volume_name_length, char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { char *change_volume_name = NULL; char *current_volume_working_directory = NULL; static char *function = "libcpath_path_get_current_working_directory_by_volume"; size_t current_volume_working_directory_size = 0; int result = 1; 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_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 the path contains a volume name switch to that * volume to determine the current directory */ if( volume_name != NULL ) { if( volume_name_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid volume name length value exceeds maximum.", function ); goto on_error; } if( libcpath_path_get_current_working_directory( ¤t_volume_working_directory, ¤t_volume_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current volume working directory.", function ); goto on_error; } change_volume_name = 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( 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( current_working_directory, current_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); /* Make sure the current working directory has been changed * back to its original value */ result = -1; } if( current_volume_working_directory != NULL ) { if( libcpath_path_change_directory( current_volume_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_volume_working_directory ); current_volume_working_directory = NULL; } return( result ); on_error: if( change_volume_name != NULL ) { memory_free( change_volume_name ); } if( current_volume_working_directory != NULL ) { memory_free( current_volume_working_directory ); } if( *current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } /* Determines the full path of the Windows path specified * The function uses the extended-length path format * (path with \\?\ prefix) * * Multiple successive \ not at the start of the path are combined into one * * 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 * \directory\\file.txt * Local 'relative' path: ..\directory\file.txt * Local 'relative' path: .\directory\file.txt * Volume 'absolute' path: C:\directory\file.txt * C:\..\directory\file.txt * Volume 'relative' path: C:directory\file.txt * UNC path: \\server\share\directory\file.txt * * TODO handle: * Volume device path: \\.\C: * Volume file system path: \\.\C:\ * * 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 *full_path_prefix = NULL; char *last_used_path_string_segment = NULL; char *path_string_segment = NULL; char *volume_name = NULL; static char *function = "libcpath_path_get_full_path"; size_t current_directory_length = 0; size_t current_directory_name_index = 0; size_t current_directory_size = 0; size_t current_directory_string_segment_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 safe_full_path_size = 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 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 - 1 ) ) { 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( libcpath_path_get_path_type( path, path_length, &path_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine path type.", function ); goto on_error; } if( libcpath_path_get_volume_name( path, path_length, &volume_name, &volume_name_length, &path_directory_name_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name.", function ); goto on_error; } /* If the path is a device path, an extended-length path or an UNC * do not bother to lookup the current working directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) && ( path_type != LIBCPATH_TYPE_UNC ) ) { if( libcpath_path_get_current_working_directory_by_volume( volume_name, volume_name_length, ¤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 working directory by volume.", function ); goto on_error; } /* Determine the volume name using the current working directory if necessary */ if( libcpath_path_get_volume_name( current_directory, current_directory_size - 1, &volume_name, &volume_name_length, ¤t_directory_name_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name from current working directory.", function ); goto on_error; } } if( ( current_directory != NULL ) && ( current_directory_name_index < current_directory_size ) ) { current_directory_length = narrow_string_length( &( current_directory[ current_directory_name_index ] ) ); if( libcsplit_narrow_string_split( &( current_directory[ current_directory_name_index ] ), current_directory_length + 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 working 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 \\.\) */ safe_full_path_size = 4; /* If the path contains a volume name * the length of the volume name * a directory separator */ if( volume_name != NULL ) { safe_full_path_size += volume_name_length + 1; } /* If the path contains an UNC path * add the size of the UNC\ prefix */ if( ( path_type == LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) || ( path_type == LIBCPATH_TYPE_UNC ) ) { safe_full_path_size += 4; } /* If the path is relative * add the size of the current working directory * a directory separator, if necessary */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_name_index < current_directory_size ) ) { safe_full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) ); if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != '\\' ) ) { safe_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 working 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 working 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 working 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 */ safe_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 working 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 */ safe_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 */ safe_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 = narrow_string_allocate( safe_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( memory_set( *full_path, 0, sizeof( char ) * safe_full_path_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear full path.", function ); goto on_error; } *full_path_size = safe_full_path_size; if( path_type == LIBCPATH_TYPE_DEVICE ) { full_path_prefix = "\\\\.\\"; full_path_prefix_length = 4; } else { full_path_prefix = "\\\\?\\"; full_path_prefix_length = 4; } if( 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( ( path_type == LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) || ( path_type == LIBCPATH_TYPE_UNC ) ) { if( 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( 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 working 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 working 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 working directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( 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 working 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( 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 working 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 ); } #else /* Determines the full path of the POSIX path specified * Multiple successive / are combined into one * * Scenarios: * /home/user/file.txt * /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_length = 0; 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; size_t safe_full_path_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 - 1 ) ) { 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 working directory.", function ); goto on_error; } } if( current_directory != NULL ) { current_directory_length = narrow_string_length( current_directory ); if( libcsplit_narrow_string_split( current_directory, current_directory_length + 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 working 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 ) { safe_full_path_size = 1; } /* If the path is relative * add the size of the current working directory * a directory separator, if necessary */ else if( path_type == LIBCPATH_TYPE_RELATIVE ) { if( current_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current working directory.", function ); goto on_error; } /* We need to use the length here since current_directory_size will be PATH_MAX */ safe_full_path_size = current_directory_length; if( ( current_directory_length >= 1 ) && ( current_directory[ current_directory_length - 1 ] != '/' ) ) { safe_full_path_size++; } } 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 working 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 working 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 working 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 */ safe_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 working 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 */ safe_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 */ safe_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 = narrow_string_allocate( safe_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( memory_set( *full_path, 0, sizeof( char ) * safe_full_path_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear full path.", function ); goto on_error; } *full_path_size = safe_full_path_size; if( path_type == LIBCPATH_TYPE_ABSOLUTE ) { ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } /* If the path is relative * add the current working 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 working 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 working directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( 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 working 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( 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 working 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 ) */ /* Retrieves the size of a sanitized version of the path character * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_character_size( char character, size_t *sanitized_character_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_character_size"; if( sanitized_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized character size.", function ); return( -1 ); } if( ( character >= 0x00 ) && ( character <= 0x1f ) ) { *sanitized_character_size = 4; } else if( character == LIBCPATH_ESCAPE_CHARACTER ) { *sanitized_character_size = 2; } #if defined( WINAPI ) else if( character == '/' ) { *sanitized_character_size = 4; } #endif else if( ( character == '!' ) || ( character == '$' ) || ( character == '%' ) || ( character == '&' ) || ( character == '*' ) || ( character == '+' ) || ( character == ':' ) || ( character == ';' ) || ( character == '<' ) || ( character == '>' ) || ( character == '?' ) || ( character == '|' ) || ( character == 0x7f ) ) { *sanitized_character_size = 4; } else { *sanitized_character_size = 1; } return( 1 ); } /* Retrieves a sanitized version of the path character * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_character( char character, size_t sanitized_character_size, char *sanitized_path, size_t sanitized_path_size, size_t *sanitized_path_index, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_character"; size_t safe_sanitized_path_index = 0; char lower_nibble = 0; char upper_nibble = 0; if( ( sanitized_character_size != 1 ) && ( sanitized_character_size != 2 ) && ( sanitized_character_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sanitized character size value out of bounds.", function ); return( -1 ); } if( sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path.", function ); return( -1 ); } if( sanitized_path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized path size value exceeds maximum.", function ); return( -1 ); } if( sanitized_path_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path index.", function ); return( -1 ); } safe_sanitized_path_index = *sanitized_path_index; if( safe_sanitized_path_index > sanitized_path_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sanitized path index value out of bounds.", function ); return( -1 ); } if( ( sanitized_character_size > sanitized_path_size ) || ( safe_sanitized_path_index > ( sanitized_path_size - sanitized_character_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid sanitized path size value too small.", function ); return( -1 ); } if( sanitized_character_size == 1 ) { sanitized_path[ safe_sanitized_path_index++ ] = character; } else if( sanitized_character_size == 2 ) { sanitized_path[ safe_sanitized_path_index++ ] = LIBCPATH_ESCAPE_CHARACTER; sanitized_path[ safe_sanitized_path_index++ ] = LIBCPATH_ESCAPE_CHARACTER; } else if( sanitized_character_size == 4 ) { lower_nibble = character & 0x0f; upper_nibble = ( character >> 4 ) & 0x0f; if( lower_nibble > 10 ) { lower_nibble += 'a' - 10; } else { lower_nibble += '0'; } if( upper_nibble > 10 ) { upper_nibble += 'a' - 10; } else { upper_nibble += '0'; } sanitized_path[ safe_sanitized_path_index++ ] = LIBCPATH_ESCAPE_CHARACTER; sanitized_path[ safe_sanitized_path_index++ ] = 'x'; sanitized_path[ safe_sanitized_path_index++ ] = upper_nibble; sanitized_path[ safe_sanitized_path_index++ ] = lower_nibble; } *sanitized_path_index = safe_sanitized_path_index; return( 1 ); } /* Retrieves a sanitized version of the filename * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_filename( const char *filename, size_t filename_length, char **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_filename"; char *safe_sanitized_filename = NULL; size_t filename_index = 0; size_t sanitized_character_size = 0; size_t safe_sanitized_filename_size = 0; size_t sanitized_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_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid filename length is zero.", function ); return( -1 ); } if( filename_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename length value exceeds maximum.", function ); return( -1 ); } if( sanitized_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized filename.", function ); return( -1 ); } if( *sanitized_filename != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid sanitized filename value already set.", function ); return( -1 ); } if( sanitized_filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized filename size.", function ); return( -1 ); } safe_sanitized_filename_size = 1; for( filename_index = 0; filename_index < filename_length; filename_index++ ) { if( filename[ filename_index ] == LIBCPATH_SEPARATOR ) { sanitized_character_size = 4; } else if( libcpath_path_get_sanitized_character_size( filename[ filename_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } safe_sanitized_filename_size += sanitized_character_size; } if( safe_sanitized_filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized filename size value exceeds maximum.", function ); goto on_error; } safe_sanitized_filename = narrow_string_allocate( safe_sanitized_filename_size ); if( safe_sanitized_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create sanitized filename.", function ); goto on_error; } for( filename_index = 0; filename_index < filename_length; filename_index++ ) { if( filename[ filename_index ] == LIBCPATH_SEPARATOR ) { sanitized_character_size = 4; } else if( libcpath_path_get_sanitized_character_size( filename[ filename_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } if( libcpath_path_get_sanitized_character( filename[ filename_index ], sanitized_character_size, safe_sanitized_filename, safe_sanitized_filename_size, &sanitized_filename_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } } safe_sanitized_filename[ sanitized_filename_index ] = 0; *sanitized_filename = safe_sanitized_filename; *sanitized_filename_size = safe_sanitized_filename_size; return( 1 ); on_error: if( safe_sanitized_filename != NULL ) { memory_free( safe_sanitized_filename ); } return( -1 ); } /* Retrieves a sanitized version of the path * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_path( const char *path, size_t path_length, char **sanitized_path, size_t *sanitized_path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_path"; char *safe_sanitized_path = NULL; size_t path_index = 0; size_t safe_sanitized_path_size = 0; size_t sanitized_character_size = 0; size_t sanitized_path_index = 0; #if defined( WINAPI ) size_t last_path_segment_seperator_index = 0; #endif 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 - 1 ) ) { 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( sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path.", function ); return( -1 ); } if( *sanitized_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid sanitized path value already set.", function ); return( -1 ); } if( sanitized_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path size.", function ); return( -1 ); } safe_sanitized_path_size = 1; for( path_index = 0; path_index < path_length; path_index++ ) { if( libcpath_path_get_sanitized_character_size( path[ path_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } safe_sanitized_path_size += sanitized_character_size; #if defined( WINAPI ) if( path[ path_index ] == LIBCPATH_SEPARATOR ) { last_path_segment_seperator_index = path_index; } #endif } if( safe_sanitized_path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized path size value exceeds maximum.", function ); goto on_error; } #if defined( WINAPI ) if( last_path_segment_seperator_index > 32767 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: last path segment separator value out of bounds.", function ); goto on_error; } if( safe_sanitized_path_size > 32767 ) { safe_sanitized_path_size = 32767; } #endif safe_sanitized_path = narrow_string_allocate( safe_sanitized_path_size ); if( safe_sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create sanitized path.", function ); goto on_error; } for( path_index = 0; path_index < path_length; path_index++ ) { if( libcpath_path_get_sanitized_character_size( path[ path_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } if( libcpath_path_get_sanitized_character( path[ path_index ], sanitized_character_size, safe_sanitized_path, safe_sanitized_path_size, &sanitized_path_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } } safe_sanitized_path[ sanitized_path_index ] = 0; *sanitized_path = safe_sanitized_path; *sanitized_path_size = safe_sanitized_path_size; return( 1 ); on_error: if( safe_sanitized_path != NULL ) { memory_free( safe_sanitized_path ); } return( -1 ); } /* 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 filename_index = 0; 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 ); } /* TODO strip other patterns like /./ */ while( directory_name_length > 0 ) { if( directory_name[ directory_name_length - 1 ] != (char) LIBCPATH_SEPARATOR ) { break; } directory_name_length--; } while( filename_length > 0 ) { if( filename[ filename_index ] != (char) LIBCPATH_SEPARATOR ) { break; } filename_index++; filename_length--; } *path_size = directory_name_length + filename_length + 2; *path = 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( 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( narrow_string_copy( &( ( *path )[ path_index ] ), &( filename[ filename_index ] ), 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 <= 0x0500 ) /* Cross Windows safe version of CreateDirectoryA * Returns TRUE if successful or FALSE on error */ BOOL libcpath_CreateDirectoryA( LPCSTR path, SECURITY_ATTRIBUTES *security_attributes ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( path == NULL ) { return( 0 ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "CreateDirectoryA" ); if( function != NULL ) { result = function( path, security_attributes ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( 0 ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Makes the directory * 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 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 defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_CreateDirectoryA( directory_name, NULL ) == 0 ) #else if( CreateDirectoryA( directory_name, NULL ) == 0 ) #endif { 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( HAVE_MKDIR ) /* 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( 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 ); } return( 1 ); } #else #error Missing make directory function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of SetCurrentDirectoryW * Returns TRUE if successful or FALSE on error */ BOOL libcpath_SetCurrentDirectoryW( LPCWSTR path ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( path == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "SetCurrentDirectoryW" ); if( function != NULL ) { result = function( path ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( FALSE ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Changes the directory * 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 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 defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_SetCurrentDirectoryW( directory_name ) == 0 ) #else if( SetCurrentDirectoryW( directory_name ) == 0 ) #endif { 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( HAVE_CHDIR ) /* 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"; char *narrow_directory_name = 0; size_t directory_name_length = 0; size_t narrow_directory_name_size = 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 ); } directory_name_length = wide_string_length( directory_name ); if( libcpath_system_string_size_from_wide_string( directory_name, directory_name_length + 1, &narrow_directory_name_size, error ) != 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 = 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( libcpath_system_string_copy_from_wide_string( narrow_directory_name, narrow_directory_name_size, directory_name, directory_name_length + 1, error ) != 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 ); return( 1 ); on_error: if( narrow_directory_name != NULL ) { memory_free( narrow_directory_name ); } return( -1 ); } #else #error Missing change directory function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of GetCurrentDirectoryW * Returns the number of characters in the current directory string or 0 on error */ DWORD libcpath_GetCurrentDirectoryW( DWORD buffer_size, LPCWSTR buffer ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "GetCurrentDirectoryW" ); if( function != NULL ) { result = function( buffer_size, buffer ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( 0 ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Retrieves the current working directory * 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 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 ); } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) safe_current_working_directory_size = libcpath_GetCurrentDirectoryW( 0, NULL ); #else safe_current_working_directory_size = GetCurrentDirectoryW( 0, NULL ); #endif 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 = 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( memory_set( *current_working_directory, 0, sizeof( wchar_t ) * *current_working_directory_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear current working directory.", function ); goto on_error; } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_GetCurrentDirectoryW( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) #else if( GetCurrentDirectoryW( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) #endif { 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( HAVE_GETCWD ) /* 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"; char *narrow_current_working_directory = 0; size_t narrow_current_working_directory_length = 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 ); } narrow_current_working_directory = 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_length = 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( libcpath_system_string_size_from_narrow_string( narrow_current_working_directory, narrow_current_working_directory_length + 1, current_working_directory_size, error ) != 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 ); } *current_working_directory = 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( memory_set( *current_working_directory, 0, sizeof( wchar_t ) * *current_working_directory_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear current working directory.", function ); goto on_error; } if( libcpath_system_string_copy_to_wide_string( narrow_current_working_directory, narrow_current_working_directory_length + 1, *current_working_directory, *current_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set current working directory.", function ); goto on_error; } memory_free( narrow_current_working_directory ); return( 1 ); on_error: if( narrow_current_working_directory != NULL ) { memory_free( narrow_current_working_directory ); } 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 path type * Returns 1 if succesful or -1 on error */ int libcpath_path_get_path_type_wide( const wchar_t *path, size_t path_length, uint8_t *path_type, libcerror_error_t **error ) { static char *function = "libcpath_path_get_path_type_wide"; 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 - 1 ) ) { 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( path_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path type.", function ); return( -1 ); } *path_type = LIBCPATH_TYPE_RELATIVE; /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) && ( ( path[ 2 ] == (wchar_t) '.' ) || ( path[ 2 ] == (wchar_t) '?' ) ) && ( path[ 3 ] == (wchar_t) '\\' ) ) { if( path[ 2 ] == (wchar_t) '.' ) { *path_type = LIBCPATH_TYPE_DEVICE; } /* Determine if the path in an extended-length UNC path * \\?\UNC\server\share */ else if( ( path_length >= 8 ) && ( path[ 4 ] == (wchar_t) 'U' ) && ( path[ 5 ] == (wchar_t) 'N' ) && ( path[ 6 ] == (wchar_t) 'C' ) && ( path[ 7 ] == (wchar_t) '\\' ) ) { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH_UNC; } else { *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } } /* Determine if the path is an UNC path * \\server\share */ else if( ( path_length >= 2 ) && ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { *path_type = LIBCPATH_TYPE_UNC; } else if( path[ 0 ] == (wchar_t) '\\' ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } else if( ( path_length >= 3 ) && ( path[ 1 ] == (wchar_t) ':' ) && ( path[ 2 ] == (wchar_t) '\\' ) && ( ( ( path[ 0 ] >= (wchar_t) 'A' ) && ( path[ 0 ] <= (wchar_t) 'Z' ) ) || ( ( path[ 0 ] >= (wchar_t) 'a' ) && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) ) { *path_type = LIBCPATH_TYPE_ABSOLUTE; } return( 1 ); } /* Determines the volume name * Returns 1 if succesful or -1 on error */ int libcpath_path_get_volume_name_wide( const wchar_t *path, size_t path_length, wchar_t **volume_name, size_t *volume_name_length, size_t *directory_name_index, libcerror_error_t **error ) { static char *function = "libcpath_path_get_volume_name_wide"; size_t path_index = 0; size_t share_name_index = 0; size_t volume_name_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 - 1 ) ) { 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( volume_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid volume name.", function ); return( -1 ); } if( volume_name_length == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid volume name length.", function ); return( -1 ); } if( directory_name_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name index.", function ); return( -1 ); } *volume_name = NULL; *volume_name_length = 0; *directory_name_index = 0; /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) && ( ( path[ 2 ] == (wchar_t) '.' ) || ( path[ 2 ] == (wchar_t) '?' ) ) && ( path[ 3 ] == (wchar_t) '\\' ) ) { if( path[ 2 ] == (wchar_t) '.' ) { volume_name_index = 4; } /* Determine if the path in an extended-length UNC path * \\?\UNC\server\share */ else if( ( path_length >= 8 ) && ( path[ 4 ] == (wchar_t) 'U' ) && ( path[ 5 ] == (wchar_t) 'N' ) && ( path[ 6 ] == (wchar_t) 'C' ) && ( path[ 7 ] == (wchar_t) '\\' ) ) { volume_name_index = 8; } else { volume_name_index = 4; } } /* Determine if the path is an UNC path * \\server\share */ else if( ( path_length >= 2 ) && ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { volume_name_index = 2; } /* Check if the path contains a volume letter */ if( ( path_length >= 2 ) && ( volume_name_index <= ( path_length - 2 ) ) && ( path[ volume_name_index + 1 ] == (wchar_t) ':' ) && ( ( ( path[ volume_name_index ] >= (wchar_t) 'A' ) && ( path[ volume_name_index ] <= (wchar_t) 'Z' ) ) || ( ( path[ volume_name_index ] >= (wchar_t) 'a' ) && ( path[ volume_name_index ] <= (wchar_t) 'z' ) ) ) ) { path_index = volume_name_index + 2; if( ( path_index < path_length ) && ( path[ path_index ] == (wchar_t) '\\' ) ) { path_index++; } *volume_name = (wchar_t *) &( path[ volume_name_index ] ); *volume_name_length = path_index - volume_name_index; if( path[ path_index - 1 ] == (wchar_t) '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } else if( volume_name_index == 4 ) { for( path_index = volume_name_index; path_index < path_length; path_index++ ) { if( path[ path_index ] == (wchar_t) '\\' ) { path_index++; break; } } *volume_name = (wchar_t *) &( path[ 4 ] ); *volume_name_length = path_index - 4; if( path[ path_index - 1 ] == (wchar_t) '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } else if( ( volume_name_index == 2 ) || ( volume_name_index == 8 ) ) { for( share_name_index = volume_name_index; share_name_index < path_length; share_name_index++ ) { if( path[ share_name_index ] == (wchar_t) '\\' ) { 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 ); return( -1 ); } for( path_index = share_name_index; path_index < path_length; path_index++ ) { if( path[ path_index ] == (wchar_t) '\\' ) { path_index++; break; } } *volume_name = (wchar_t *) &( path[ volume_name_index ] ); *volume_name_length = path_index - volume_name_index; if( path[ path_index - 1 ] == (wchar_t) '\\' ) { *volume_name_length -= 1; } *directory_name_index = path_index; } return( 1 ); } /* Retrieves the current working directory of a specific volume * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory_by_volume_wide( wchar_t *volume_name, size_t volume_name_length, wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { wchar_t *change_volume_name = NULL; wchar_t *current_volume_working_directory = NULL; static char *function = "libcpath_path_get_current_working_directory_by_volume_wide"; size_t current_volume_working_directory_size = 0; int result = 1; 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_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 the path contains a volume name switch to that * volume to determine the current directory */ if( volume_name != NULL ) { if( volume_name_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid volume name length value exceeds maximum.", function ); goto on_error; } if( libcpath_path_get_current_working_directory_wide( ¤t_volume_working_directory, ¤t_volume_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current volume working directory.", function ); goto on_error; } change_volume_name = 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( 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( current_working_directory, current_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); /* Make sure the current working directory has been changed * back to its original value */ result = -1; } if( current_volume_working_directory != NULL ) { if( libcpath_path_change_directory_wide( current_volume_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_volume_working_directory ); current_volume_working_directory = NULL; } return( result ); on_error: if( change_volume_name != NULL ) { memory_free( change_volume_name ); } if( current_volume_working_directory != NULL ) { memory_free( current_volume_working_directory ); } if( *current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } /* Determines the full path of the Windows path specified * The function uses the extended-length path format * (path with \\?\ prefix) * * Multiple successive \ not at the start of the path are combined into one * * 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 * C:\..\directory\file.txt * Volume 'relative' path: C:directory\file.txt * UNC path: \\server\share\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 *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; wchar_t *volume_name = NULL; static char *function = "libcpath_path_get_full_path_wide"; size_t current_directory_length = 0; size_t current_directory_name_index = 0; size_t current_directory_size = 0; size_t current_directory_string_segment_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 safe_full_path_size = 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 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 - 1 ) ) { 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( libcpath_path_get_path_type_wide( path, path_length, &path_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine path type.", function ); goto on_error; } if( libcpath_path_get_volume_name_wide( path, path_length, &volume_name, &volume_name_length, &path_directory_name_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name.", function ); goto on_error; } /* If the path is a device path, an extended-length path or an UNC * do not bother to lookup the current working directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) && ( path_type != LIBCPATH_TYPE_UNC ) ) { if( libcpath_path_get_current_working_directory_by_volume_wide( volume_name, volume_name_length, ¤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 working directory by volume.", function ); goto on_error; } /* Determine the volume name using the current working directory if necessary */ if( libcpath_path_get_volume_name_wide( current_directory, current_directory_size - 1, &volume_name, &volume_name_length, ¤t_directory_name_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine volume name from current working directory.", function ); goto on_error; } } if( ( current_directory != NULL ) && ( current_directory_name_index < current_directory_size ) ) { current_directory_length = wide_string_length( &( current_directory[ current_directory_name_index ] ) ); if( libcsplit_wide_string_split( &( current_directory[ current_directory_name_index ] ), current_directory_length + 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 working 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 */ safe_full_path_size = 4; /* If the path contains a volume name * the length of the volume name * a directory separator */ if( volume_name != NULL ) { safe_full_path_size += volume_name_length + 1; } /* If the path contains an UNC path * add the size of the UNC\ prefix */ if( ( path_type == LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) || ( path_type == LIBCPATH_TYPE_UNC ) ) { safe_full_path_size += 4; } /* If the path is relative * add the size of the current working directory * a directory separator, if necessary */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_name_index < current_directory_size ) ) { safe_full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) ); if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != (wchar_t) '\\' ) ) { safe_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 working 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 working 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 working 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 */ safe_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 working 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 */ safe_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 */ safe_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 = wide_string_allocate( safe_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( memory_set( *full_path, 0, sizeof( wchar_t ) * safe_full_path_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear full path.", function ); goto on_error; } *full_path_size = safe_full_path_size; 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( 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( ( path_type == LIBCPATH_TYPE_EXTENDED_LENGTH_UNC ) || ( path_type == LIBCPATH_TYPE_UNC ) ) { if( 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( 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 working 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 working 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 working directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( 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 working 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( 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 working 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 ); } #else /* Determines the full path of the POSIX path specified * Multiple successive / are combined into one * * Scenarios: * /home/user/file.txt * /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_length = 0; 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; size_t safe_full_path_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 - 1 ) ) { 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 working directory.", function ); goto on_error; } } if( current_directory != NULL ) { current_directory_length = wide_string_length( current_directory ); if( libcsplit_wide_string_split( current_directory, current_directory_length + 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 working 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 ) { safe_full_path_size = 1; } /* If the path is relative * add the size of the current working directory * a directory separator, if necessary */ else if( path_type == LIBCPATH_TYPE_RELATIVE ) { if( current_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current working directory.", function ); goto on_error; } /* We need to use the length here since current_directory_size will be PATH_MAX */ safe_full_path_size = current_directory_length; if( ( current_directory_length >= 1 ) && ( current_directory[ current_directory_length - 1 ] != (wchar_t) '/' ) ) { safe_full_path_size++; } } 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 working 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 working 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 working 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 */ safe_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 working 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 */ safe_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 */ safe_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 = wide_string_allocate( safe_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( memory_set( *full_path, 0, sizeof( wchar_t ) * safe_full_path_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear full path.", function ); goto on_error; } *full_path_size = safe_full_path_size; 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 working 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 working 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 working directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( 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 working 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( 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 working 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 ) */ /* Retrieves the size of a sanitized version of the path character * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_character_size_wide( wchar_t character, size_t *sanitized_character_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_character_size_wide"; if( sanitized_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized character size.", function ); return( -1 ); } if( ( character >= 0x00 ) && ( character <= 0x1f ) ) { *sanitized_character_size = 4; } else if( character == (wchar_t) LIBCPATH_ESCAPE_CHARACTER ) { *sanitized_character_size = 2; } #if defined( WINAPI ) else if( character == (wchar_t) '/' ) { *sanitized_character_size = 4; } #endif else if( ( character == (wchar_t) '!' ) || ( character == (wchar_t) '$' ) || ( character == (wchar_t) '%' ) || ( character == (wchar_t) '&' ) || ( character == (wchar_t) '*' ) || ( character == (wchar_t) '+' ) || ( character == (wchar_t) ':' ) || ( character == (wchar_t) ';' ) || ( character == (wchar_t) '<' ) || ( character == (wchar_t) '>' ) || ( character == (wchar_t) '?' ) || ( character == (wchar_t) '|' ) || ( character == 0x7f ) ) { *sanitized_character_size = 4; } else { *sanitized_character_size = 1; } return( 1 ); } /* Retrieves a sanitized version of the path character * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_character_wide( wchar_t character, size_t sanitized_character_size, wchar_t *sanitized_path, size_t sanitized_path_size, size_t *sanitized_path_index, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_character_wide"; size_t safe_sanitized_path_index = 0; wchar_t lower_nibble = 0; wchar_t upper_nibble = 0; if( ( sanitized_character_size != 1 ) && ( sanitized_character_size != 2 ) && ( sanitized_character_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sanitized character size value out of bounds.", function ); return( -1 ); } if( sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path.", function ); return( -1 ); } if( sanitized_path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized path size value exceeds maximum.", function ); return( -1 ); } if( sanitized_path_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path index.", function ); return( -1 ); } safe_sanitized_path_index = *sanitized_path_index; if( safe_sanitized_path_index > sanitized_path_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sanitized path index value out of bounds.", function ); return( -1 ); } if( ( sanitized_character_size > sanitized_path_size ) || ( safe_sanitized_path_index > ( sanitized_path_size - sanitized_character_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid sanitized path size value too small.", function ); return( -1 ); } if( sanitized_character_size == 1 ) { sanitized_path[ safe_sanitized_path_index++ ] = character; } else if( sanitized_character_size == 2 ) { sanitized_path[ safe_sanitized_path_index++ ] = (wchar_t) LIBCPATH_ESCAPE_CHARACTER; sanitized_path[ safe_sanitized_path_index++ ] = (wchar_t) LIBCPATH_ESCAPE_CHARACTER; } else if( sanitized_character_size == 4 ) { lower_nibble = character & 0x0f; upper_nibble = ( character >> 4 ) & 0x0f; if( lower_nibble > 10 ) { lower_nibble += (wchar_t) 'a' - 10; } else { lower_nibble += '0'; } if( upper_nibble > 10 ) { upper_nibble += (wchar_t) 'a' - 10; } else { upper_nibble += '0'; } sanitized_path[ safe_sanitized_path_index++ ] = (wchar_t) LIBCPATH_ESCAPE_CHARACTER; sanitized_path[ safe_sanitized_path_index++ ] = (wchar_t) 'x'; sanitized_path[ safe_sanitized_path_index++ ] = upper_nibble; sanitized_path[ safe_sanitized_path_index++ ] = lower_nibble; } *sanitized_path_index = safe_sanitized_path_index; return( 1 ); } /* Retrieves a sanitized version of the filename * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_filename_wide( const wchar_t *filename, size_t filename_length, wchar_t **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_filename_wide"; wchar_t *safe_sanitized_filename = NULL; size_t filename_index = 0; size_t sanitized_character_size = 0; size_t safe_sanitized_filename_size = 0; size_t sanitized_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_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid filename length is zero.", function ); return( -1 ); } if( filename_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename length value exceeds maximum.", function ); return( -1 ); } if( sanitized_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized filename.", function ); return( -1 ); } if( *sanitized_filename != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid sanitized filename value already set.", function ); return( -1 ); } if( sanitized_filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized filename size.", function ); return( -1 ); } safe_sanitized_filename_size = 1; for( filename_index = 0; filename_index < filename_length; filename_index++ ) { if( filename[ filename_index ] == LIBCPATH_SEPARATOR ) { sanitized_character_size = 4; } else if( libcpath_path_get_sanitized_character_size_wide( filename[ filename_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } safe_sanitized_filename_size += sanitized_character_size; } if( safe_sanitized_filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized filename size value exceeds maximum.", function ); goto on_error; } safe_sanitized_filename = wide_string_allocate( safe_sanitized_filename_size ); if( safe_sanitized_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create sanitized filename.", function ); goto on_error; } for( filename_index = 0; filename_index < filename_length; filename_index++ ) { if( filename[ filename_index ] == LIBCPATH_SEPARATOR ) { sanitized_character_size = 4; } else if( libcpath_path_get_sanitized_character_size_wide( filename[ filename_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } if( libcpath_path_get_sanitized_character_wide( filename[ filename_index ], sanitized_character_size, safe_sanitized_filename, safe_sanitized_filename_size, &sanitized_filename_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } } safe_sanitized_filename[ sanitized_filename_index ] = 0; *sanitized_filename = safe_sanitized_filename; *sanitized_filename_size = safe_sanitized_filename_size; return( 1 ); on_error: if( safe_sanitized_filename != NULL ) { memory_free( safe_sanitized_filename ); } return( -1 ); } /* Retrieves a sanitized version of the path * Returns 1 if successful or -1 on error */ int libcpath_path_get_sanitized_path_wide( const wchar_t *path, size_t path_length, wchar_t **sanitized_path, size_t *sanitized_path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_sanitized_path_wide"; wchar_t *safe_sanitized_path = NULL; size_t path_index = 0; size_t safe_sanitized_path_size = 0; size_t sanitized_character_size = 0; size_t sanitized_path_index = 0; #if defined( WINAPI ) size_t last_path_segment_seperator_index = 0; #endif 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 - 1 ) ) { 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( sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path.", function ); return( -1 ); } if( *sanitized_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid sanitized path value already set.", function ); return( -1 ); } if( sanitized_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sanitized path size.", function ); return( -1 ); } safe_sanitized_path_size = 1; for( path_index = 0; path_index < path_length; path_index++ ) { if( libcpath_path_get_sanitized_character_size_wide( path[ path_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } safe_sanitized_path_size += sanitized_character_size; #if defined( WINAPI ) if( path[ path_index ] == LIBCPATH_SEPARATOR ) { last_path_segment_seperator_index = path_index; } #endif } if( safe_sanitized_path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sanitized path size value exceeds maximum.", function ); goto on_error; } #if defined( WINAPI ) if( last_path_segment_seperator_index > 32767 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: last path segment separator value out of bounds.", function ); goto on_error; } if( safe_sanitized_path_size > 32767 ) { safe_sanitized_path_size = 32767; } #endif safe_sanitized_path = wide_string_allocate( safe_sanitized_path_size ); if( safe_sanitized_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create sanitized path.", function ); goto on_error; } for( path_index = 0; path_index < path_length; path_index++ ) { if( libcpath_path_get_sanitized_character_size_wide( path[ path_index ], &sanitized_character_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } if( libcpath_path_get_sanitized_character_wide( path[ path_index ], sanitized_character_size, safe_sanitized_path, safe_sanitized_path_size, &sanitized_path_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sanitize character size.", function ); goto on_error; } } safe_sanitized_path[ sanitized_path_index ] = 0; *sanitized_path = safe_sanitized_path; *sanitized_path_size = safe_sanitized_path_size; return( 1 ); on_error: if( safe_sanitized_path != NULL ) { memory_free( safe_sanitized_path ); } return( -1 ); } /* 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 filename_index = 0; 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 ); } /* TODO strip other patterns like /./ */ while( directory_name_length > 0 ) { if( directory_name[ directory_name_length - 1 ] != (wchar_t) LIBCPATH_SEPARATOR ) { break; } directory_name_length--; } while( filename_length > 0 ) { if( filename[ filename_index ] != (wchar_t) LIBCPATH_SEPARATOR ) { break; } filename_index++; filename_length--; } *path_size = directory_name_length + filename_length + 2; *path = 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( 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( wide_string_copy( &( ( *path )[ path_index ] ), &( filename[ filename_index ] ), 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 <= 0x0500 ) /* Cross Windows safe version of CreateDirectoryW * Returns TRUE if successful or FALSE on error */ BOOL libcpath_CreateDirectoryW( LPCWSTR path, SECURITY_ATTRIBUTES *security_attributes ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( path == NULL ) { return( 0 ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "CreateDirectoryW" ); if( function != NULL ) { result = function( path, security_attributes ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { libcpath_CloseHandle( library_handle ); return( 0 ); } return( result ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) /* Makes the directory * 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 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 defined( WINAPI ) && ( WINVER <= 0x0500 ) if( libcpath_CreateDirectoryW( directory_name, NULL ) == 0 ) #else if( CreateDirectoryW( directory_name, NULL ) == 0 ) #endif { 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( HAVE_MKDIR ) /* 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"; char *narrow_directory_name = 0; size_t directory_name_length = 0; size_t narrow_directory_name_size = 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 ); } directory_name_length = wide_string_length( directory_name ); if( libcpath_system_string_size_from_wide_string( directory_name, directory_name_length + 1, &narrow_directory_name_size, error ) != 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 = 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( libcpath_system_string_copy_from_wide_string( narrow_directory_name, narrow_directory_name_size, directory_name, directory_name_length + 1, error ) != 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 ); return( 1 ); on_error: if( narrow_directory_name != NULL ) { memory_free( narrow_directory_name ); } return( -1 ); } #else #error Missing make directory function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libesedb-20240420/libcpath/libcpath_path.h0000644000175000017500000001600214610746230021123 0ustar00lordyestalordyesta/* * Path functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCPATH_PATH_H ) #define _LIBCPATH_PATH_H #include #include #include "libcpath_extern.h" #include "libcpath_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_CloseHandle( HANDLE file_handle ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_SetCurrentDirectoryA( LPCSTR path ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCPATH_EXTERN \ int libcpath_path_change_directory( const char *directory_name, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) DWORD libcpath_GetCurrentDirectoryA( DWORD buffer_size, LPCSTR buffer ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCPATH_EXTERN \ int libcpath_path_get_current_working_directory( char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); #if defined( WINAPI ) int libcpath_path_get_path_type( const char *path, size_t path_length, uint8_t *path_type, libcerror_error_t **error ); int libcpath_path_get_volume_name( const char *path, size_t path_length, char **volume_name, size_t *volume_name_length, size_t *directory_name_index, libcerror_error_t **error ); int libcpath_path_get_current_working_directory_by_volume( char *volume_name, size_t volume_name_length, char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); #endif /* defined( WINAPI ) */ 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 ); int libcpath_path_get_sanitized_character_size( char character, size_t *sanitized_character_size, libcerror_error_t **error ); int libcpath_path_get_sanitized_character( char character, size_t sanitized_character_size, char *sanitized_path, size_t sanitized_path_size, size_t *sanitized_path_index, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_filename( const char *filename, size_t filename_length, char **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_path( const char *path, size_t path_length, char **sanitized_path, size_t *sanitized_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 ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_CreateDirectoryA( LPCSTR path, SECURITY_ATTRIBUTES *security_attributes ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCPATH_EXTERN \ int libcpath_path_make_directory( const char *directory_name, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_SetCurrentDirectoryW( LPCWSTR path ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCPATH_EXTERN \ int libcpath_path_change_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) DWORD libcpath_GetCurrentDirectoryW( DWORD buffer_size, LPCWSTR buffer ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ 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 ); #if defined( WINAPI ) int libcpath_path_get_path_type_wide( const wchar_t *path, size_t path_length, uint8_t *path_type, libcerror_error_t **error ); int libcpath_path_get_volume_name_wide( const wchar_t *path, size_t path_length, wchar_t **volume_name, size_t *volume_name_length, size_t *directory_name_index, libcerror_error_t **error ); int libcpath_path_get_current_working_directory_by_volume_wide( wchar_t *volume_name, size_t volume_name_length, wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); #endif /* defined( WINAPI ) */ 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 ); int libcpath_path_get_sanitized_character_size_wide( wchar_t character, size_t *sanitized_character_size, libcerror_error_t **error ); int libcpath_path_get_sanitized_character_wide( wchar_t character, size_t sanitized_character_size, wchar_t *sanitized_path, size_t sanitized_path_size, size_t *sanitized_path_index, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_filename_wide( const wchar_t *filename, size_t filename_length, wchar_t **sanitized_filename, size_t *sanitized_filename_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_sanitized_path_wide( const wchar_t *path, size_t path_length, wchar_t **sanitized_path, size_t *sanitized_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 ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) BOOL libcpath_CreateDirectoryW( LPCWSTR path, SECURITY_ATTRIBUTES *security_attributes ); #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ LIBCPATH_EXTERN \ int libcpath_path_make_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCPATH_PATH_H ) */ libesedb-20240420/ChangeLog0000644000175000017500000001223614533041675016146 0ustar00lordyestalordyestaTODO * add LZXPRESSED compressed string to compression test * add leaf value (data definition) cache? * use leaf page previous/next values? * fix XOR checksum in esedb_test_checksum_calculate_little_endian_ecc32 test * libfdata next search keep going on a key match? * fix flaky test for System_Search_AutoSummary (one byte off?) * pyesedb - null value support - long value: add data size support * refactor libesedb_record_get_value_binary_data_size and libesedb_record_get_value_binary_data * complete libfdata btree refactor - libesedb_values_tree.c replace by fdata functions? - fix is_flexible_match for xp_search.edb indexes * record flags - add indication of corrupt records * format notes: - value of un-initialized page checksum: 0xdeadbeefbaadf00d "ESE Super ECCXORChecksum" * create tool to analyze cache usage, hits and misses * move read of data definition into leaf value callback - create separate callback for long values? - this will clean up data definition * refactor: - libesedb_multi_value_get_value what about value_type ? - clean up multi value calls to libfvalue - libesedb_long_value_get_segment_data * deprecate: - libesedb_record_get_value - libesedb_multi_value_get_value * complete libfvalue update integration - multi value * windows search add support for windows 8 SystemIndex_PropertyStore * libesedb check esedbtools_libX header files for _LIBESEDB_LIBX_ defs * handle compressed values inside the library - compressed binary data * esedbexport -t /root creates /root.export ? * esedbexport skip table on error * check Win2K ntds.dit support * clean up and refactor info handle * export handle: fix creation of indexes directory API: * add function to retrieve database signature - can be used to match up EDB/STM pairs * add long value functions (string and binary data?) * remove - libesedb_record_get_value - libesedb_long_value_get_segment_data - libesedb_multi_value_get_value * windows search - multi long value segment decryption/compression support * export error in more test files: nibble count value exceeds maximum * code clean up - change page value index and number of values into int - clean up TODO's - refactor info handle * combine libesedb_io_handle_read_page with libesedb_page_read - need libesedb_page_read for recovery ? * page tree on demand - check sanity of page value 0 * clean up - libesedb_data_type_definition remove offset * handle default value - need database which uses default value * parse variable types even when they are not part of the table catalog definition * add support for build in table number 1 * implement cloning of items for improved asynchronous and multi threaded usage libesedb: * add get_table_by_object_identifier function * ECC checksum - non 4 byte modulus buffer support - add alignment optimization - error correction - Windows 7 extended checksum ? * template table - what about non-tagged data types * multi value - what about multi value 0x18 * database header - compare primary and secondary * catalog - compare primary and secondary - limit the size of the catalog ? - support for type 0x0006 - support for type 0x0007 (line 3457 in libesedb_page_tree.c) * long values - support for non-linear stored long value segments - current solution does a sanity check * default values - apply to data definition Error tolerance * probe test for the page size using the backup database header * use backup catalog Debug * is function libesedb_debug_print_table_group_of_bits needed? * print value flags * print part of keys as strings Tools * esedbinfo - page summary (scan for uninitialized, empty, etc. pages) - file header summary (check backup file header) - summary of catalog (check backup catalog) - print database state * esedbexport - add export mode Windows search: * improve windows_search_decompress_byte_indexed_compressed_data File format * where is the root object defined? or is it implied to be object 1? * compressed table, column, index names ? * page flags - 0x0400, 0x0800, 0x8000 * tagged values - flag 0x4000 * multi value offsets - flag 0x8000 * page flags * page keys * (revision 0x11) extended page header * what about the first byte in 7-bit ascii compressed data * codepage 1200 string in Exchange EDB starts with 0xff 0xff * streaming file - only consists of ESEDB header with paged streamed data, how to reconstruct streams ? Deployment: * update configure - improve libfdata detection - improve libfguid detection - improve libfwnt detection * update manuals - add esedbexport.1 Performance * create data definition tree in page tree for faster lookup of keys keep list for sequential access (B+-tree) * create a UTF-8 version of run-length compressed UTF-16 string decompression function * use register alignment for key comparison * optimize libesedb_checksum_calculate_little_endian_ecc32 Test suite: * windows search: work on index-based compression - create test program to validate output Notes * create a root page table instead? - no * read catalog data type definitions and convert them into column definitions? - no 20090913 * initial version based on liblnk * see `git log' for more recent change log libesedb-20240420/manuals/0000755000175000017500000000000014610746415016030 5ustar00lordyestalordyestalibesedb-20240420/manuals/esedbinfo.10000644000175000017500000000545714610727254020063 0ustar00lordyestalordyesta.Dd April 1, 2019 .Dt esedbinfo .Os libesedb .Sh NAME .Nm esedbinfo .Nd determines information about an Extensible Storage Engine (ESE) Database File (EDB) .Sh SYNOPSIS .Nm esedbinfo .Op Fl hvV .Ar source .Sh DESCRIPTION .Nm esedbinfo is a utility to determine information about an Extensible Storage Engine (ESE) Database File (EDB) .Pp .Nm esedbinfo is part of the .Nm libesedb package. .Nm libesedb is a library to access the Extensible Storage Engine (ESE) Database File (EDB) format .Pp .Ar source is the source file. .Pp The options are as follows: .Bl -tag -width Ds .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 # esedbinfo Windows.edb esedbinfo 20110114 Extensible Storage Engine Database information: File type: Database Created in format: 0x620,12 Current format: 0x620,12 Page size: 8192 bytes Catalog content: Amount of tables: 15 Table: 1 MSysObjects (2) Amount of columns: 22 Column: 1 ObjidTable (1) Column: 2 Type (2) Column: 3 Id (3) Column: 4 ColtypOrPgnoFDP (4) Column: 5 SpaceUsage (5) Column: 6 Flags (6) Column: 7 PagesOrLocale (7) Column: 8 RootFlag (8) Column: 9 RecordOffset (9) Column: 10 LCMapFlags (10) Column: 11 KeyMost (11) Column: 12 Name (128) Column: 13 Stats (129) Column: 14 TemplateTable (130) Column: 15 DefaultValue (131) Column: 16 KeyFldIDs (132) Column: 17 VarSegMac (133) Column: 18 ConditionalColumns (134) Column: 19 TupleLimits (135) Column: 20 Version (136) Column: 21 CallbackData (256) Column: 22 CallbackDependencies (257) Amount of indexes: 3 Index: 1 Id (2) Index: 2 Name (4) Index: 3 RootObjects (5) Table: 2 MSysObjectsShadow (3) .Dl ... .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: https://github.com/libyal/libesedb/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright 2009-2013, Joachim Metz . .Sh SEE ALSO libesedb-20240420/manuals/Makefile.am0000644000175000017500000000020114610730606020050 0ustar00lordyestalordyestaman_MANS = \ esedbinfo.1 \ libesedb.3 EXTRA_DIST = \ esedbinfo.1 \ libesedb.3 DISTCLEANFILES = \ Makefile \ Makefile.in libesedb-20240420/manuals/libesedb.30000644000175000017500000004255114610727254017674 0ustar00lordyestalordyesta.Dd April 1, 2019 .Dt libesedb 3 .Os libesedb .Sh NAME .Nm libesedb.h .Nd Library to access the Extensible Storage Engine (ESE) Database File (EDB) format .Sh SYNOPSIS .In libesedb.h .Pp Support functions .Ft const char * .Fn libesedb_get_version "void" .Ft int .Fn libesedb_get_access_flags_read "void" .Ft int .Fn libesedb_get_codepage "int *codepage" "libesedb_error_t **error" .Ft int .Fn libesedb_set_codepage "int codepage" "libesedb_error_t **error" .Ft int .Fn libesedb_check_file_signature "const char *filename" "libesedb_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libesedb_check_file_signature_wide "const wchar_t *filename" "libesedb_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libesedb_check_file_signature_file_io_handle "libbfio_handle_t *bfio_handle" "libesedb_error_t **error" .Pp Notify functions .Ft void .Fn libesedb_notify_set_verbose "int verbose" .Ft int .Fn libesedb_notify_set_stream "FILE *stream" "libesedb_error_t **error" .Ft int .Fn libesedb_notify_stream_open "const char *filename" "libesedb_error_t **error" .Ft int .Fn libesedb_notify_stream_close "libesedb_error_t **error" .Pp Error functions .Ft void .Fn libesedb_error_free "libesedb_error_t **error" .Ft int .Fn libesedb_error_fprint "libesedb_error_t *error" "FILE *stream" .Ft int .Fn libesedb_error_sprint "libesedb_error_t *error" "char *string" "size_t size" .Ft int .Fn libesedb_error_backtrace_fprint "libesedb_error_t *error" "FILE *stream" .Ft int .Fn libesedb_error_backtrace_sprint "libesedb_error_t *error" "char *string" "size_t size" .Pp File functions .Ft int .Fn libesedb_file_initialize "libesedb_file_t **file" "libesedb_error_t **error" .Ft int .Fn libesedb_file_free "libesedb_file_t **file" "libesedb_error_t **error" .Ft int .Fn libesedb_file_signal_abort "libesedb_file_t *file" "libesedb_error_t **error" .Ft int .Fn libesedb_file_open "libesedb_file_t *file" "const char *filename" "int access_flags" "libesedb_error_t **error" .Ft int .Fn libesedb_file_close "libesedb_file_t *file" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_type "libesedb_file_t *file" "uint32_t *type" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_format_version "libesedb_file_t *file" "uint32_t *format_version" "uint32_t *format_revision" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_creation_format_version "libesedb_file_t *file" "uint32_t *format_version" "uint32_t *format_revision" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_page_size "libesedb_file_t *file" "uint32_t *page_size" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_number_of_tables "libesedb_file_t *file" "int *number_of_tables" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_table "libesedb_file_t *file" "int table_entry" "libesedb_table_t **table" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_table_by_utf8_name "libesedb_file_t *file" "const uint8_t *utf8_string" "size_t utf8_string_length" "libesedb_table_t **table" "libesedb_error_t **error" .Ft int .Fn libesedb_file_get_table_by_utf16_name "libesedb_file_t *file" "const uint16_t *utf16_string" "size_t utf16_string_length" "libesedb_table_t **table" "libesedb_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libesedb_file_open_wide "libesedb_file_t *file" "const wchar_t *filename" "int access_flags" "libesedb_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libesedb_file_open_file_io_handle "libesedb_file_t *file" "libbfio_handle_t *file_io_handle" "int access_flags" "libesedb_error_t **error" .Pp Table functions .Ft int .Fn libesedb_table_free "libesedb_table_t **table" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_identifier "libesedb_table_t *table" "uint32_t *identifier" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf8_name_size "libesedb_table_t *table" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf8_name "libesedb_table_t *table" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf16_name_size "libesedb_table_t *table" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf16_name "libesedb_table_t *table" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf8_template_name_size "libesedb_table_t *table" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf8_template_name "libesedb_table_t *table" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf16_template_name_size "libesedb_table_t *table" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_utf16_template_name "libesedb_table_t *table" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_number_of_columns "libesedb_table_t *table" "int *number_of_columns" "uint8_t flags" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_column "libesedb_table_t *table" "int column_entry" "libesedb_column_t **column" "uint8_t flags" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_number_of_indexes "libesedb_table_t *table" "int *number_of_indexes" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_index "libesedb_table_t *table" "int index_entry" "libesedb_index_t **index" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_number_of_records "libesedb_table_t *table" "int *number_of_records" "libesedb_error_t **error" .Ft int .Fn libesedb_table_get_record "libesedb_table_t *table" "int record_entry" "libesedb_record_t **record" "libesedb_error_t **error" .Pp Column functions .Ft int .Fn libesedb_column_free "libesedb_column_t **column" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_identifier "libesedb_column_t *column" "uint32_t *identifier" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_type "libesedb_column_t *column" "uint32_t *type" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_utf8_name_size "libesedb_column_t *column" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_utf8_name "libesedb_column_t *column" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_utf16_name_size "libesedb_column_t *column" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_column_get_utf16_name "libesedb_column_t *column" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Pp Index functions .Ft int .Fn libesedb_index_free "libesedb_index_t **index" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_identifier "libesedb_index_t *index" "uint32_t *identifier" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_utf8_name_size "libesedb_index_t *index" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_utf8_name "libesedb_index_t *index" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_utf16_name_size "libesedb_index_t *index" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_utf16_name "libesedb_index_t *index" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_number_of_records "libesedb_index_t *index" "int *number_of_records" "libesedb_error_t **error" .Ft int .Fn libesedb_index_get_record "libesedb_index_t *index" "int record_entry" "libesedb_record_t **record" "libesedb_error_t **error" .Pp Record (row) functions .Ft int .Fn libesedb_record_free "libesedb_record_t **record" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_number_of_values "libesedb_record_t *record" "int *number_of_values" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_column_identifier "libesedb_record_t *record" "int value_entry" "uint32_t *column_identifier" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_column_type "libesedb_record_t *record" "int value_entry" "uint32_t *column_type" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_utf8_column_name_size "libesedb_record_t *record" "int value_entry" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_utf8_column_name "libesedb_record_t *record" "int value_entry" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_utf16_column_name_size "libesedb_record_t *record" "int value_entry" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_utf16_column_name "libesedb_record_t *record" "int value_entry" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_data_size "libesedb_record_t *record" "int value_entry" "size_t *value_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_data "libesedb_record_t *record" "int value_entry" "uint8_t *value_data" "size_t value_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_data_flags "libesedb_record_t *record" "int value_entry" "uint8_t *value_data_flags" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_boolean "libesedb_record_t *record" "int value_entry" "uint8_t *value_boolean" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_8bit "libesedb_record_t *record" "int value_entry" "uint8_t *value_8bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_16bit "libesedb_record_t *record" "int value_entry" "uint16_t *value_16bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_32bit "libesedb_record_t *record" "int value_entry" "uint32_t *value_32bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_64bit "libesedb_record_t *record" "int value_entry" "uint64_t *value_64bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_filetime "libesedb_record_t *record" "int value_entry" "uint64_t *value_filetime" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_floating_point_32bit "libesedb_record_t *record" "int value_entry" "float *value_floating_point_32bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_floating_point_64bit "libesedb_record_t *record" "int value_entry" "double *value_floating_point_64bit" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_utf8_string_size "libesedb_record_t *record" "int value_entry" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_utf8_string "libesedb_record_t *record" "int value_entry" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_utf16_string_size "libesedb_record_t *record" "int value_entry" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_utf16_string "libesedb_record_t *record" "int value_entry" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_binary_data_size "libesedb_record_t *record" "int value_entry" "size_t *binary_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_value_binary_data "libesedb_record_t *record" "int value_entry" "uint8_t *binary_data" "size_t binary_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_record_is_long_value "libesedb_record_t *record" "int value_entry" "libesedb_error_t **error" .Ft int .Fn libesedb_record_is_multi_value "libesedb_record_t *record" "int value_entry" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_long_value "libesedb_record_t *record" "int value_entry" "libesedb_long_value_t **long_value" "libesedb_error_t **error" .Ft int .Fn libesedb_record_get_multi_value "libesedb_record_t *record" "int value_entry" "libesedb_multi_value_t **multi_value" "libesedb_error_t **error" .Pp Long value functions .Ft int .Fn libesedb_long_value_free "libesedb_long_value_t **long_value" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_data_size "libesedb_long_value_t *long_value" "size64_t *data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_data "libesedb_long_value_t *long_value" "uint8_t *data" "size_t data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_number_of_data_segments "libesedb_long_value_t *long_value" "int *number_of_data_segments" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_data_segment_size "libesedb_long_value_t *long_value" "int data_segment_index" "size_t *data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_data_segment "libesedb_long_value_t *long_value" "int data_segment_index" "uint8_t *data_segment" "size_t data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_utf8_string_size "libesedb_long_value_t *long_value" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_utf8_string "libesedb_long_value_t *long_value" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_utf16_string_size "libesedb_long_value_t *long_value" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_long_value_get_utf16_string "libesedb_long_value_t *long_value" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Pp Multi value functions .Ft int .Fn libesedb_multi_value_free "libesedb_multi_value_t **multi_value" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_column_type "libesedb_multi_value_t *multi_value" "uint32_t *column_type" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_number_of_values "libesedb_multi_value_t *multi_value" "int *number_of_values" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_data_size "libesedb_multi_value_t *multi_value" "int value_entry" "size_t *value_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_data "libesedb_multi_value_t *multi_value" "int value_entry" "uint8_t *value_data" "size_t value_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_8bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint8_t *value_8bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_16bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint16_t *value_16bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_32bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint32_t *value_32bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_64bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint64_t *value_64bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_floating_point_32bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "float *value_32bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_floating_point_64bit "libesedb_multi_value_t *multi_value" "int multi_value_index" "double *value_64bit" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_filetime "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint64_t *value_filetime" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_utf8_string_size "libesedb_multi_value_t *multi_value" "int multi_value_index" "size_t *utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_utf8_string "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint8_t *utf8_string" "size_t utf8_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_utf16_string_size "libesedb_multi_value_t *multi_value" "int multi_value_index" "size_t *utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_utf16_string "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint16_t *utf16_string" "size_t utf16_string_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_binary_data_size "libesedb_multi_value_t *multi_value" "int multi_value_index" "size_t *binary_data_size" "libesedb_error_t **error" .Ft int .Fn libesedb_multi_value_get_value_binary_data "libesedb_multi_value_t *multi_value" "int multi_value_index" "uint8_t *binary_data" "size_t binary_data_size" "libesedb_error_t **error" .Sh DESCRIPTION The .Fn libesedb_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 see "libesedb.h". .Sh ENVIRONMENT None .Sh FILES None .Sh NOTES libesedb can be compiled with wide character support (wchar_t). .sp To compile libesedb with wide character support use: .Ar ./configure --enable-wide-character-type=yes or define: .Ar _UNICODE or .Ar UNICODE during compilation. .sp .Ar LIBESEDB_WIDE_CHARACTER_TYPE in libesedb/features.h can be used to determine if libesedb was compiled with wide character support. .Sh BUGS Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libesedb/issues .Sh AUTHOR These man pages are generated from "libesedb.h". .Sh COPYRIGHT Copyright (C) 2009-2024, Joachim Metz . .sp 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 libesedb.h include file libesedb-20240420/manuals/Makefile.in0000644000175000017500000006640214610746266020111 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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 = \ esedbinfo.1 \ libesedb.3 EXTRA_DIST = \ esedbinfo.1 \ libesedb.3 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | 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,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man3: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.3[a-z]*$$/p'; \ fi; \ } | 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,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) sources-local: splint-local: tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile 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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local 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 \ cscopelist-am ctags-am 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 sources-am \ sources-local splint-am splint-local tags-am uninstall \ uninstall-am uninstall-man uninstall-man1 uninstall-man3 .PRECIOUS: 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: libesedb-20240420/tests/0000755000175000017500000000000014610746415015532 5ustar00lordyestalordyestalibesedb-20240420/tests/esedb_test_space_tree.c0000644000175000017500000000534614610727556022226 0ustar00lordyestalordyesta/* * Library space_tree type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_space_tree.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_space_tree_free function * Returns 1 if successful or 0 if not */ int esedb_test_space_tree_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_space_tree_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_space_tree_initialize */ ESEDB_TEST_RUN( "libesedb_space_tree_free", esedb_test_space_tree_free ); /* TODO: add tests for libesedb_space_tree_read_values_from_page */ /* TODO: add tests for libesedb_space_tree_read_file_io_handle */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_index.c0000644000175000017500000000602414610727556021215 0ustar00lordyestalordyesta/* * Library index type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_index.h" /* Tests the libesedb_index_free function * Returns 1 if successful or 0 if not */ int esedb_test_index_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_index_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_index_initialize */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_index_free", esedb_test_index_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_index_get_identifier */ /* TODO: add tests for libesedb_index_get_utf8_name_size */ /* TODO: add tests for libesedb_index_get_utf8_name */ /* TODO: add tests for libesedb_index_get_utf16_name_size */ /* TODO: add tests for libesedb_index_get_utf16_name */ /* TODO: add tests for libesedb_index_get_number_of_records */ /* TODO: add tests for libesedb_index_get_record */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_tools_signal.c0000644000175000017500000001011114610727254022566 0ustar00lordyestalordyesta/* * Tools signal functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_macros.h" #include "esedb_test_unused.h" #include "../esedbtools/esedbtools_signal.h" void esedb_test_tools_signal_handler_function( esedbtools_signal_t signal ESEDB_TEST_ATTRIBUTE_UNUSED ) { ESEDB_TEST_UNREFERENCED_PARAMETER( signal ) } #if defined( WINAPI ) /* Tests the esedbtools_signal_handler function * Returns 1 if successful or 0 if not */ int esedb_test_tools_signal_handler( void ) { BOOL result = 0; /* Test regular cases */ result = esedbtools_signal_handler( CTRL_C_EVENT ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, (int) TRUE ); result = esedbtools_signal_handler( CTRL_LOGOFF_EVENT ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, (int) FALSE ); return( 1 ); on_error: return( 0 ); } #if defined( _MSC_VER ) /* TODO add tests for esedbtools_signal_initialize_memory_debug */ #endif /* defined( _MSC_VER ) */ #endif /* defined( WINAPI ) */ /* Tests the esedbtools_signal_attach function * Returns 1 if successful or 0 if not */ int esedb_test_tools_signal_attach( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = esedbtools_signal_attach( esedb_test_tools_signal_handler_function, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = esedbtools_signal_attach( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the esedbtools_signal_detach function * Returns 1 if successful or 0 if not */ int esedb_test_tools_signal_detach( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = esedbtools_signal_detach( &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( WINAPI ) ESEDB_TEST_RUN( "esedbtools_signal_handler", esedb_test_tools_signal_handler ) #if defined( _MSC_VER ) /* TODO add tests for esedbtools_signal_initialize_memory_debug */ #endif /* defined( _MSC_VER ) */ #endif /* defined( WINAPI ) */ ESEDB_TEST_RUN( "esedbtools_signal_attach", esedb_test_tools_signal_attach ) ESEDB_TEST_RUN( "esedbtools_signal_detach", esedb_test_tools_signal_detach ) return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_libesedb.h0000644000175000017500000000172514610727254021662 0ustar00lordyestalordyesta/* * The libesedb header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBESEDB_H ) #define _ESEDB_TEST_LIBESEDB_H #include #include #endif /* !defined( _ESEDB_TEST_LIBESEDB_H ) */ libesedb-20240420/tests/esedb_test_data_segment.c0000644000175000017500000004250314610727556022543 0ustar00lordyestalordyesta/* * Library data_segment type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_libfcache.h" #include "esedb_test_libfdata.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_data_segment.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_data_segment_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_data_segment_initialize( void ) { libcerror_error_t *error = NULL; libesedb_data_segment_t *data_segment = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 2; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_data_segment_free( &data_segment, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_data_segment_initialize( NULL, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); data_segment = (libesedb_data_segment_t *) 0x12345678UL; result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); data_segment = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_initialize( &data_segment, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_data_segment_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_data_segment_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } return( 0 ); } /* Tests the libesedb_data_segment_free function * Returns 1 if successful or 0 if not */ int esedb_test_data_segment_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_segment_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_data_segment_get_data_size function * Returns 1 if successful or 0 if not */ int esedb_test_data_segment_get_data_size( void ) { libcerror_error_t *error = NULL; libesedb_data_segment_t *data_segment = NULL; size_t data_size = 0; int result = 0; /* Initialize test */ result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_data_segment_get_data_size( data_segment, &data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "data_size", data_size, (size_t) 4096 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_data_segment_get_data_size( NULL, &data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_get_data_size( data_segment, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_data_segment_free( &data_segment, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } return( 0 ); } /* Tests the libesedb_data_segment_get_data function * Returns 1 if successful or 0 if not */ int esedb_test_data_segment_get_data( void ) { uint8_t data[ 4096 ]; libcerror_error_t *error = NULL; libesedb_data_segment_t *data_segment = NULL; int result = 0; /* Initialize test */ result = libesedb_data_segment_initialize( &data_segment, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_data_segment_get_data( data_segment, data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_data_segment_get_data( NULL, data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_get_data( data_segment, NULL, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_get_data( data_segment, data, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_get_data( data_segment, data, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED ) /* Test libesedb_data_segment_get_data with memcpy failing */ esedb_test_memcpy_attempts_before_fail = 0; result = libesedb_data_segment_get_data( data_segment, data, 4096, &error ); if( esedb_test_memcpy_attempts_before_fail != -1 ) { esedb_test_memcpy_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) && defined( OPTIMIZATION_DISABLED ) */ /* Clean up */ result = libesedb_data_segment_free( &data_segment, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_segment", data_segment ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( data_segment != NULL ) { libesedb_data_segment_free( &data_segment, NULL ); } return( 0 ); } /* Tests the libesedb_data_segment_read_element_data function * Returns 1 if successful or 0 if not */ int esedb_test_data_segment_read_element_data( void ) { uint8_t data[ 4096 ]; libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libfcache_cache_t *cache = NULL; libfdata_list_t *list = NULL; libfdata_list_element_t *list_element = NULL; int result = 0; /* Initialize test */ result = libfdata_list_initialize( &list, NULL, NULL, NULL, NULL, NULL, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "list", list ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libfdata_list_element_initialize( &list_element, list, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "list_element", list_element ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libfcache_cache_initialize( &cache, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "cache", cache ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize file IO handle */ result = esedb_test_open_file_io_handle( &file_io_handle, data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_data_segment_read_element_data( NULL, file_io_handle, list_element, (libfdata_cache_t *) cache, 0, 0, 4096, 0, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_data_segment_read_element_data( NULL, file_io_handle, list_element, (libfdata_cache_t *) cache, 0, 0, (size64_t) SSIZE_MAX + 1, 0, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_read_element_data( NULL, NULL, list_element, (libfdata_cache_t *) cache, 0, 0, 4096, 0, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_data_segment_read_element_data( NULL, file_io_handle, NULL, (libfdata_cache_t *) cache, 0, 0, 4096, 0, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test libesedb_data_segment_initialize with malloc failing in libesedb_data_segment_initialize */ esedb_test_malloc_attempts_before_fail = 0; result = libesedb_data_segment_read_element_data( NULL, file_io_handle, list_element, (libfdata_cache_t *) cache, 0, 0, 4096, 0, 0, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* TODO test with libbfio_handle_read_buffer failing */ /* Clean up file IO handle */ result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libfcache_cache_free( &cache, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "cache", cache ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libfdata_list_element_free( &list_element, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "list_element", list_element ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libfdata_list_free( &list, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "list", list ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } if( cache != NULL ) { libfcache_cache_free( &cache, NULL ); } if( list_element != NULL ) { libfdata_list_element_free( &list_element, NULL ); } if( list != NULL ) { libfdata_list_free( &list, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_data_segment_initialize", esedb_test_data_segment_initialize ); ESEDB_TEST_RUN( "libesedb_data_segment_free", esedb_test_data_segment_free ); ESEDB_TEST_RUN( "libesedb_data_segment_get_data_size", esedb_test_data_segment_get_data_size ); ESEDB_TEST_RUN( "libesedb_data_segment_get_data", esedb_test_data_segment_get_data ); ESEDB_TEST_RUN( "libesedb_data_segment_read_element_data", esedb_test_data_segment_read_element_data ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_libcerror.h0000644000175000017500000000264414610727254022075 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBCERROR_H ) #define _ESEDB_TEST_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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _ESEDB_TEST_LIBCERROR_H ) */ libesedb-20240420/tests/esedb_test_libuna.h0000644000175000017500000000331614610727254021361 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBUNA_H ) #define _ESEDB_TEST_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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _ESEDB_TEST_LIBUNA_H ) */ libesedb-20240420/tests/esedb_test_tools_windows_search_compression.c0000644000175000017500000005036014610727254026763 0ustar00lordyestalordyesta/* * Windows search compression functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../esedbtools/windows_search_compression.h" uint8_t esedb_test_tools_windows_search_utf16_run_length_compressed_data[ 725 ] = { 0xff, 0x00, 0x23, 0x4d, 0x33, 0x55, 0x0d, 0x0a, 0x28, 0x30, 0x31, 0x29, 0x20, 0x5b, 0x42, 0x4b, 0x61, 0x6d, 0x75, 0x69, 0x5d, 0x20, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x32, 0x29, 0x20, 0x5b, 0x4c, 0x69, 0x73, 0x61, 0x20, 0x4c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x5d, 0x20, 0x4d, 0x61, 0x78, 0x77, 0x65, 0x6c, 0x6c, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x33, 0x29, 0x20, 0x5b, 0x45, 0x76, 0x61, 0x6e, 0x74, 0x69, 0x5d, 0x20, 0x57, 0x68, 0x61, 0x74, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x53, 0x65, 0x65, 0x20, 0x49, 0x73, 0x20, 0x57, 0x68, 0x61, 0x74, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x57, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x34, 0x29, 0x20, 0x5b, 0x4c, 0x75, 0x6e, 0x61, 0x5d, 0x20, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x35, 0x29, 0x20, 0x5b, 0x52, 0x75, 0x74, 0x68, 0x6c, 0x65, 0x73, 0x73, 0x5d, 0x20, 0x47, 0x65, 0x72, 0x73, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x36, 0x29, 0x20, 0x5b, 0x53, 0x61, 0x6d, 0x75, 0x61, 0x6c, 0x20, 0x53, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x5d, 0x20, 0x41, 0x78, 0x69, 0x73, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x37, 0x29, 0x20, 0x5b, 0x42, 0x65, 0x61, 0x74, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x5d, 0x20, 0x4e, 0x65, 0x61, 0x72, 0x20, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x38, 0x29, 0x20, 0x5b, 0x44, 0x61, 0x69, 0x68, 0x00, 0x6c, 0x75, 0x63, 0x69, 0x61, 0x5d, 0x20, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x20, 0x4f, 0x76, 0x65, 0x72, 0x20, 0x4d, 0x69, 0x6e, 0x64, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x30, 0x39, 0x29, 0x20, 0x5b, 0x41, 0x2d, 0x4c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x65, 0x74, 0x73, 0x20, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x20, 0x44, 0x4a, 0x5d, 0x20, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x73, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x30, 0x29, 0x20, 0x5b, 0x54, 0x61, 0x74, 0x61, 0x6e, 0x6b, 0x61, 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5d, 0x20, 0x44, 0x4a, 0x01, 0x20, 0x19, 0xff, 0x00, 0x73, 0x20, 0x4c, 0x69, 0x66, 0x65, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x31, 0x29, 0x20, 0x5b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x31, 0x5d, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x32, 0x29, 0x20, 0x5b, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x62, 0x6f, 0x79, 0x5d, 0x20, 0x50, 0x75, 0x74, 0x20, 0x53, 0x6f, 0x6d, 0x65, 0x20, 0x47, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x33, 0x29, 0x20, 0x5b, 0x4e, 0x61, 0x6b, 0x65, 0x64, 0x20, 0x53, 0x74, 0x65, 0x65, 0x6c, 0x5d, 0x20, 0x56, 0x69, 0x76, 0x65, 0x20, 0x4c, 0x61, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x34, 0x29, 0x20, 0x5b, 0x43, 0x68, 0x61, 0x72, 0x6c, 0x79, 0x20, 0x4c, 0x6f, 0x77, 0x6e, 0x6f, 0x69, 0x73, 0x65, 0x20, 0x26, 0x20, 0x4d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x20, 0x54, 0x68, 0x65, 0x6f, 0x5d, 0x20, 0x57, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x66, 0x75, 0x6c, 0x20, 0x44, 0x61, 0x79, 0x73, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x35, 0x29, 0x20, 0x5b, 0x54, 0x6f, 0x6d, 0x6d, 0x79, 0x6b, 0x6e, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x5d, 0x20, 0x43, 0x72, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x36, 0x29, 0x20, 0x5b, 0x45, 0x76, 0x69, 0x6c, 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x74, 0x65, 0x73, 0x20, 0x26, 0x20, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x20, 0x46, 0x65, 0x61, 0x74, 0x2e, 0x20, 0x4d, 0x43, 0x20, 0x41, 0x6c, 0x65, 0x65, 0x5d, 0x20, 0x49, 0x6e, 0x31, 0x00, 0x76, 0x69, 0x6e, 0x63, 0x69, 0x62, 0x6c, 0x65, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x37, 0x29, 0x20, 0x5b, 0x54, 0x68, 0x65, 0x20, 0x4f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x41, 0x6e, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x5d, 0x20, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x01, 0x20, 0x19, 0x2e, 0x00, 0x73, 0x20, 0x43, 0x61, 0x6c, 0x6c, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a, 0x28, 0x31, 0x38, 0x29, 0x20, 0x5b, 0x45, 0x6e, 0x7a, 0x79, 0x6d, 0x65, 0x20, 0x58, 0x5d, 0x20, 0x53, 0x69, 0x6c, 0x6c, 0x79, 0x20, 0x4d, 0x69, 0x64, 0x20, 0x4f, 0x6e, 0x2e, 0x6d, 0x70, 0x33, 0x0d, 0x0a }; uint8_t esedb_test_tools_windows_search_utf16_run_length_uncompressed_data[ 1422 ] = { 0x23, 0x00, 0x4d, 0x00, 0x33, 0x00, 0x55, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x31, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x75, 0x00, 0x69, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x45, 0x00, 0x78, 0x00, 0x63, 0x00, 0x65, 0x00, 0x65, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x32, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x61, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x61, 0x00, 0x73, 0x00, 0x68, 0x00, 0x65, 0x00, 0x73, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x61, 0x00, 0x78, 0x00, 0x77, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x33, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x45, 0x00, 0x76, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x57, 0x00, 0x68, 0x00, 0x61, 0x00, 0x74, 0x00, 0x20, 0x00, 0x59, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x65, 0x00, 0x20, 0x00, 0x49, 0x00, 0x73, 0x00, 0x20, 0x00, 0x57, 0x00, 0x68, 0x00, 0x61, 0x00, 0x74, 0x00, 0x20, 0x00, 0x59, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x20, 0x00, 0x57, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x34, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x4c, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x55, 0x00, 0x6e, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x35, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x52, 0x00, 0x75, 0x00, 0x74, 0x00, 0x68, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x47, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x36, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x75, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x41, 0x00, 0x78, 0x00, 0x69, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x37, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x42, 0x00, 0x65, 0x00, 0x61, 0x00, 0x74, 0x00, 0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x4e, 0x00, 0x65, 0x00, 0x61, 0x00, 0x72, 0x00, 0x20, 0x00, 0x44, 0x00, 0x65, 0x00, 0x61, 0x00, 0x74, 0x00, 0x68, 0x00, 0x20, 0x00, 0x45, 0x00, 0x78, 0x00, 0x70, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x44, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x69, 0x00, 0x61, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x75, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00, 0x20, 0x00, 0x4f, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x30, 0x00, 0x39, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x41, 0x00, 0x2d, 0x00, 0x4c, 0x00, 0x75, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x65, 0x00, 0x74, 0x00, 0x73, 0x00, 0x20, 0x00, 0x53, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x20, 0x00, 0x44, 0x00, 0x4a, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x42, 0x00, 0x65, 0x00, 0x74, 0x00, 0x77, 0x00, 0x65, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x30, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x6b, 0x00, 0x61, 0x00, 0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6a, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x44, 0x00, 0x4a, 0x00, 0x19, 0x20, 0x73, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x66, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x31, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6a, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x20, 0x00, 0x31, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x4e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x32, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x79, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x50, 0x00, 0x75, 0x00, 0x74, 0x00, 0x20, 0x00, 0x53, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x20, 0x00, 0x47, 0x00, 0x72, 0x00, 0x61, 0x00, 0x63, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x33, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x4e, 0x00, 0x61, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x65, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x56, 0x00, 0x69, 0x00, 0x76, 0x00, 0x65, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x61, 0x00, 0x20, 0x00, 0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x34, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x43, 0x00, 0x68, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x79, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x69, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x26, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6f, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x44, 0x00, 0x61, 0x00, 0x79, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x35, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x6b, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x72, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x43, 0x00, 0x72, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x36, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x45, 0x00, 0x76, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x69, 0x00, 0x74, 0x00, 0x69, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x20, 0x00, 0x26, 0x00, 0x20, 0x00, 0x50, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x69, 0x00, 0x63, 0x00, 0x20, 0x00, 0x46, 0x00, 0x65, 0x00, 0x61, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x43, 0x00, 0x20, 0x00, 0x41, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x65, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x76, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x69, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x37, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x20, 0x00, 0x4f, 0x00, 0x75, 0x00, 0x74, 0x00, 0x73, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x41, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x79, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00, 0x19, 0x20, 0x73, 0x00, 0x20, 0x00, 0x43, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x31, 0x00, 0x38, 0x00, 0x29, 0x00, 0x20, 0x00, 0x5b, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x20, 0x00, 0x58, 0x00, 0x5d, 0x00, 0x20, 0x00, 0x53, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x79, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x64, 0x00, 0x20, 0x00, 0x4f, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x33, 0x00, 0x0d, 0x00, 0x0a, 0x00 }; /* Tests the windows_search_utf16_run_length_compression_get_size function * Returns 1 if successful or 0 if not */ int esedb_test_tools_windows_search_utf16_run_length_compression_get_size( void ) { libcerror_error_t *error = NULL; size_t uncompressed_data_size = 0; int result = 0; /* Test regular cases */ result = windows_search_utf16_run_length_compression_get_size( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "uncompressed_data_size", uncompressed_data_size, (size_t) 1422 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = windows_search_utf16_run_length_compression_get_size( NULL, 725, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_get_size( esedb_test_tools_windows_search_utf16_run_length_compressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_get_size( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 0, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_get_size( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the windows_search_utf16_run_length_compression_decompress function * Returns 1 if successful or 0 if not */ int esedb_test_tools_windows_search_utf16_run_length_compression_decompress( void ) { uint8_t uncompressed_data[ 2048 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, uncompressed_data, 1422, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( uncompressed_data, esedb_test_tools_windows_search_utf16_run_length_uncompressed_data, 1422 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = windows_search_utf16_run_length_compression_decompress( NULL, 725, uncompressed_data, 1422, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, (size_t) SSIZE_MAX + 1, uncompressed_data, 1422, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 0, uncompressed_data, 1422, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, NULL, 1422, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, uncompressed_data, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = windows_search_utf16_run_length_compression_decompress( esedb_test_tools_windows_search_utf16_run_length_compressed_data, 725, uncompressed_data, 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) ESEDB_TEST_RUN( "windows_search_utf16_run_length_compression_get_size", esedb_test_tools_windows_search_utf16_run_length_compression_get_size ); ESEDB_TEST_RUN( "windows_search_utf16_run_length_compression_decompress", esedb_test_tools_windows_search_utf16_run_length_compression_decompress ); return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_functions.c0000644000175000017500000003171314610727254022114 0ustar00lordyestalordyesta/* * Functions for testing * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libclocale.h" #include "esedb_test_libuna.h" /* Retrieves source as a narrow string * Returns 1 if successful or -1 on error */ int esedb_test_get_narrow_source( const system_character_t *source, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ) { static char *function = "esedb_test_get_narrow_source"; size_t narrow_source_size = 0; size_t source_length = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( source == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source.", function ); return( -1 ); } if( narrow_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid narrow string.", function ); return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow string size value exceeds maximum.", function ); return( -1 ); } source_length = system_string_length( source ); if( source_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid source length value out of bounds.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) source, source_length + 1, &narrow_source_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) source, source_length + 1, &narrow_source_size, error ); #endif } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) source, source_length + 1, libclocale_codepage, &narrow_source_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) source, source_length + 1, libclocale_codepage, &narrow_source_size, error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow string size.", function ); return( -1 ); } #else narrow_source_size = source_length + 1; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ if( narrow_string_size < narrow_source_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: narrow string too small.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf32_character_t *) source, source_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_string, narrow_string_size, (libuna_utf16_character_t *) source, source_length + 1, error ); #endif } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf32_character_t *) source, source_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_string, narrow_string_size, libclocale_codepage, (libuna_utf16_character_t *) source, source_length + 1, error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow string.", function ); return( -1 ); } #else if( system_string_copy( narrow_string, source, source_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set narrow string.", function ); return( -1 ); } narrow_string[ source_length ] = 0; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Retrieves source as a wide string * Returns 1 if successful or -1 on error */ int esedb_test_get_wide_source( const system_character_t *source, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ) { static char *function = "esedb_test_get_wide_source"; size_t wide_source_size = 0; size_t source_length = 0; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( source == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source.", function ); return( -1 ); } if( wide_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid wide string.", function ); return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid wide string size value exceeds maximum.", function ); return( -1 ); } source_length = system_string_length( source ); if( source_length > (size_t) ( SSIZE_MAX - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid source length value out of bounds.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) wide_source_size = source_length + 1; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) source, source_length + 1, &wide_source_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) source, source_length + 1, &wide_source_size, error ); #endif } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) source, source_length + 1, libclocale_codepage, &wide_source_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) source, source_length + 1, libclocale_codepage, &wide_source_size, error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide string size.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ if( wide_string_size < wide_source_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: wide string too small.", function ); return( -1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_string_copy( wide_string, source, source_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set wide string.", function ); return( -1 ); } wide_string[ source_length ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) wide_string, wide_string_size, (uint8_t *) source, source_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) wide_string, wide_string_size, (uint8_t *) source, source_length + 1, error ); #endif } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) wide_string, wide_string_size, (uint8_t *) source, source_length + 1, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) wide_string, wide_string_size, (uint8_t *) source, source_length + 1, libclocale_codepage, error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set wide string.", function ); return( -1 ); } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Creates a file IO handle for test data * Returns 1 if successful or -1 on error */ int esedb_test_open_file_io_handle( libbfio_handle_t **file_io_handle, uint8_t *data, size_t data_size, libcerror_error_t **error ) { static char *function = "esedb_test_open_file_io_handle"; 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_memory_range_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_memory_range_set( *file_io_handle, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set memory range of file IO handle.", function ); goto on_error; } 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 IO handle.", function ); goto on_error; } return( 1 ); on_error: if( *file_io_handle != NULL ) { libbfio_handle_free( file_io_handle, NULL ); } return( -1 ); } /* Closes a file IO handle for test data * Returns 0 if successful or -1 on error */ int esedb_test_close_file_io_handle( libbfio_handle_t **file_io_handle, libcerror_error_t **error ) { static char *function = "esedb_test_close_file_io_handle"; 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( 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 IO handle.", function ); result = -1; } if( libbfio_handle_free( 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; } return( result ); } libesedb-20240420/tests/esedb_test_table.c0000644000175000017500000000702514610727556021177 0ustar00lordyestalordyesta/* * Library table type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_table.h" /* Tests the libesedb_table_free function * Returns 1 if successful or 0 if not */ int esedb_test_table_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_table_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_table_initialize */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_table_free", esedb_test_table_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_table_get_identifier */ /* TODO: add tests for libesedb_table_get_utf8_name_size */ /* TODO: add tests for libesedb_table_get_utf8_name */ /* TODO: add tests for libesedb_table_get_utf16_name_size */ /* TODO: add tests for libesedb_table_get_utf16_name */ /* TODO: add tests for libesedb_table_get_utf8_template_name_size */ /* TODO: add tests for libesedb_table_get_utf8_template_name */ /* TODO: add tests for libesedb_table_get_utf16_template_name_size */ /* TODO: add tests for libesedb_table_get_utf16_template_name */ /* TODO: add tests for libesedb_table_get_number_of_columns */ /* TODO: add tests for libesedb_table_get_column */ /* TODO: add tests for libesedb_table_get_number_of_indexes */ /* TODO: add tests for libesedb_table_get_index */ /* TODO: add tests for libesedb_table_get_number_of_records */ /* TODO: add tests for libesedb_table_get_record */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_compression.c0000644000175000017500000007004414610727253022444 0ustar00lordyestalordyesta/* * Library compression functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_compression.h" uint8_t esedb_test_compression_7bit_compressed_data[ 50 ] = { 0x10, 0xd2, 0xa2, 0x0e, 0x04, 0x42, 0xbd, 0x82, 0xf2, 0x31, 0x3a, 0x5d, 0x36, 0xb7, 0xc3, 0x70, 0x78, 0xd9, 0xfd, 0xb2, 0x96, 0xe5, 0xf7, 0xb4, 0x9a, 0x5c, 0x96, 0x93, 0xcb, 0xa0, 0x34, 0xbd, 0xdc, 0x9e, 0xbf, 0xac, 0x65, 0xb9, 0xfe, 0xed, 0x26, 0x97, 0xdd, 0xa0, 0x34, 0xbd, 0xdc, 0x9e, 0xa7, 0x00 }; uint8_t esedb_test_compression_7bit_uncompressed_data[ 56 ] = { 0x52, 0x45, 0x3a, 0x20, 0x20, 0x28, 0x2f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x65, 0x66, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x2f, 0x56, 0x65, 0x72, 0x77, 0x69, 0x6a, 0x64, 0x65, 0x72, 0x64, 0x65, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x56, 0x65, 0x72, 0x7a, 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x29, 0x00 }; uint8_t esedb_test_compression_7bit_uncompressed_utf8_string[ 56 ] = { 0x52, 0x45, 0x3a, 0x20, 0x20, 0x28, 0x2f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x65, 0x66, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x2f, 0x56, 0x65, 0x72, 0x77, 0x69, 0x6a, 0x64, 0x65, 0x72, 0x64, 0x65, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x56, 0x65, 0x72, 0x7a, 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x29, 0x00 }; uint16_t esedb_test_compression_7bit_uncompressed_utf16_string[ 56 ] = { 0x52, 0x45, 0x3a, 0x20, 0x20, 0x28, 0x2f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x65, 0x66, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x2f, 0x56, 0x65, 0x72, 0x77, 0x69, 0x6a, 0x64, 0x65, 0x72, 0x64, 0x65, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x56, 0x65, 0x72, 0x7a, 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x29, 0x00 }; /* The sequence: abcdefghijklmnopqrstuvwxyz compressed in LZXpress * including leading byte 0x18 and uncompressed data size 0x001a */ uint8_t esedb_test_compression_lzxpress_compressed_data[ 33 ] = { 0x18, 0x1a, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_compression_7bit_decompress_get_size function * Returns 1 if successful or 0 if not */ int esedb_test_compression_7bit_decompress_get_size( void ) { libcerror_error_t *error = NULL; size_t uncompressed_data_size = 0; int result = 0; /* Test regular cases */ result = libesedb_compression_7bit_decompress_get_size( esedb_test_compression_7bit_compressed_data, 50, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "uncompressed_data_size", uncompressed_data_size, (size_t) 56 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_compression_7bit_decompress_get_size( NULL, 50, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress_get_size( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress_get_size( esedb_test_compression_7bit_compressed_data, 0, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress_get_size( esedb_test_compression_7bit_compressed_data, 50, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, 33, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_7bit_decompress function * Returns 1 if successful or 0 if not */ int esedb_test_compression_7bit_decompress( void ) { uint8_t uncompressed_data[ 64 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, 50, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( uncompressed_data, esedb_test_compression_7bit_uncompressed_data, 56 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_compression_7bit_decompress( NULL, 50, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, 0, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, 50, NULL, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, 50, uncompressed_data, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_7bit_compressed_data, 50, uncompressed_data, 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_7bit_decompress( esedb_test_compression_lzxpress_compressed_data, 33, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_lzxpress_decompress_get_size function * Returns 1 if successful or 0 if not */ int esedb_test_compression_lzxpress_decompress_get_size( void ) { libcerror_error_t *error = NULL; size_t uncompressed_data_size = 0; int result = 0; /* Test regular cases */ result = libesedb_compression_lzxpress_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, 33, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "uncompressed_data_size", uncompressed_data_size, (size_t) 26 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_compression_lzxpress_decompress_get_size( NULL, 33, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_lzxpress_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_lzxpress_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, 0, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_lzxpress_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, 33, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_lzxpress_decompress_get_size( esedb_test_compression_7bit_compressed_data, 50, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_lzxpress_decompress function * Returns 1 if successful or 0 if not */ int esedb_test_compression_lzxpress_decompress( void ) { uint8_t uncompressed_data[ 64 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_compression_lzxpress_decompress( esedb_test_compression_lzxpress_compressed_data, 33, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( uncompressed_data, (uint8_t *) "abcdefghijklmnopqrstuvwxyz", 26 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_compression_lzxpress_decompress( NULL, 33, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_decompress_get_size function * Returns 1 if successful or 0 if not */ int esedb_test_compression_decompress_get_size( void ) { libcerror_error_t *error = NULL; size_t uncompressed_data_size = 0; int result = 0; /* Test regular cases */ result = libesedb_compression_decompress_get_size( esedb_test_compression_7bit_compressed_data, 50, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "uncompressed_data_size", uncompressed_data_size, (size_t) 56 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_compression_decompress_get_size( esedb_test_compression_lzxpress_compressed_data, 33, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "uncompressed_data_size", uncompressed_data_size, (size_t) 26 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_compression_decompress_get_size( NULL, 50, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress_get_size( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress_get_size( esedb_test_compression_7bit_compressed_data, 0, &uncompressed_data_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress_get_size( esedb_test_compression_7bit_compressed_data, 50, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_decompress function * Returns 1 if successful or 0 if not */ int esedb_test_compression_decompress( void ) { uint8_t uncompressed_data[ 64 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_compression_decompress( esedb_test_compression_7bit_compressed_data, 50, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( uncompressed_data, esedb_test_compression_7bit_uncompressed_data, 56 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); result = libesedb_compression_decompress( esedb_test_compression_lzxpress_compressed_data, 33, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( uncompressed_data, (uint8_t *) "abcdefghijklmnopqrstuvwxyz", 26 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_compression_decompress( NULL, 50, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress( esedb_test_compression_7bit_compressed_data, 0, uncompressed_data, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_decompress( esedb_test_compression_7bit_compressed_data, 50, NULL, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_get_utf8_string_size function * Returns 1 if successful or 0 if not */ int esedb_test_compression_get_utf8_string_size( void ) { libcerror_error_t *error = NULL; size_t utf8_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_compression_get_utf8_string_size( esedb_test_compression_7bit_compressed_data, 50, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf8_string_size", utf8_string_size, (size_t) 56 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* TODO add test with LZXPRESS compressed string */ /* Test error cases */ result = libesedb_compression_get_utf8_string_size( NULL, 50, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf8_string_size( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf8_string_size( esedb_test_compression_7bit_compressed_data, 0, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf8_string_size( esedb_test_compression_7bit_compressed_data, 50, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_copy_to_utf8_string function * Returns 1 if successful or 0 if not */ int esedb_test_compression_copy_to_utf8_string( void ) { uint8_t utf8_string[ 64 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_compression_copy_to_utf8_string( esedb_test_compression_7bit_compressed_data, 50, utf8_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf8_string, esedb_test_compression_7bit_uncompressed_utf8_string, sizeof( uint8_t ) * 56 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* TODO add test with LZXPRESS compressed string */ /* Test error cases */ result = libesedb_compression_copy_to_utf8_string( NULL, 50, utf8_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf8_string( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, utf8_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf8_string( esedb_test_compression_7bit_compressed_data, 0, utf8_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf8_string( esedb_test_compression_7bit_compressed_data, 50, NULL, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_get_utf16_string_size function * Returns 1 if successful or 0 if not */ int esedb_test_compression_get_utf16_string_size( void ) { libcerror_error_t *error = NULL; size_t utf16_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_compression_get_utf16_string_size( esedb_test_compression_7bit_compressed_data, 50, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf16_string_size", utf16_string_size, (size_t) 56 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* TODO add test with LZXPRESS compressed string */ /* Test error cases */ result = libesedb_compression_get_utf16_string_size( NULL, 50, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf16_string_size( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf16_string_size( esedb_test_compression_7bit_compressed_data, 0, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_get_utf16_string_size( esedb_test_compression_7bit_compressed_data, 50, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_compression_copy_to_utf16_string function * Returns 1 if successful or 0 if not */ int esedb_test_compression_copy_to_utf16_string( void ) { uint16_t utf16_string[ 64 ]; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_compression_copy_to_utf16_string( esedb_test_compression_7bit_compressed_data, 50, utf16_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf16_string, esedb_test_compression_7bit_uncompressed_utf16_string, sizeof( uint16_t ) * 56 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* TODO add test with LZXPRESS compressed string */ /* Test error cases */ result = libesedb_compression_copy_to_utf16_string( NULL, 50, utf16_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf16_string( esedb_test_compression_7bit_compressed_data, (size_t) SSIZE_MAX + 1, utf16_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf16_string( esedb_test_compression_7bit_compressed_data, 0, utf16_string, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_compression_copy_to_utf16_string( esedb_test_compression_7bit_compressed_data, 50, NULL, 64, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_compression_7bit_decompress_get_size", esedb_test_compression_7bit_decompress_get_size ); ESEDB_TEST_RUN( "libesedb_compression_7bit_decompress", esedb_test_compression_7bit_decompress ); ESEDB_TEST_RUN( "libesedb_compression_lzxpress_decompress_get_size", esedb_test_compression_lzxpress_decompress_get_size ); ESEDB_TEST_RUN( "libesedb_compression_lzxpress_decompress", esedb_test_compression_lzxpress_decompress ); ESEDB_TEST_RUN( "libesedb_compression_decompress_get_size", esedb_test_compression_decompress_get_size ); ESEDB_TEST_RUN( "libesedb_compression_decompress", esedb_test_compression_decompress ); ESEDB_TEST_RUN( "libesedb_compression_get_utf8_string_size", esedb_test_compression_get_utf8_string_size ); ESEDB_TEST_RUN( "libesedb_compression_copy_to_utf8_string", esedb_test_compression_copy_to_utf8_string ); ESEDB_TEST_RUN( "libesedb_compression_get_utf16_string_size", esedb_test_compression_get_utf16_string_size ); ESEDB_TEST_RUN( "libesedb_compression_copy_to_utf16_string", esedb_test_compression_copy_to_utf16_string ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_file.c0000644000175000017500000007105514610727254021026 0ustar00lordyestalordyesta/* * Library file type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_getopt.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "../libesedb/libesedb_file.h" #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4 #error Unsupported size of wchar_t #endif /* Define to make esedb_test_file generate verbose output #define ESEDB_TEST_FILE_VERBOSE */ #if !defined( LIBESEDB_HAVE_BFIO ) LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ /* Creates and opens a source file * Returns 1 if successful or -1 on error */ int esedb_test_file_open_source( libesedb_file_t **file, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "esedb_test_file_open_source"; 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 ); } 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( libesedb_file_initialize( file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize file.", function ); goto on_error; } result = libesedb_file_open_file_io_handle( *file, file_io_handle, LIBESEDB_OPEN_READ, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } return( 1 ); on_error: if( *file != NULL ) { libesedb_file_free( file, NULL ); } return( -1 ); } /* Closes and frees a source file * Returns 1 if successful or -1 on error */ int esedb_test_file_close_source( libesedb_file_t **file, libcerror_error_t **error ) { static char *function = "esedb_test_file_close_source"; 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 ); } if( libesedb_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; } if( libesedb_file_free( file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file.", function ); result = -1; } return( result ); } /* Tests the libesedb_file_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_file_initialize( void ) { libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_file_initialize( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_free( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); file = (libesedb_file_t *) 0x12345678UL; result = libesedb_file_initialize( &file, &error ); file = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_file_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_file_initialize( &file, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( file != NULL ) { libesedb_file_free( &file, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_file_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_file_initialize( &file, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( file != NULL ) { libesedb_file_free( &file, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } return( 0 ); } /* Tests the libesedb_file_free function * Returns 1 if successful or 0 if not */ int esedb_test_file_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_file_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_open function * Returns 1 if successful or 0 if not */ int esedb_test_file_open( const system_character_t *source ) { char narrow_source[ 256 ]; libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; int result = 0; /* Initialize test */ result = esedb_test_get_narrow_source( source, narrow_source, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_initialize( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test open */ result = libesedb_file_open( file, narrow_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_open( NULL, narrow_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open( file, NULL, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open( file, narrow_source, -1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test open when already opened */ result = libesedb_file_open( file, narrow_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_file_free( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } return( 0 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Tests the libesedb_file_open_wide function * Returns 1 if successful or 0 if not */ int esedb_test_file_open_wide( const system_character_t *source ) { wchar_t wide_source[ 256 ]; libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; int result = 0; /* Initialize test */ result = esedb_test_get_wide_source( source, wide_source, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_initialize( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test open */ result = libesedb_file_open_wide( file, wide_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_open_wide( NULL, wide_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open_wide( file, NULL, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open_wide( file, wide_source, -1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test open when already opened */ result = libesedb_file_open_wide( file, wide_source, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_file_free( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } return( 0 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Tests the libesedb_file_open_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_file_open_file_io_handle( const system_character_t *source ) { libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; size_t string_length = 0; int result = 0; /* Initialize test */ result = libbfio_file_initialize( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); string_length = system_string_length( source ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libbfio_file_set_name_wide( file_io_handle, source, string_length, &error ); #else result = libbfio_file_set_name( file_io_handle, source, string_length, &error ); #endif ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_initialize( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test open */ result = libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_open_file_io_handle( NULL, file_io_handle, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open_file_io_handle( file, NULL, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_open_file_io_handle( file, file_io_handle, -1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test open when already opened */ result = libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_file_free( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_free( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_file_close function * Returns 1 if successful or 0 if not */ int esedb_test_file_close( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_file_close( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_open and libesedb_file_close functions * Returns 1 if successful or 0 if not */ int esedb_test_file_open_close( const system_character_t *source ) { libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; int result = 0; /* Initialize test */ result = libesedb_file_initialize( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test open and close */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_file_open_wide( file, source, LIBESEDB_OPEN_READ, &error ); #else result = libesedb_file_open( file, source, LIBESEDB_OPEN_READ, &error ); #endif ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_close( file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test open and close a second time to validate clean up on close */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libesedb_file_open_wide( file, source, LIBESEDB_OPEN_READ, &error ); #else result = libesedb_file_open( file, source, LIBESEDB_OPEN_READ, &error ); #endif ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_close( file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libesedb_file_free( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } return( 0 ); } /* Tests the libesedb_file_signal_abort function * Returns 1 if successful or 0 if not */ int esedb_test_file_signal_abort( libesedb_file_t *file ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_file_signal_abort( file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_signal_abort( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_get_type function * Returns 1 if successful or 0 if not */ int esedb_test_file_get_type( libesedb_file_t *file ) { libcerror_error_t *error = NULL; uint32_t type = 0; int result = 0; /* Test regular cases */ result = libesedb_file_get_type( file, &type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_get_type( NULL, &type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_get_type( file, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_get_page_size function * Returns 1 if successful or 0 if not */ int esedb_test_file_get_page_size( libesedb_file_t *file ) { libcerror_error_t *error = NULL; uint32_t page_size = 0; int result = 0; /* Test regular cases */ result = libesedb_file_get_page_size( file, &page_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_get_page_size( NULL, &page_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_get_page_size( file, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_get_number_of_tables function * Returns 1 if successful or 0 if not */ int esedb_test_file_get_number_of_tables( libesedb_file_t *file ) { libcerror_error_t *error = NULL; int number_of_tables = 0; int result = 0; /* Test regular cases */ result = libesedb_file_get_number_of_tables( file, &number_of_tables, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_get_number_of_tables( NULL, &number_of_tables, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_get_number_of_tables( file, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libesedb_file_t *file = NULL; system_character_t *source = NULL; system_integer_t option = 0; size_t string_length = 0; int result = 0; while( ( option = esedb_test_getopt( argc, argv, _SYSTEM_STRING( "" ) ) ) != (system_integer_t) -1 ) { switch( option ) { case (system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_SYSTEM ".\n", argv[ optind - 1 ] ); return( EXIT_FAILURE ); } } if( optind < argc ) { source = argv[ optind ]; } #if defined( HAVE_DEBUG_OUTPUT ) && defined( ESEDB_TEST_FILE_VERBOSE ) libesedb_notify_set_verbose( 1 ); libesedb_notify_set_stream( stderr, NULL ); #endif ESEDB_TEST_RUN( "libesedb_file_initialize", esedb_test_file_initialize ); ESEDB_TEST_RUN( "libesedb_file_free", esedb_test_file_free ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) if( source != NULL ) { result = libbfio_file_initialize( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); string_length = system_string_length( source ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libbfio_file_set_name_wide( file_io_handle, source, string_length, &error ); #else result = libbfio_file_set_name( file_io_handle, source, string_length, &error ); #endif ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_check_file_signature_file_io_handle( file_io_handle, &error ); ESEDB_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } if( result != 0 ) { ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_open", esedb_test_file_open, source ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_open_wide", esedb_test_file_open_wide, source ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_open_file_io_handle", esedb_test_file_open_file_io_handle, source ); ESEDB_TEST_RUN( "libesedb_file_close", esedb_test_file_close ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_open_close", esedb_test_file_open_close, source ); /* Initialize file for tests */ result = esedb_test_file_open_source( &file, file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_signal_abort", esedb_test_file_signal_abort, file ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_file_open_read */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_get_type", esedb_test_file_get_type, file ); /* TODO: add tests for libesedb_file_get_format_version */ /* TODO: add tests for libesedb_file_get_creation_format_version */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_get_page_size", esedb_test_file_get_page_size, file ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_file_get_number_of_tables", esedb_test_file_get_number_of_tables, file ); /* TODO: add tests for libesedb_file_get_table */ /* TODO: add tests for libesedb_file_get_table_by_utf8_name */ /* TODO: add tests for libesedb_file_get_table_by_utf16_name */ /* Clean up */ result = esedb_test_file_close_source( &file, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "file", file ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } if( file_io_handle != NULL ) { result = libbfio_handle_free( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ return( EXIT_SUCCESS ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file != NULL ) { libesedb_file_free( &file, NULL ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_catalog_definition.c0000644000175000017500000010645714610727556023743 0ustar00lordyestalordyesta/* * Library catalog_definition type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_catalog_definition.h" /* Catalog definition: MSysObjects with name */ uint8_t esedb_test_catalog_definition_data1[ 45 ] = { 0x08, 0x80, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0b, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73 }; /* Catalog definition: SSystem_Photo_TagViewAggregate with template_name */ uint8_t esedb_test_catalog_definition_data2[ 97 ] = { 0x07, 0x82, 0x1f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x27, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0x90, 0x10, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x14, 0x80, 0x2f, 0x00, 0x53, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x4d, 0x75, 0x73, 0x69, 0x63, 0x5f, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x6d, 0x73, 0x73, 0x72, 0x63, 0x68, 0x2e, 0x64, 0x6c, 0x6c, 0x21, 0x43, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x56, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x00, 0x01, 0x04, 0x00, 0x01, 0x26, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_catalog_definition_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_initialize( void ) { libcerror_error_t *error = NULL; libesedb_catalog_definition_t *catalog_definition = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); catalog_definition = (libesedb_catalog_definition_t *) 0x12345678UL; result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); catalog_definition = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_catalog_definition_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_catalog_definition_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } return( 0 ); } /* Tests the libesedb_catalog_definition_free function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_catalog_definition_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_read_data( void ) { libcerror_error_t *error = NULL; libesedb_catalog_definition_t *catalog_definition = NULL; int result = 0; /* Initialize test */ result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_read_data( NULL, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_read_data( catalog_definition, NULL, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, (size_t) SSIZE_MAX + 1, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 0, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test with variable_size_data_types_offset > data_size */ result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 30, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test libesedb_catalog_definition_read_data with malloc failing for creation of name */ esedb_test_malloc_attempts_before_fail = 0; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #if defined( OPTIMIZATION_DISABLED ) /* Test libesedb_catalog_definition_read_data with memcpy failing for creation of name */ esedb_test_memcpy_attempts_before_fail = 0; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); if( esedb_test_memcpy_attempts_before_fail != -1 ) { esedb_test_memcpy_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( OPTIMIZATION_DISABLED ) */ /* Test libesedb_catalog_definition_read_data with malloc failing for creation of template_name */ esedb_test_malloc_attempts_before_fail = 0; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data2, 97, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #if defined( OPTIMIZATION_DISABLED ) /* Test libesedb_catalog_definition_read_data with memcpy failing for creation of template_name */ esedb_test_memcpy_attempts_before_fail = 0; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data2, 97, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); if( esedb_test_memcpy_attempts_before_fail != -1 ) { esedb_test_memcpy_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( OPTIMIZATION_DISABLED ) */ /* TODO test catalog definition with default_value */ #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Test with last_fixed_size_data_type < 5 */ esedb_test_catalog_definition_data1[ 0 ] = 0x00; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); esedb_test_catalog_definition_data1[ 0 ] = 0x08; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test with last_fixed_size_data_type > 12 */ esedb_test_catalog_definition_data1[ 0 ] = 0xff; result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); esedb_test_catalog_definition_data1[ 0 ] = 0x08; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_identifier function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_identifier( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; uint32_t identifier = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_identifier( catalog_definition, &identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "identifier", identifier, 2 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_identifier( NULL, &identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_identifier( catalog_definition, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_column_type function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_column_type( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; uint32_t column_type = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_column_type( catalog_definition, &column_type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "column_type", column_type, 4 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_column_type( NULL, &column_type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_column_type( catalog_definition, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf8_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf8_name_size( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; size_t utf8_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf8_name_size( catalog_definition, &utf8_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf8_string_size", utf8_string_size, (size_t) 12 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_utf8_name_size( NULL, &utf8_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf8_name_size( catalog_definition, NULL, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf8_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf8_name( libesedb_catalog_definition_t *catalog_definition ) { uint8_t utf8_string[ 32 ]; uint8_t expected_utf8_string[ 12 ] = { 'M', 'S', 'y', 's', 'O', 'b', 'j', 'e', 'c', 't', 's', 0 }; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf8_name( catalog_definition, utf8_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf8_string, expected_utf8_string, 12 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_catalog_definition_get_utf8_name( NULL, utf8_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf8_name( catalog_definition, NULL, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf16_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf16_name_size( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; size_t utf16_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf16_name_size( catalog_definition, &utf16_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf16_string_size", utf16_string_size, (size_t) 12 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_utf16_name_size( NULL, &utf16_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf16_name_size( catalog_definition, NULL, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf16_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf16_name( libesedb_catalog_definition_t *catalog_definition ) { uint16_t utf16_string[ 32 ]; uint16_t expected_utf16_string[ 12 ] = { 'M', 'S', 'y', 's', 'O', 'b', 'j', 'e', 'c', 't', 's', 0 }; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf16_name( catalog_definition, utf16_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf16_string, expected_utf16_string, 12 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_catalog_definition_get_utf16_name( NULL, utf16_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf16_name( catalog_definition, NULL, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf8_template_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf8_template_name_size( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; uint8_t *template_name = NULL; size_t utf8_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf8_template_name_size( catalog_definition, &utf8_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf8_string_size", utf8_string_size, (size_t) 28 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); template_name = catalog_definition->template_name; catalog_definition->template_name = NULL; result = libesedb_catalog_definition_get_utf8_template_name_size( catalog_definition, &utf8_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); catalog_definition->template_name = template_name; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf8_string_size", utf8_string_size, (size_t) 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_utf8_template_name_size( NULL, &utf8_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf8_template_name_size( catalog_definition, NULL, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf8_template_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf8_template_name( libesedb_catalog_definition_t *catalog_definition ) { uint8_t utf8_string[ 32 ]; uint8_t expected_utf8_string[ 28 ] = { 'm', 's', 's', 'r', 'c', 'h', '.', 'd', 'l', 'l', '!', 'C', 'o', 'n', 'c', 'a', 't', 'V', 'e', 'c', 't', 'V', 'a', 'l', 'u', 'e', 's', 0 }; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf8_template_name( catalog_definition, utf8_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf8_string, expected_utf8_string, 28 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_catalog_definition_get_utf8_template_name( NULL, utf8_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf8_template_name( catalog_definition, NULL, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf16_template_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf16_template_name_size( libesedb_catalog_definition_t *catalog_definition ) { libcerror_error_t *error = NULL; uint8_t *template_name = NULL; size_t utf16_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf16_template_name_size( catalog_definition, &utf16_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf16_string_size", utf16_string_size, (size_t) 28 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); template_name = catalog_definition->template_name; catalog_definition->template_name = NULL; result = libesedb_catalog_definition_get_utf16_template_name_size( catalog_definition, &utf16_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); catalog_definition->template_name = template_name; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf16_string_size", utf16_string_size, (size_t) 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_definition_get_utf16_template_name_size( NULL, &utf16_string_size, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf16_template_name_size( catalog_definition, NULL, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_definition_get_utf16_template_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_definition_get_utf16_template_name( libesedb_catalog_definition_t *catalog_definition ) { uint16_t utf16_string[ 32 ]; uint16_t expected_utf16_string[ 28 ] = { 'm', 's', 's', 'r', 'c', 'h', '.', 'd', 'l', 'l', '!', 'C', 'o', 'n', 'c', 'a', 't', 'V', 'e', 'c', 't', 'V', 'a', 'l', 'u', 'e', 's', 0 }; libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_definition_get_utf16_template_name( catalog_definition, utf16_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf16_string, expected_utf16_string, 28 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_catalog_definition_get_utf16_template_name( NULL, utf16_string, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_definition_get_utf16_template_name( catalog_definition, NULL, 32, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) libcerror_error_t *error = NULL; libesedb_catalog_definition_t *catalog_definition = NULL; int result = 0; #endif ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_catalog_definition_initialize", esedb_test_catalog_definition_initialize ); ESEDB_TEST_RUN( "libesedb_catalog_definition_free", esedb_test_catalog_definition_free ); ESEDB_TEST_RUN( "libesedb_catalog_definition_read_data", esedb_test_catalog_definition_read_data ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) /* Initialize catalog_definition for tests */ result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_identifier", esedb_test_catalog_definition_get_identifier, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_column_type", esedb_test_catalog_definition_get_column_type, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf8_name_size", esedb_test_catalog_definition_get_utf8_name_size, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf8_name", esedb_test_catalog_definition_get_utf8_name, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf16_name_size", esedb_test_catalog_definition_get_utf16_name_size, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf16_name", esedb_test_catalog_definition_get_utf16_name, catalog_definition ); /* Clean up */ result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize catalog_definition for tests */ result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_catalog_definition_data2, 97, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf8_template_name_size", esedb_test_catalog_definition_get_utf8_template_name_size, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf8_template_name", esedb_test_catalog_definition_get_utf8_template_name, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf16_template_name_size", esedb_test_catalog_definition_get_utf16_template_name_size, catalog_definition ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_definition_get_utf16_template_name", esedb_test_catalog_definition_get_utf16_template_name, catalog_definition ); /* Clean up */ result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) if( error != NULL ) { libcerror_error_free( &error ); } if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } #endif return( EXIT_FAILURE ); } libesedb-20240420/tests/pyesedb_test_support.py0000644000175000017500000000641414610727556022404 0ustar00lordyestalordyesta#!/usr/bin/env python # # Python-bindings support functions test script # # Copyright (C) 2009-2024, Joachim Metz # # Refer to AUTHORS for acknowledgements. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 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 Lesser General Public License # along with this program. If not, see . import argparse import os import sys import unittest import pyesedb class SupportFunctionsTests(unittest.TestCase): """Tests the support functions.""" def test_get_version(self): """Tests the get_version function.""" version = pyesedb.get_version() self.assertIsNotNone(version) def test_check_file_signature(self): """Tests the check_file_signature function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") result = pyesedb.check_file_signature(test_source) self.assertTrue(result) def test_check_file_signature_file_object(self): """Tests the check_file_signature_file_object function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") with open(test_source, "rb") as file_object: result = pyesedb.check_file_signature_file_object(file_object) self.assertTrue(result) def test_open(self): """Tests the open function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.open(test_source) self.assertIsNotNone(esedb_file) esedb_file.close() with self.assertRaises(TypeError): pyesedb.open(None) with self.assertRaises(ValueError): pyesedb.open(test_source, mode="w") def test_open_file_object(self): """Tests the open_file_object function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") if not os.path.isfile(test_source): raise unittest.SkipTest("source not a regular file") with open(test_source, "rb") as file_object: esedb_file = pyesedb.open_file_object(file_object) self.assertIsNotNone(esedb_file) esedb_file.close() with self.assertRaises(TypeError): pyesedb.open_file_object(None) with self.assertRaises(ValueError): pyesedb.open_file_object(file_object, mode="w") if __name__ == "__main__": argument_parser = argparse.ArgumentParser() argument_parser.add_argument( "source", nargs="?", action="store", metavar="PATH", default=None, help="path of the source file.") options, unknown_options = argument_parser.parse_known_args() unknown_options.insert(0, sys.argv[0]) setattr(unittest, "source", options.source) unittest.main(argv=unknown_options, verbosity=2) libesedb-20240420/tests/test_tools.sh0000755000175000017500000000774014610730212020264 0ustar00lordyestalordyesta#!/usr/bin/env bash # Tests tools functions and types. # # Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; TOOLS_TESTS="info_handle output signal windows_search_compression"; TOOLS_TESTS_WITH_INPUT=""; OPTION_SETS=(); INPUT_GLOB="*"; run_test() { local TEST_NAME=$1; local TEST_DESCRIPTION="Testing: ${TEST_NAME}"; local TEST_EXECUTABLE="./esedb_test_tools_${TEST_NAME}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe"; fi # TODO: add support for TEST_PROFILE and OPTION_SETS? run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_EXECUTABLE}"; local RESULT=$?; return ${RESULT}; } run_test_with_input() { local TEST_NAME=$1; local TEST_DESCRIPTION="Testing: ${TEST_NAME}"; local TEST_EXECUTABLE="./esedb_test_tools_${TEST_NAME}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe"; fi if ! test -d "input"; then echo "Test input directory not found."; return ${EXIT_IGNORE}; fi local RESULT=`ls input/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory"; return ${EXIT_IGNORE}; fi local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "esedbtools"); local IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in input/*; do if ! test -d "${TEST_SET_INPUT_DIRECTORY}"; then continue; fi if check_for_directory_in_ignore_list "${TEST_SET_INPUT_DIRECTORY}" "${IGNORE_LIST}"; then continue; fi local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); if test -f "${TEST_SET_DIRECTORY}/files"; then IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi for INPUT_FILE in "${INPUT_FILES[@]}"; do OPTION_INPUT_FILE="${INPUT_FILE}"; if test "${OSTYPE}" = "msys"; then # A test executable built with MinGW expects a Windows path. INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; fi local TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; do local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${OPTION_INPUT_FILE}" "${OPTION_SET}"); if test -f ${TEST_DATA_OPTION_FILE}; then TESTED_WITH_OPTIONS=1; IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${OPTIONS[@]}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi fi done if test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done return ${RESULT}; } if test -n "${SKIP_TOOLS_TESTS}"; then exit ${EXIT_IGNORE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; RESULT=${EXIT_IGNORE}; for TEST_NAME in ${TOOLS_TESTS}; do run_test "${TEST_NAME}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then exit ${RESULT}; fi for TEST_NAME in ${TOOLS_TESTS_WITH_INPUT}; do if test -d "input"; then run_test_with_input "${TEST_NAME}"; RESULT=$?; else run_test "${TEST_NAME}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done exit ${RESULT}; libesedb-20240420/tests/esedb_test_libbfio.h0000644000175000017500000000325514610727254021517 0ustar00lordyestalordyesta/* * The libbfio header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBBFIO_H ) #define _ESEDB_TEST_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 #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT ) #error Multi-threading support requires libbfio with multi-threading support #endif #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _ESEDB_TEST_LIBBFIO_H ) */ libesedb-20240420/tests/esedb_test_libcnotify.h0000644000175000017500000000266614610727254022260 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBCNOTIFY_H ) #define _ESEDB_TEST_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 /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _ESEDB_TEST_LIBCNOTIFY_H ) */ libesedb-20240420/tests/esedb_test_checksum.c0000644000175000017500000032055214610727253021707 0ustar00lordyestalordyesta/* * Library checksum functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_checksum.h" uint8_t esedb_test_checksum_page_0x620_0x09_data[ 8192 ] = { 0x31, 0xa4, 0xe4, 0x27, 0x04, 0x00, 0x00, 0x00, 0x32, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x1f, 0x00, 0x00, 0x97, 0x17, 0x09, 0x00, 0x05, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x08, 0x80, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0b, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4f, 0x62, 0x6a, 0x69, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x04, 0x00, 0x54, 0x79, 0x70, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x02, 0x00, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0f, 0x00, 0x43, 0x6f, 0x6c, 0x74, 0x79, 0x70, 0x4f, 0x72, 0x50, 0x67, 0x6e, 0x6f, 0x46, 0x44, 0x50, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x05, 0x00, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x50, 0x61, 0x67, 0x65, 0x73, 0x4f, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x05, 0x00, 0x53, 0x74, 0x61, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x82, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x82, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x83, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x83, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x84, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x4b, 0x65, 0x79, 0x46, 0x6c, 0x64, 0x49, 0x44, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x85, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x85, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x56, 0x61, 0x72, 0x53, 0x65, 0x67, 0x4d, 0x61, 0x63, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x86, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x86, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x12, 0x00, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x43, 0x4d, 0x61, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x87, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x87, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x08, 0x80, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x11, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4f, 0x62, 0x6a, 0x69, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x04, 0x00, 0x54, 0x79, 0x70, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x02, 0x00, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0f, 0x00, 0x43, 0x6f, 0x6c, 0x74, 0x79, 0x70, 0x4f, 0x72, 0x50, 0x67, 0x6e, 0x6f, 0x46, 0x44, 0x50, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x05, 0x00, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x50, 0x61, 0x67, 0x65, 0x73, 0x4f, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x05, 0x00, 0x53, 0x74, 0x61, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x82, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x82, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x83, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x83, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x84, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x4b, 0x65, 0x79, 0x46, 0x6c, 0x64, 0x49, 0x44, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x85, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x85, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x56, 0x61, 0x72, 0x53, 0x65, 0x67, 0x4d, 0x61, 0x63, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x86, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x86, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x12, 0x00, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x43, 0x4d, 0x61, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x87, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x87, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x31, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x02, 0x00, 0x02, 0x80, 0x02, 0x80, 0x02, 0x80, 0x0e, 0x00, 0x49, 0x64, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x0a, 0x84, 0x27, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x31, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x02, 0x00, 0x02, 0x80, 0x02, 0x80, 0x02, 0x80, 0x0e, 0x00, 0x49, 0x64, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x11, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x04, 0x00, 0x04, 0x80, 0x04, 0x80, 0x04, 0x80, 0x10, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0b, 0x00, 0x0b, 0x80, 0x0b, 0x80, 0x0b, 0x80, 0x13, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x08, 0x80, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0d, 0x00, 0x5f, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x5f, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x41, 0x70, 0x70, 0x43, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x42, 0x61, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x4d, 0x61, 0x78, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x15, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x0a, 0x84, 0x27, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x4f, 0x04, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x05, 0x00, 0x05, 0x80, 0x05, 0x80, 0x05, 0x80, 0x09, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x08, 0x80, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x19, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x5f, 0x52, 0x65, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x50, 0x72, 0x69, 0x6d, 0x4b, 0x65, 0x79, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x83, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x0b, 0x80, 0x0b, 0x80, 0x0f, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x08, 0x80, 0x20, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x13, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x50, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x09, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x44, 0x35, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x0a, 0x84, 0x27, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x08, 0x00, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x0c, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x44, 0x35, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x08, 0x80, 0x20, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x10, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x06, 0x00, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x80, 0xfe, 0x13, 0x00, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x49, 0x44, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x80, 0xfe, 0x12, 0x00, 0x43, 0x72, 0x61, 0x77, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x72, 0x61, 0x77, 0x6c, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x14, 0x00, 0x80, 0xfe, 0x0e, 0x00, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x44, 0x35, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1c, 0x00, 0x80, 0xfe, 0x15, 0x00, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x00, 0x80, 0xfe, 0x10, 0x00, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x30, 0x00, 0x80, 0xfe, 0x09, 0x00, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x34, 0x00, 0x80, 0xfe, 0x10, 0x00, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0c, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x38, 0x00, 0x80, 0xfe, 0x16, 0x00, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3c, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x46, 0x69, 0x72, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x44, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0f, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x4c, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x10, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x4e, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x11, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x50, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x4e, 0x65, 0x65, 0x64, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x12, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x51, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x4e, 0x65, 0x65, 0x64, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x13, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x52, 0x00, 0x80, 0xfe, 0x06, 0x00, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x49, 0x44, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x0a, 0x84, 0x27, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x08, 0x00, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x14, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x55, 0x72, 0x6c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x0a, 0x84, 0x27, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0a, 0x00, 0x0a, 0x80, 0x0a, 0x80, 0x0a, 0x80, 0x0e, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0c, 0x0a, 0x84, 0x27, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xce, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0d, 0x00, 0x0d, 0x80, 0x0d, 0x80, 0x0d, 0x80, 0x15, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x08, 0x80, 0x20, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x65, 0x01, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0e, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x30, 0x50, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x80, 0xfe, 0x03, 0x00, 0x50, 0x49, 0x44, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x08, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x44, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x02, 0x0d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x1a, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x03, 0xf4, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x76, 0x17, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0xde, 0x15, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x39, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x02, 0x47, 0x16, 0x00, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x14, 0x00, 0x80, 0xfe, 0x05, 0x00, 0x46, 0x69, 0x78, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x15, 0x00, 0x80, 0xfe, 0x06, 0x00, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x16, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x46, 0x61, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x17, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x4a, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0xe2, 0x36, 0x3f, 0x00, 0x76, 0x38, 0x3c, 0x00, 0x3a, 0x38, 0x3e, 0x00, 0xfc, 0x37, 0x3a, 0x00, 0xc2, 0x37, 0x39, 0x00, 0x89, 0x37, 0x3b, 0x00, 0x4e, 0x37, 0x38, 0x00, 0x16, 0x37, 0x3c, 0x00, 0xa6, 0x36, 0x37, 0x00, 0x6f, 0x36, 0x3f, 0x00, 0x30, 0x36, 0x55, 0x00, 0xdb, 0x35, 0x4e, 0x00, 0x8d, 0x35, 0x54, 0x00, 0x39, 0x35, 0x3c, 0x00, 0xfd, 0x34, 0x39, 0x00, 0x28, 0x30, 0x39, 0x00, 0xef, 0x2f, 0x3a, 0x00, 0xc3, 0x34, 0x41, 0x00, 0x82, 0x34, 0x41, 0x00, 0x41, 0x34, 0x3f, 0x00, 0x02, 0x34, 0x3f, 0x00, 0xc3, 0x33, 0x3e, 0x00, 0x85, 0x33, 0x3f, 0x00, 0x46, 0x33, 0x4a, 0x00, 0xfc, 0x32, 0x44, 0x00, 0xb8, 0x32, 0x3d, 0x00, 0x7b, 0x32, 0x44, 0x00, 0x37, 0x32, 0x40, 0x00, 0xf7, 0x31, 0x40, 0x00, 0xb7, 0x31, 0x49, 0x00, 0x6e, 0x31, 0x42, 0x00, 0x2c, 0x31, 0x46, 0x00, 0xe6, 0x30, 0x47, 0x00, 0x9f, 0x30, 0x3e, 0x00, 0x61, 0x30, 0x3a, 0x00, 0xb5, 0x2f, 0x41, 0x00, 0x74, 0x2f, 0x4c, 0x00, 0x28, 0x2f, 0x3b, 0x00, 0xed, 0x2e, 0x3d, 0x00, 0xb0, 0x2e, 0x44, 0x00, 0x6c, 0x2e, 0x49, 0x00, 0x23, 0x2e, 0x3b, 0x00, 0xe8, 0x2d, 0x4a, 0x00, 0x9e, 0x2d, 0x49, 0x00, 0x55, 0x2d, 0x3d, 0x00, 0xa9, 0x2b, 0x3a, 0x00, 0x6f, 0x2b, 0x3f, 0x00, 0x16, 0x2d, 0x3c, 0x00, 0xda, 0x2c, 0x41, 0x00, 0x99, 0x2c, 0x3c, 0x00, 0x5d, 0x2c, 0x3c, 0x00, 0x21, 0x2c, 0x3b, 0x00, 0xe6, 0x2b, 0x3e, 0x00, 0x31, 0x2b, 0x4e, 0x00, 0x40, 0x0a, 0x44, 0x00, 0xae, 0x09, 0x3c, 0x00, 0x72, 0x09, 0x3b, 0x00, 0x37, 0x09, 0x42, 0x00, 0xb7, 0x08, 0x39, 0x00, 0x7e, 0x08, 0x39, 0x00, 0x45, 0x08, 0x3c, 0x00, 0x09, 0x08, 0x3d, 0x00, 0x8c, 0x07, 0x35, 0x00, 0x1b, 0x07, 0x34, 0x00, 0xec, 0x05, 0x3e, 0x00, 0xf9, 0x08, 0x40, 0x00, 0xc9, 0x07, 0x3c, 0x00, 0x50, 0x07, 0x41, 0x00, 0xda, 0x06, 0x39, 0x00, 0xa1, 0x06, 0x3e, 0x00, 0x63, 0x06, 0x43, 0x00, 0x20, 0x06, 0x36, 0x00, 0xb6, 0x05, 0x38, 0x00, 0x7e, 0x05, 0x3e, 0x00, 0x40, 0x05, 0x42, 0x00, 0xfe, 0x04, 0x53, 0x00, 0xde, 0x0a, 0x50, 0x00, 0x8e, 0x0a, 0x4e, 0x00, 0xf2, 0x09, 0x44, 0x00, 0xba, 0x04, 0x3c, 0x00, 0x7e, 0x04, 0x3b, 0x00, 0x43, 0x04, 0x42, 0x00, 0xc3, 0x03, 0x39, 0x00, 0x8a, 0x03, 0x39, 0x00, 0x51, 0x03, 0x3c, 0x00, 0x15, 0x03, 0x3d, 0x00, 0x98, 0x02, 0x35, 0x00, 0x27, 0x02, 0x34, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x05, 0x04, 0x40, 0x00, 0xd5, 0x02, 0x3c, 0x00, 0x5c, 0x02, 0x06, 0x00, 0x16, 0x17, 0x13, 0x00, 0x2a, 0x17, 0x0e, 0x00, 0x3d, 0x17, 0x13, 0x00, 0x84, 0x17, 0x13, 0x00, 0x5e, 0x17, 0x13, 0x00, 0x4b, 0x17, 0x13, 0x00, 0x71, 0x17, 0x0e, 0x00, 0x1c, 0x17, 0x10, 0x00, 0x00, 0x00 }; uint8_t esedb_test_checksum_page_0x620_0x0c_data[ 8192 ] = { 0xc1, 0x24, 0xb2, 0xa1, 0x19, 0x08, 0xe6, 0xf7, 0x09, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xde, 0x1e, 0x00, 0x00, 0x40, 0x17, 0x0c, 0x00, 0x05, 0x28, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x08, 0x80, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0b, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4f, 0x62, 0x6a, 0x69, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x04, 0x00, 0x54, 0x79, 0x70, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x02, 0x00, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0f, 0x00, 0x43, 0x6f, 0x6c, 0x74, 0x79, 0x70, 0x4f, 0x72, 0x50, 0x67, 0x6e, 0x6f, 0x46, 0x44, 0x50, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x05, 0x00, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x50, 0x61, 0x67, 0x65, 0x73, 0x4f, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x05, 0x00, 0x53, 0x74, 0x61, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x82, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x82, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x83, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x83, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x84, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x4b, 0x65, 0x79, 0x46, 0x6c, 0x64, 0x49, 0x44, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x85, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x85, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x56, 0x61, 0x72, 0x53, 0x65, 0x67, 0x4d, 0x61, 0x63, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x86, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x86, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x12, 0x00, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x43, 0x4d, 0x61, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x09, 0x80, 0x23, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x4b, 0x65, 0x79, 0x4d, 0x6f, 0x73, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x87, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x87, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x88, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x88, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x07, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x08, 0x80, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x11, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4f, 0x62, 0x6a, 0x69, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x04, 0x00, 0x54, 0x79, 0x70, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x02, 0x00, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0f, 0x00, 0x43, 0x6f, 0x6c, 0x74, 0x79, 0x70, 0x4f, 0x72, 0x50, 0x67, 0x6e, 0x6f, 0x46, 0x44, 0x50, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x53, 0x70, 0x61, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x05, 0x00, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x50, 0x61, 0x67, 0x65, 0x73, 0x4f, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x05, 0x00, 0x53, 0x74, 0x61, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x82, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x82, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x83, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x83, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x84, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x4b, 0x65, 0x79, 0x46, 0x6c, 0x64, 0x49, 0x44, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x85, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x85, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x09, 0x00, 0x56, 0x61, 0x72, 0x53, 0x65, 0x67, 0x4d, 0x61, 0x63, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x86, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x86, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x12, 0x00, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x43, 0x4d, 0x61, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x09, 0x80, 0x23, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x4b, 0x65, 0x79, 0x4d, 0x6f, 0x73, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x87, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x87, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x88, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x88, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x07, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x80, 0x14, 0x00, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x31, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x02, 0x00, 0x02, 0x80, 0x02, 0x80, 0x02, 0x80, 0x0e, 0x00, 0x49, 0x64, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x0a, 0x84, 0x27, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x31, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x02, 0x00, 0x02, 0x80, 0x02, 0x80, 0x02, 0x80, 0x0e, 0x00, 0x49, 0x64, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x11, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x04, 0x00, 0x04, 0x80, 0x04, 0x80, 0x04, 0x80, 0x10, 0x00, 0x4e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x0a, 0x84, 0x27, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0b, 0x00, 0x0b, 0x80, 0x0b, 0x80, 0x0b, 0x80, 0x13, 0x00, 0x52, 0x6f, 0x6f, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x08, 0x80, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x02, 0x00, 0x00, 0x00, 0xff, 0x00, 0x14, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x55, 0x6e, 0x69, 0x63, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x78, 0x75, 0x70, 0x56, 0x65, 0x72, 0x32, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x6f, 0x62, 0x6a, 0x69, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x01, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x6f, 0x62, 0x6a, 0x69, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x02, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x03, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x6b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x04, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x6c, 0x63, 0x69, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x05, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x73, 0x6f, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x06, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x07, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x72, 0x67, 0x69, 0x74, 0x61, 0x67, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x08, 0x07, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x69, 0x63, 0x68, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x61, 0x75, 0x74, 0x6f, 0x69, 0x6e, 0x63, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x0a, 0x84, 0x27, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x07, 0x00, 0x07, 0x80, 0x07, 0x80, 0x07, 0x80, 0x13, 0x00, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x0a, 0x84, 0x27, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x09, 0x00, 0x09, 0x80, 0x09, 0x80, 0x09, 0x80, 0x21, 0x00, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x08, 0x01, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x08, 0x80, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0d, 0x00, 0x5f, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x5f, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x41, 0x70, 0x70, 0x43, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x81, 0x07, 0x80, 0x1f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x42, 0x61, 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x4d, 0x61, 0x78, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x03, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x0c, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x04, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x10, 0x00, 0x80, 0xfe, 0x0d, 0x00, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x11, 0x00, 0x80, 0xfe, 0x08, 0x00, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x15, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x0a, 0x88, 0x27, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x6f, 0x14, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x05, 0x00, 0x05, 0x80, 0x05, 0x80, 0x05, 0x80, 0x09, 0x00, 0x09, 0x80, 0x09, 0x80, 0x09, 0x80, 0x11, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, 0x00, 0x80, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x05, 0x04, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x08, 0x80, 0x20, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x19, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x5f, 0x52, 0x65, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x07, 0x00, 0x50, 0x72, 0x69, 0x6d, 0x4b, 0x65, 0x79, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x83, 0x23, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x0b, 0x80, 0x0b, 0x80, 0x0f, 0x00, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x0a, 0x84, 0x27, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0c, 0x00, 0x0c, 0x80, 0x0c, 0x80, 0x0c, 0x80, 0x10, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x72, 0x69, 0x6d, 0x4b, 0x65, 0x79, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x08, 0x80, 0x20, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x13, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x50, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x09, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x44, 0x35, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x80, 0xfe, 0x11, 0x00, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x0a, 0x84, 0x27, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x08, 0x00, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x0c, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x44, 0x35, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x08, 0x80, 0x20, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x65, 0x01, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x15, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x50, 0x74, 0x68, 0x5f, 0x53, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x09, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x44, 0x35, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x02, 0x09, 0x80, 0x23, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x80, 0xfe, 0x11, 0x00, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0c, 0x0a, 0x84, 0x27, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x66, 0x01, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x01, 0x04, 0x03, 0x00, 0x80, 0xfd, 0x0d, 0x00, 0x0d, 0x80, 0x0d, 0x80, 0x0d, 0x80, 0x11, 0x00, 0x70, 0x61, 0x74, 0x68, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x49, 0x64, 0x78, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x01, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x08, 0x80, 0x20, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xff, 0x00, 0x10, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x47, 0x74, 0x68, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x01, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x04, 0x00, 0x80, 0xfe, 0x06, 0x00, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1f, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x31, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x00, 0x07, 0x80, 0x1f, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x0d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x28, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x03, 0xfb, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x19, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0x6e, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0x92, 0x15, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x01, 0xfa, 0x17, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0xb5, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7f, 0x80, 0x00, 0x00, 0xe8, 0x7f, 0x80, 0x03, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x7f, 0x80, 0x00, 0x01, 0x04, 0x7f, 0x80, 0x03, 0xfb, 0x02, 0x00, 0x00, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x03, 0x7f, 0x80, 0x00, 0x00, 0xc6, 0x00, 0x02, 0x00, 0x00, 0x6c, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x05, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x14, 0x00, 0x80, 0xfe, 0x0e, 0x00, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x44, 0x35, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x06, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x1c, 0x00, 0x80, 0xfe, 0x15, 0x00, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x07, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x20, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x08, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x28, 0x00, 0x80, 0xfe, 0x0c, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x09, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x2c, 0x00, 0x80, 0xfe, 0x10, 0x00, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0a, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x30, 0x00, 0x80, 0xfe, 0x09, 0x00, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0b, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x34, 0x00, 0x80, 0xfe, 0x10, 0x00, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x74, 0x68, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0c, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x38, 0x00, 0x80, 0xfe, 0x16, 0x00, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x3c, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x46, 0x69, 0x72, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0e, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x44, 0x00, 0x80, 0xfe, 0x0a, 0x00, 0x4c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x0f, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x4c, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x10, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x4e, 0x00, 0x80, 0xfe, 0x0b, 0x00, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x11, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x50, 0x00, 0x80, 0xfe, 0x0e, 0x00, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x76, 0x69, 0x73, 0x69, 0x74, 0x65, 0x64, 0x0d, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x0d, 0x7f, 0x80, 0x02, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x09, 0x80, 0x23, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x12, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x54, 0x00, 0x80, 0xfe, 0x11, 0x00, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x3f, 0x36, 0x39, 0x00, 0x06, 0x36, 0x45, 0x00, 0x9a, 0x3a, 0x42, 0x00, 0x58, 0x3a, 0x3f, 0x00, 0x19, 0x3a, 0x3f, 0x00, 0xda, 0x39, 0x3e, 0x00, 0x9c, 0x39, 0x3f, 0x00, 0x5d, 0x39, 0x4a, 0x00, 0x13, 0x39, 0x44, 0x00, 0xcf, 0x38, 0x3d, 0x00, 0x92, 0x38, 0x44, 0x00, 0x4e, 0x38, 0x40, 0x00, 0x0e, 0x38, 0x40, 0x00, 0xce, 0x37, 0x49, 0x00, 0x85, 0x37, 0x42, 0x00, 0x43, 0x37, 0x46, 0x00, 0xfd, 0x36, 0x47, 0x00, 0xb6, 0x36, 0x3e, 0x00, 0x78, 0x36, 0x3a, 0x00, 0xcc, 0x35, 0x41, 0x00, 0x8b, 0x35, 0x51, 0x00, 0x3a, 0x35, 0x3b, 0x00, 0xba, 0x34, 0x45, 0x00, 0xf5, 0x34, 0x3d, 0x00, 0x7d, 0x34, 0x46, 0x00, 0x37, 0x34, 0x4c, 0x00, 0xeb, 0x33, 0x3b, 0x00, 0x6b, 0x33, 0x45, 0x00, 0xa6, 0x33, 0x3d, 0x00, 0x2e, 0x33, 0x44, 0x00, 0xea, 0x32, 0x50, 0x00, 0x9a, 0x32, 0x49, 0x00, 0x51, 0x32, 0x3b, 0x00, 0x16, 0x32, 0x4a, 0x00, 0xcc, 0x31, 0x59, 0x00, 0x73, 0x31, 0x3d, 0x00, 0xc7, 0x2f, 0x3a, 0x00, 0x8d, 0x2f, 0x3f, 0x00, 0x34, 0x31, 0x3c, 0x00, 0xf8, 0x30, 0x41, 0x00, 0xb7, 0x30, 0x3c, 0x00, 0x7b, 0x30, 0x3c, 0x00, 0x3f, 0x30, 0x3b, 0x00, 0x04, 0x30, 0x3e, 0x00, 0x4f, 0x2f, 0x61, 0x00, 0xee, 0x2e, 0x53, 0x00, 0x9b, 0x2e, 0x39, 0x00, 0x27, 0x2e, 0x36, 0x00, 0xf1, 0x2d, 0x3e, 0x00, 0xb3, 0x2d, 0x3b, 0x00, 0x78, 0x2d, 0x34, 0x00, 0x44, 0x2d, 0x3c, 0x00, 0x08, 0x2d, 0x3a, 0x00, 0xce, 0x2c, 0x3a, 0x00, 0x94, 0x2c, 0x3a, 0x00, 0x5a, 0x2c, 0x3b, 0x00, 0x60, 0x2e, 0x45, 0x00, 0x15, 0x2c, 0x4e, 0x00, 0x24, 0x0b, 0x44, 0x00, 0x92, 0x0a, 0x3c, 0x00, 0x56, 0x0a, 0x37, 0x00, 0x1f, 0x0a, 0x3b, 0x00, 0xe4, 0x09, 0x42, 0x00, 0x29, 0x09, 0x39, 0x00, 0xf0, 0x08, 0x39, 0x00, 0xb7, 0x08, 0x3c, 0x00, 0x7b, 0x08, 0x3d, 0x00, 0xfe, 0x07, 0x35, 0x00, 0x8d, 0x07, 0x34, 0x00, 0x5e, 0x06, 0x3b, 0x00, 0xa9, 0x09, 0x3e, 0x00, 0x6b, 0x09, 0x40, 0x00, 0x3b, 0x08, 0x3c, 0x00, 0xc2, 0x07, 0x41, 0x00, 0x4c, 0x07, 0x39, 0x00, 0x13, 0x07, 0x3e, 0x00, 0xd5, 0x06, 0x43, 0x00, 0x92, 0x06, 0x36, 0x00, 0x28, 0x06, 0x38, 0x00, 0xf0, 0x05, 0x3e, 0x00, 0xb2, 0x05, 0x42, 0x00, 0x70, 0x05, 0x53, 0x00, 0xc2, 0x0b, 0x50, 0x00, 0x72, 0x0b, 0x4e, 0x00, 0xd6, 0x0a, 0x44, 0x00, 0x2c, 0x05, 0x3c, 0x00, 0xf0, 0x04, 0x37, 0x00, 0xb9, 0x04, 0x3b, 0x00, 0x7e, 0x04, 0x42, 0x00, 0xc3, 0x03, 0x39, 0x00, 0x8a, 0x03, 0x39, 0x00, 0x51, 0x03, 0x3c, 0x00, 0x15, 0x03, 0x3d, 0x00, 0x98, 0x02, 0x35, 0x00, 0x27, 0x02, 0x34, 0x00, 0xf8, 0x00, 0x3b, 0x00, 0x43, 0x04, 0x06, 0x00, 0x78, 0x16, 0x0e, 0x00, 0x1f, 0x17, 0x13, 0x00, 0x2d, 0x17, 0x13, 0x00, 0xfe, 0x16, 0x13, 0x00, 0xc5, 0x16, 0x13, 0x00, 0x91, 0x16, 0x0e, 0x00, 0xa4, 0x16, 0x13, 0x00, 0xeb, 0x16, 0x13, 0x00, 0xd8, 0x16, 0x13, 0x00, 0xb2, 0x16, 0x13, 0x00, 0x7e, 0x16, 0x10, 0x00, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_checksum_calculate_little_endian_ecc32 function * Returns 1 if successful or 0 if not */ int esedb_test_checksum_calculate_little_endian_ecc32( void ) { libcerror_error_t *error = NULL; uint32_t ecc_checksum_value = 0; uint32_t xor_checksum_value = 0; int result = 0; /* Test regular cases */ result = libesedb_checksum_calculate_little_endian_ecc32( &ecc_checksum_value, &xor_checksum_value, esedb_test_checksum_page_0x620_0x0c_data, 8192, 8, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "ecc_checksum_value", ecc_checksum_value, (uint32_t) 0xf7e60819 ); /* TODO ESEDB_TEST_ASSERT_EQUAL_UINT32( "xor_checksum_value", xor_checksum_value, (uint32_t) 0xa1b224c1 ); */ ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_checksum_calculate_little_endian_ecc32( NULL, &xor_checksum_value, esedb_test_checksum_page_0x620_0x0c_data, 8192, 8, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_ecc32( &ecc_checksum_value, NULL, esedb_test_checksum_page_0x620_0x0c_data, 8192, 8, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_ecc32( &ecc_checksum_value, &xor_checksum_value, NULL, 8192, 8, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_ecc32( &ecc_checksum_value, &xor_checksum_value, esedb_test_checksum_page_0x620_0x0c_data, (size_t) SSIZE_MAX + 1, 8, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_ecc32( &ecc_checksum_value, &xor_checksum_value, esedb_test_checksum_page_0x620_0x0c_data, 8192, 16384, 10, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_checksum_calculate_little_endian_xor32 function * Returns 1 if successful or 0 if not */ int esedb_test_checksum_calculate_little_endian_xor32( void ) { libcerror_error_t *error = NULL; uint32_t checksum_value = 0; int result = 0; /* Test regular cases */ result = libesedb_checksum_calculate_little_endian_xor32( &checksum_value, &( esedb_test_checksum_page_0x620_0x09_data[ 4 ] ), 8192 - 4, 0x89abcdefUL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "checksum_value", checksum_value, (uint32_t) 0x27e4a431UL ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_checksum_calculate_little_endian_xor32( &checksum_value, &( esedb_test_checksum_page_0x620_0x09_data[ 5 ] ), 8192 - 5, 0x89abcdefUL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_checksum_calculate_little_endian_xor32( NULL, &( esedb_test_checksum_page_0x620_0x09_data[ 4 ] ), 8192 - 4, 0x89abcdefUL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_xor32( &checksum_value, NULL, 8192 - 4, 0x89abcdefUL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_checksum_calculate_little_endian_xor32( &checksum_value, &( esedb_test_checksum_page_0x620_0x09_data[ 4 ] ), (size_t) SSIZE_MAX + 1, 0x89abcdefUL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_checksum_calculate_little_endian_ecc32", esedb_test_checksum_calculate_little_endian_ecc32 ); ESEDB_TEST_RUN( "libesedb_checksum_calculate_little_endian_xor32", esedb_test_checksum_calculate_little_endian_xor32 ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_table_definition.c0000644000175000017500000002031714610727556023406 0ustar00lordyestalordyesta/* * Library table_definition type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_definitions.h" #include "../libesedb/libesedb_table_definition.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_table_definition_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_table_definition_initialize( void ) { libcerror_error_t *error = NULL; libesedb_catalog_definition_t *table_catalog_definition = NULL; libesedb_table_definition_t *table_definition = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 3; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Initialize test */ result = libesedb_catalog_definition_initialize( &table_catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "table_catalog_definition", table_catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); table_catalog_definition->type = LIBESEDB_CATALOG_DEFINITION_TYPE_TABLE; /* Test regular cases */ result = libesedb_table_definition_initialize( &table_definition, table_catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "table_definition", table_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); table_definition->table_catalog_definition = NULL; result = libesedb_table_definition_free( &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "table_definition", table_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_table_definition_initialize( NULL, table_catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); table_definition = (libesedb_table_definition_t *) 0x12345678UL; result = libesedb_table_definition_initialize( &table_definition, table_catalog_definition, &error ); table_definition = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_table_definition_initialize( &table_definition, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_table_definition_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_table_definition_initialize( &table_definition, table_catalog_definition, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( table_definition != NULL ) { table_definition->table_catalog_definition = NULL; libesedb_table_definition_free( &table_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "table_definition", table_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_table_definition_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_table_definition_initialize( &table_definition, table_catalog_definition, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( table_definition != NULL ) { table_definition->table_catalog_definition = NULL; libesedb_table_definition_free( &table_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "table_definition", table_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_catalog_definition_free( &table_catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "table_catalog_definition", table_catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( table_definition != NULL ) { table_definition->table_catalog_definition = NULL; libesedb_table_definition_free( &table_definition, NULL ); } if( table_catalog_definition != NULL ) { libesedb_catalog_definition_free( &table_catalog_definition, NULL ); } return( 0 ); } /* Tests the libesedb_table_definition_free function * Returns 1 if successful or 0 if not */ int esedb_test_table_definition_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_table_definition_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_table_definition_initialize", esedb_test_table_definition_initialize ); ESEDB_TEST_RUN( "libesedb_table_definition_free", esedb_test_table_definition_free ); /* TODO: add tests for libesedb_table_definition_set_long_value_catalog_definition */ /* TODO: add tests for libesedb_table_definition_set_callback_catalog_definition */ /* TODO: add tests for libesedb_table_definition_append_column_catalog_definition */ /* TODO: add tests for libesedb_table_definition_append_index_catalog_definition */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_error.c0000644000175000017500000000610314610727253021227 0ustar00lordyestalordyesta/* * Library error functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_unused.h" /* Tests the libesedb_error_free function * Returns 1 if successful or 0 if not */ int esedb_test_error_free( void ) { /* Test invocation of function only */ libesedb_error_free( NULL ); return( 1 ); } /* Tests the libesedb_error_fprint function * Returns 1 if successful or 0 if not */ int esedb_test_error_fprint( void ) { /* Test invocation of function only */ libesedb_error_fprint( NULL, NULL ); return( 1 ); } /* Tests the libesedb_error_sprint function * Returns 1 if successful or 0 if not */ int esedb_test_error_sprint( void ) { /* Test invocation of function only */ libesedb_error_sprint( NULL, NULL, 0 ); return( 1 ); } /* Tests the libesedb_error_backtrace_fprint function * Returns 1 if successful or 0 if not */ int esedb_test_error_backtrace_fprint( void ) { /* Test invocation of function only */ libesedb_error_backtrace_fprint( NULL, NULL ); return( 1 ); } /* Tests the libesedb_error_backtrace_sprint function * Returns 1 if successful or 0 if not */ int esedb_test_error_backtrace_sprint( void ) { /* Test invocation of function only */ libesedb_error_backtrace_sprint( NULL, NULL, 0 ); return( 1 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) ESEDB_TEST_RUN( "libesedb_error_free", esedb_test_error_free ); ESEDB_TEST_RUN( "libesedb_error_fprint", esedb_test_error_fprint ); ESEDB_TEST_RUN( "libesedb_error_sprint", esedb_test_error_sprint ); ESEDB_TEST_RUN( "libesedb_error_backtrace_fprint", esedb_test_error_backtrace_fprint ); ESEDB_TEST_RUN( "libesedb_error_backtrace_sprint", esedb_test_error_backtrace_sprint ); return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_multi_value.c0000644000175000017500000000761414610727556022442 0ustar00lordyestalordyesta/* * Library multi_value type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_multi_value.h" /* Tests the libesedb_multi_value_free function * Returns 1 if successful or 0 if not */ int esedb_test_multi_value_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_multi_value_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_multi_value_initialize */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_multi_value_free", esedb_test_multi_value_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_multi_value_get_column_type */ /* TODO: add tests for libesedb_multi_value_get_number_of_values */ /* TODO: add tests for libesedb_multi_value_get_value_data_size */ /* TODO: add tests for libesedb_multi_value_get_value_data */ /* TODO: add tests for libesedb_multi_value_get_value */ /* TODO: add tests for libesedb_multi_value_get_value_8bit */ /* TODO: add tests for libesedb_multi_value_get_value_16bit */ /* TODO: add tests for libesedb_multi_value_get_value_32bit */ /* TODO: add tests for libesedb_multi_value_get_value_64bit */ /* TODO: add tests for libesedb_multi_value_get_value_floating_point_32bit */ /* TODO: add tests for libesedb_multi_value_get_value_floating_point_64bit */ /* TODO: add tests for libesedb_multi_value_get_value_filetime */ /* TODO: add tests for libesedb_multi_value_get_value_utf8_string_size */ /* TODO: add tests for libesedb_multi_value_get_value_utf8_string */ /* TODO: add tests for libesedb_multi_value_get_value_utf16_string_size */ /* TODO: add tests for libesedb_multi_value_get_value_utf16_string */ /* TODO: add tests for libesedb_multi_value_get_value_binary_data_size */ /* TODO: add tests for libesedb_multi_value_get_value_binary_data */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/pyesedb_test_file.py0000644000175000017500000001234514610727253021601 0ustar00lordyestalordyesta#!/usr/bin/env python # # Python-bindings file type test script # # Copyright (C) 2009-2024, Joachim Metz # # Refer to AUTHORS for acknowledgements. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 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 Lesser General Public License # along with this program. If not, see . import argparse import os import sys import unittest import pyesedb class FileTypeTests(unittest.TestCase): """Tests the file type.""" def test_signal_abort(self): """Tests the signal_abort function.""" esedb_file = pyesedb.file() esedb_file.signal_abort() def test_open(self): """Tests the open function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.file() esedb_file.open(test_source) with self.assertRaises(IOError): esedb_file.open(test_source) esedb_file.close() with self.assertRaises(TypeError): esedb_file.open(None) with self.assertRaises(ValueError): esedb_file.open(test_source, mode="w") def test_open_file_object(self): """Tests the open_file_object function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") if not os.path.isfile(test_source): raise unittest.SkipTest("source not a regular file") esedb_file = pyesedb.file() with open(test_source, "rb") as file_object: esedb_file.open_file_object(file_object) with self.assertRaises(IOError): esedb_file.open_file_object(file_object) esedb_file.close() with self.assertRaises(TypeError): esedb_file.open_file_object(None) with self.assertRaises(ValueError): esedb_file.open_file_object(file_object, mode="w") def test_close(self): """Tests the close function.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.file() with self.assertRaises(IOError): esedb_file.close() def test_open_close(self): """Tests the open and close functions.""" test_source = getattr(unittest, "source", None) if not test_source: return esedb_file = pyesedb.file() # Test open and close. esedb_file.open(test_source) esedb_file.close() # Test open and close a second time to validate clean up on close. esedb_file.open(test_source) esedb_file.close() if os.path.isfile(test_source): with open(test_source, "rb") as file_object: # Test open_file_object and close. esedb_file.open_file_object(file_object) esedb_file.close() # Test open_file_object and close a second time to validate clean up on close. esedb_file.open_file_object(file_object) esedb_file.close() # Test open_file_object and close and dereferencing file_object. esedb_file.open_file_object(file_object) del file_object esedb_file.close() def test_get_type(self): """Tests the get_type function and type property.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.file() esedb_file.open(test_source) type = esedb_file.get_type() self.assertIsNotNone(type) self.assertIsNotNone(esedb_file.type) esedb_file.close() def test_get_page_size(self): """Tests the get_page_size function and page_size property.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.file() esedb_file.open(test_source) page_size = esedb_file.get_page_size() self.assertIsNotNone(page_size) self.assertIsNotNone(esedb_file.page_size) esedb_file.close() def test_get_number_of_tables(self): """Tests the get_number_of_tables function and number_of_tables property.""" test_source = getattr(unittest, "source", None) if not test_source: raise unittest.SkipTest("missing source") esedb_file = pyesedb.file() esedb_file.open(test_source) number_of_tables = esedb_file.get_number_of_tables() self.assertIsNotNone(number_of_tables) self.assertIsNotNone(esedb_file.number_of_tables) esedb_file.close() if __name__ == "__main__": argument_parser = argparse.ArgumentParser() argument_parser.add_argument( "source", nargs="?", action="store", metavar="PATH", default=None, help="path of the source file.") options, unknown_options = argument_parser.parse_known_args() unknown_options.insert(0, sys.argv[0]) setattr(unittest, "source", options.source) unittest.main(argv=unknown_options, verbosity=2) libesedb-20240420/tests/esedb_test_space_tree_value.c0000644000175000017500000002177414610727254023420 0ustar00lordyestalordyesta/* * Library space_tree_value type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_space_tree_value.h" uint8_t esedb_test_space_tree_value_data1[ 4 ] = { 0x00, 0x01, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_space_tree_value_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_space_tree_value_initialize( void ) { libcerror_error_t *error = NULL; libesedb_space_tree_value_t *space_tree_value = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_space_tree_value_initialize( &space_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_space_tree_value_free( &space_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_space_tree_value_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); space_tree_value = (libesedb_space_tree_value_t *) 0x12345678UL; result = libesedb_space_tree_value_initialize( &space_tree_value, &error ); space_tree_value = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_space_tree_value_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_space_tree_value_initialize( &space_tree_value, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( space_tree_value != NULL ) { libesedb_space_tree_value_free( &space_tree_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_space_tree_value_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_space_tree_value_initialize( &space_tree_value, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( space_tree_value != NULL ) { libesedb_space_tree_value_free( &space_tree_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( space_tree_value != NULL ) { libesedb_space_tree_value_free( &space_tree_value, NULL ); } return( 0 ); } /* Tests the libesedb_space_tree_value_free function * Returns 1 if successful or 0 if not */ int esedb_test_space_tree_value_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_space_tree_value_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_space_tree_value_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_space_tree_value_read_data( void ) { libcerror_error_t *error = NULL; libesedb_space_tree_value_t *space_tree_value = NULL; int result = 0; /* Initialize test */ result = libesedb_space_tree_value_initialize( &space_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_space_tree_value_read_data( space_tree_value, esedb_test_space_tree_value_data1, 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_space_tree_value_read_data( NULL, esedb_test_space_tree_value_data1, 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_space_tree_value_read_data( space_tree_value, NULL, 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_space_tree_value_read_data( space_tree_value, esedb_test_space_tree_value_data1, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_space_tree_value_read_data( space_tree_value, esedb_test_space_tree_value_data1, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_space_tree_value_free( &space_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "space_tree_value", space_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( space_tree_value != NULL ) { libesedb_space_tree_value_free( &space_tree_value, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_space_tree_value_initialize", esedb_test_space_tree_value_initialize ); ESEDB_TEST_RUN( "libesedb_space_tree_value_free", esedb_test_space_tree_value_free ); ESEDB_TEST_RUN( "libesedb_space_tree_value_read_data", esedb_test_space_tree_value_read_data ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/Makefile.am0000644000175000017500000003466014610744665017604 0ustar00lordyestalordyestaAUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_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@ \ @PTHREAD_CPPFLAGS@ \ @LIBESEDB_DLL_IMPORT@ if HAVE_PYTHON_TESTS TESTS_PYESEDB = \ test_python_module.sh endif TESTS = \ test_library.sh \ test_tools.sh \ test_esedbinfo.sh \ test_esedbexport.sh \ $(TESTS_PYESEDB) check_SCRIPTS = \ pyesedb_test_file.py \ pyesedb_test_support.py \ test_esedbexport.sh \ test_esedbinfo.sh \ test_library.sh \ test_manpage.sh \ test_python_module.sh \ test_runner.sh \ test_tools.sh EXTRA_DIST = \ $(check_SCRIPTS) check_PROGRAMS = \ esedb_test_block_descriptor \ esedb_test_block_tree \ esedb_test_block_tree_node \ esedb_test_catalog \ esedb_test_catalog_definition \ esedb_test_checksum \ esedb_test_column \ esedb_test_column_type \ esedb_test_compression \ esedb_test_data_definition \ esedb_test_data_segment \ esedb_test_database \ esedb_test_error \ esedb_test_file \ esedb_test_file_header \ esedb_test_index \ esedb_test_io_handle \ esedb_test_leaf_page_descriptor \ esedb_test_long_value \ esedb_test_multi_value \ esedb_test_notify \ esedb_test_page \ esedb_test_page_header \ esedb_test_page_tree \ esedb_test_page_tree_key \ esedb_test_page_tree_value \ esedb_test_page_value \ esedb_test_record \ esedb_test_root_page_header \ esedb_test_space_tree \ esedb_test_space_tree_value \ esedb_test_support \ esedb_test_table \ esedb_test_table_definition \ esedb_test_tools_info_handle \ esedb_test_tools_output \ esedb_test_tools_signal \ esedb_test_tools_windows_search_compression esedb_test_block_descriptor_SOURCES = \ esedb_test_block_descriptor.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_descriptor_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_block_tree_SOURCES = \ esedb_test_block_tree.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_block_tree_node_SOURCES = \ esedb_test_block_tree_node.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_tree_node_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_catalog_SOURCES = \ esedb_test_catalog.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcdata.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_catalog_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_catalog_definition_SOURCES = \ esedb_test_catalog_definition.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_catalog_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_checksum_SOURCES = \ esedb_test_checksum.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_checksum_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_column_SOURCES = \ esedb_test_column.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_column_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_column_type_SOURCES = \ esedb_test_column_type.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_column_type_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_compression_SOURCES = \ esedb_test_compression.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_compression_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_data_definition_SOURCES = \ esedb_test_data_definition.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_data_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_data_segment_SOURCES = \ esedb_test_data_segment.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_libfcache.h \ esedb_test_libfdata.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_data_segment_LDADD = \ @LIBFDATA_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_database_SOURCES = \ esedb_test_database.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_database_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_error_SOURCES = \ esedb_test_error.c \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_unused.h esedb_test_error_LDADD = \ ../libesedb/libesedb.la esedb_test_file_SOURCES = \ esedb_test_file.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_getopt.c esedb_test_getopt.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libclocale.h \ esedb_test_libcnotify.h \ esedb_test_libesedb.h \ esedb_test_libuna.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_file_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @PTHREAD_LIBADD@ esedb_test_file_header_SOURCES = \ esedb_test_file_header.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_file_header_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_index_SOURCES = \ esedb_test_index.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_index_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_io_handle_SOURCES = \ esedb_test_io_handle.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_io_handle_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_leaf_page_descriptor_SOURCES = \ esedb_test_leaf_page_descriptor.c \ esedb_test_libcdata.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_leaf_page_descriptor_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_long_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_long_value.c \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_long_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_multi_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_multi_value.c \ esedb_test_unused.h esedb_test_multi_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_notify_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_notify.c \ esedb_test_unused.h esedb_test_notify_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_SOURCES = \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page.c \ esedb_test_unused.h esedb_test_page_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_header_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_header.c \ esedb_test_unused.h esedb_test_page_header_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree.c \ esedb_test_unused.h esedb_test_page_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_key_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_libfdata.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree_key.c \ esedb_test_unused.h esedb_test_page_tree_key_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree_value.c \ esedb_test_unused.h esedb_test_page_tree_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_value.c \ esedb_test_unused.h esedb_test_page_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_record_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_record.c \ esedb_test_unused.h esedb_test_record_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_root_page_header_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_root_page_header.c \ esedb_test_unused.h esedb_test_root_page_header_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_space_tree_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_space_tree.c \ esedb_test_unused.h esedb_test_space_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_space_tree_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_space_tree_value.c \ esedb_test_unused.h esedb_test_space_tree_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_support_SOURCES = \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_getopt.c esedb_test_getopt.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libclocale.h \ esedb_test_libcnotify.h \ esedb_test_libesedb.h \ esedb_test_libuna.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_support.c \ esedb_test_unused.h esedb_test_support_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_table_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_table.c \ esedb_test_unused.h esedb_test_table_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_table_definition_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_table_definition.c \ esedb_test_unused.h esedb_test_table_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_info_handle_SOURCES = \ ../esedbtools/info_handle.c ../esedbtools/info_handle.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_tools_info_handle.c \ esedb_test_unused.h esedb_test_tools_info_handle_LDADD = \ @LIBFDATETIME_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_output_SOURCES = \ ../esedbtools/esedbtools_output.c ../esedbtools/esedbtools_output.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_tools_output.c \ esedb_test_unused.h esedb_test_tools_output_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_signal_SOURCES = \ ../esedbtools/esedbtools_signal.c ../esedbtools/esedbtools_signal.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_tools_signal.c \ esedb_test_unused.h esedb_test_tools_signal_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_windows_search_compression_SOURCES = \ ../esedbtools/windows_search_compression.c ../esedbtools/windows_search_compression.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_tools_windows_search_compression.c \ esedb_test_unused.h esedb_test_tools_windows_search_compression_LDADD = \ @LIBCNOTIFY_LIBADD@ \ @LIBCERROR_LIBADD@ DISTCLEANFILES = \ Makefile \ Makefile.in \ notify_stream.log libesedb-20240420/tests/esedb_test_memory.h0000644000175000017500000000324614610727254021421 0ustar00lordyestalordyesta/* * Memory allocation functions for testing * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_MEMORY_H ) #define _ESEDB_TEST_MEMORY_H #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __loongarch__ ) && !defined( __mips__ ) && !defined( __riscv ) && !defined( __sparc__ ) && !defined( HAVE_ASAN ) #define HAVE_ESEDB_TEST_MEMORY 1 #endif #if defined( HAVE_ESEDB_TEST_MEMORY ) extern int esedb_test_malloc_attempts_before_fail; extern int esedb_test_memcpy_attempts_before_fail; extern int esedb_test_memset_attempts_before_fail; extern int esedb_test_realloc_attempts_before_fail; #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_TEST_MEMORY_H ) */ libesedb-20240420/tests/esedb_test_libclocale.h0000644000175000017500000000267114610727254022203 0ustar00lordyestalordyesta/* * The libclocale header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBCLOCALE_H ) #define _ESEDB_TEST_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 /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _ESEDB_TEST_LIBCLOCALE_H ) */ libesedb-20240420/tests/esedb_test_record.c0000644000175000017500000001113714610727556021365 0ustar00lordyestalordyesta/* * Library record type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_record.h" /* Tests the libesedb_record_free function * Returns 1 if successful or 0 if not */ int esedb_test_record_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_record_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_record_initialize */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_record_free", esedb_test_record_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_record_get_number_of_values */ /* TODO: add tests for libesedb_record_get_column_catalog_definition */ /* TODO: add tests for libesedb_record_get_column_identifier */ /* TODO: add tests for libesedb_record_get_column_type */ /* TODO: add tests for libesedb_record_get_utf8_column_name_size */ /* TODO: add tests for libesedb_record_get_utf8_column_name */ /* TODO: add tests for libesedb_record_get_utf16_column_name_size */ /* TODO: add tests for libesedb_record_get_utf16_column_name */ /* TODO: add tests for libesedb_record_get_value */ /* TODO: add tests for libesedb_record_get_value_data_size */ /* TODO: add tests for libesedb_record_get_value_data */ /* TODO: add tests for libesedb_record_get_value_data_flags */ /* TODO: add tests for libesedb_record_get_value_boolean */ /* TODO: add tests for libesedb_record_get_value_8bit */ /* TODO: add tests for libesedb_record_get_value_16bit */ /* TODO: add tests for libesedb_record_get_value_32bit */ /* TODO: add tests for libesedb_record_get_value_64bit */ /* TODO: add tests for libesedb_record_get_value_filetime */ /* TODO: add tests for libesedb_record_get_value_floating_point_32bit */ /* TODO: add tests for libesedb_record_get_value_floating_point_64bit */ /* TODO: add tests for libesedb_record_get_value_utf8_string_size */ /* TODO: add tests for libesedb_record_get_value_utf8_string */ /* TODO: add tests for libesedb_record_get_value_utf16_string_size */ /* TODO: add tests for libesedb_record_get_value_utf16_string */ /* TODO: add tests for libesedb_record_get_value_binary_data_size */ /* TODO: add tests for libesedb_record_get_value_binary_data */ /* TODO: add tests for libesedb_record_is_long_value */ /* TODO: add tests for libesedb_record_is_multi_value */ /* TODO: add tests for libesedb_record_get_long_value_data_segments_list */ /* TODO: add tests for libesedb_record_get_long_value */ /* TODO: add tests for libesedb_record_get_multi_value */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_support.c0000644000175000017500000003403714610727254021622 0ustar00lordyestalordyesta/* * Library support functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_getopt.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #if !defined( LIBESEDB_HAVE_BFIO ) LIBESEDB_EXTERN \ int libesedb_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ /* Tests the libesedb_get_version function * Returns 1 if successful or 0 if not */ int esedb_test_get_version( void ) { const char *version_string = NULL; int result = 0; version_string = libesedb_get_version(); result = narrow_string_compare( version_string, LIBESEDB_VERSION_STRING, 9 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_get_access_flags_read function * Returns 1 if successful or 0 if not */ int esedb_test_get_access_flags_read( void ) { int access_flags = 0; access_flags = libesedb_get_access_flags_read(); ESEDB_TEST_ASSERT_EQUAL_INT( "access_flags", access_flags, LIBESEDB_ACCESS_FLAG_READ ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_get_codepage function * Returns 1 if successful or 0 if not */ int esedb_test_get_codepage( void ) { libcerror_error_t *error = NULL; int codepage = 0; int result = 0; result = libesedb_get_codepage( &codepage, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_get_codepage( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_set_codepage function * Returns 1 if successful or 0 if not */ int esedb_test_set_codepage( void ) { libcerror_error_t *error = NULL; int result = 0; result = libesedb_set_codepage( 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_set_codepage( -1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_check_file_signature function * Returns 1 if successful or 0 if not */ int esedb_test_check_file_signature( const system_character_t *source ) { char narrow_source[ 256 ]; libcerror_error_t *error = NULL; int result = 0; if( source != NULL ) { /* Initialize test */ result = esedb_test_get_narrow_source( source, narrow_source, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libesedb_check_file_signature( narrow_source, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } /* Test error cases */ result = libesedb_check_file_signature( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_check_file_signature( "", &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( source != NULL ) { #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test libesedb_check_file_signature with malloc failing in libbfio_file_initialize */ esedb_test_malloc_attempts_before_fail = 0; result = libesedb_check_file_signature( narrow_source, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ } return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Tests the libesedb_check_file_signature_wide function * Returns 1 if successful or 0 if not */ int esedb_test_check_file_signature_wide( const system_character_t *source ) { wchar_t wide_source[ 256 ]; libcerror_error_t *error = NULL; int result = 0; if( source != NULL ) { /* Initialize test */ result = esedb_test_get_wide_source( source, wide_source, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libesedb_check_file_signature_wide( wide_source, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } /* Test error cases */ result = libesedb_check_file_signature_wide( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_check_file_signature_wide( L"", &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); if( source != NULL ) { #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test libesedb_check_file_signature_wide with malloc failing in libbfio_file_initialize */ esedb_test_malloc_attempts_before_fail = 0; result = libesedb_check_file_signature_wide( wide_source, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ } return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Tests the libesedb_check_file_signature_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_check_file_signature_file_io_handle( const system_character_t *source ) { uint8_t empty_block[ 8192 ]; libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; void *memset_result = NULL; size_t source_length = 0; int result = 0; /* Initialize test */ memset_result = memory_set( empty_block, 0, sizeof( uint8_t ) * 8192 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "memset_result", memset_result ); if( source != NULL ) { /* Initialize test */ result = libbfio_file_initialize( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); source_length = system_string_length( source ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libbfio_file_set_name_wide( file_io_handle, source, source_length, &error ); #else result = libbfio_file_set_name( file_io_handle, source, source_length, &error ); #endif ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature */ result = libesedb_check_file_signature_file_io_handle( file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } /* Test error cases */ result = libesedb_check_file_signature_file_io_handle( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ if( source != NULL ) { result = libbfio_handle_close( file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libbfio_handle_free( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); } /* Test check file signature with data too small */ result = esedb_test_open_file_io_handle( &file_io_handle, empty_block, sizeof( uint8_t ) * 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_check_file_signature_file_io_handle( file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test check file signature with empty block */ result = esedb_test_open_file_io_handle( &file_io_handle, empty_block, sizeof( uint8_t ) * 8192, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_check_file_signature_file_io_handle( file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { system_character_t *source = NULL; system_integer_t option = 0; while( ( option = esedb_test_getopt( argc, argv, _SYSTEM_STRING( "" ) ) ) != (system_integer_t) -1 ) { switch( option ) { case (system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_SYSTEM ".\n", argv[ optind - 1 ] ); return( EXIT_FAILURE ); } } if( optind < argc ) { source = argv[ optind ]; } ESEDB_TEST_RUN( "libesedb_get_version", esedb_test_get_version ); ESEDB_TEST_RUN( "libesedb_get_access_flags_read", esedb_test_get_access_flags_read ); ESEDB_TEST_RUN( "libesedb_get_codepage", esedb_test_get_codepage ); ESEDB_TEST_RUN( "libesedb_set_codepage", esedb_test_set_codepage ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) ESEDB_TEST_RUN_WITH_ARGS( "libesedb_check_file_signature", esedb_test_check_file_signature, source ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) ESEDB_TEST_RUN_WITH_ARGS( "libesedb_check_file_signature_wide", esedb_test_check_file_signature_wide, source ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_check_file_signature_file_io_handle", esedb_test_check_file_signature_file_io_handle, source ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_notify.c0000644000175000017500000001034314610727254021410 0ustar00lordyestalordyesta/* * Library notification functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_unused.h" /* Tests the libesedb_notify_set_verbose function * Returns 1 if successful or 0 if not */ int esedb_test_notify_set_verbose( void ) { /* Test invocation of function only */ libesedb_notify_set_verbose( 0 ); return( 1 ); } /* Tests the libesedb_notify_set_stream function * Returns 1 if successful or 0 if not */ int esedb_test_notify_set_stream( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_notify_set_stream( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ /* TODO test libcnotify_stream_set failure */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_notify_stream_open function * Returns 1 if successful or 0 if not */ int esedb_test_notify_stream_open( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_notify_stream_open( "notify_stream.log", &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_notify_stream_open( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_notify_stream_close( &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_notify_stream_close function * Returns 1 if successful or 0 if not */ int esedb_test_notify_stream_close( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test regular cases */ result = libesedb_notify_stream_close( &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ /* TODO test libcnotify_stream_close failure */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) ESEDB_TEST_RUN( "libesedb_notify_set_verbose", esedb_test_notify_set_verbose ) ESEDB_TEST_RUN( "libesedb_notify_set_stream", esedb_test_notify_set_stream ) ESEDB_TEST_RUN( "libesedb_notify_stream_open", esedb_test_notify_stream_open ) ESEDB_TEST_RUN( "libesedb_notify_stream_close", esedb_test_notify_stream_close ) return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_leaf_page_descriptor.c0000644000175000017500000002300014610727556024240 0ustar00lordyestalordyesta/* * Library leaf_page_descriptor type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcdata.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_leaf_page_descriptor.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_leaf_page_descriptor_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_leaf_page_descriptor_initialize( void ) { libcerror_error_t *error = NULL; libesedb_leaf_page_descriptor_t *leaf_page_descriptor = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "leaf_page_descriptor", leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "leaf_page_descriptor", leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_leaf_page_descriptor_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); leaf_page_descriptor = (libesedb_leaf_page_descriptor_t *) 0x12345678UL; result = libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, &error ); leaf_page_descriptor = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_leaf_page_descriptor_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "leaf_page_descriptor", leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_leaf_page_descriptor_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_leaf_page_descriptor_initialize( &leaf_page_descriptor, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "leaf_page_descriptor", leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &leaf_page_descriptor, NULL ); } return( 0 ); } /* Tests the libesedb_leaf_page_descriptor_free function * Returns 1 if successful or 0 if not */ int esedb_test_leaf_page_descriptor_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_leaf_page_descriptor_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_leaf_page_descriptor_compare function * Returns 1 if successful or 0 if not */ int esedb_test_leaf_page_descriptor_compare( void ) { libcerror_error_t *error = NULL; libesedb_leaf_page_descriptor_t *first_leaf_page_descriptor = NULL; libesedb_leaf_page_descriptor_t *second_leaf_page_descriptor = NULL; int result = 0; /* Initialize test */ result = libesedb_leaf_page_descriptor_initialize( &first_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "first_leaf_page_descriptor", first_leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_leaf_page_descriptor_initialize( &second_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "second_leaf_page_descriptor", second_leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_leaf_page_descriptor_compare( first_leaf_page_descriptor, second_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, LIBCDATA_COMPARE_EQUAL ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_leaf_page_descriptor_compare( NULL, second_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_leaf_page_descriptor_compare( first_leaf_page_descriptor, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_leaf_page_descriptor_free( &second_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "second_leaf_page_descriptor", second_leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_leaf_page_descriptor_free( &first_leaf_page_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "first_leaf_page_descriptor", first_leaf_page_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( second_leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &second_leaf_page_descriptor, NULL ); } if( first_leaf_page_descriptor != NULL ) { libesedb_leaf_page_descriptor_free( &first_leaf_page_descriptor, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_leaf_page_descriptor_initialize", esedb_test_leaf_page_descriptor_initialize ); ESEDB_TEST_RUN( "libesedb_leaf_page_descriptor_free", esedb_test_leaf_page_descriptor_free ); ESEDB_TEST_RUN( "libesedb_leaf_page_descriptor_compare", esedb_test_leaf_page_descriptor_compare ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/test_manpage.sh0000744000175000017500000000312614610727253020537 0ustar00lordyestalordyesta#!/usr/bin/env bash # Tests man pages. # # Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; run_test() { local INPUT_FILE=$1; local RESULT=0 TEST_NAME=`basename ${INPUT_FILE}`; echo -n "Testing man with input: ${TEST_NAME}"; LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z ${INPUT_FILE} > /dev/null 2> ${TMPDIR}/${TEST_NAME}.warnings; RESULT=$?; # For now line break warnings are ignored. if test -f ${TMPDIR}/${TEST_NAME}.warnings; then sed "/can't break line/ d" -i ${TMPDIR}/${TEST_NAME}.warnings; fi if test -s ${TMPDIR}/${TEST_NAME}.warnings; then RESULT=${EXIT_FAILURE}; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then echo " (FAIL)"; else echo " (PASS)"; fi if test -s ${TMPDIR}/${TEST_NAME}.warnings; then cat ${TMPDIR}/${TEST_NAME}.warnings; fi return ${RESULT}; } if test "${OSTYPE}" = "msys"; then exit ${EXIT_IGNORE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; assert_availability_binary man; RESULT=${EXIT_IGNORE}; TMPDIR="tmp$$"; rm -rf ${TMPDIR}; mkdir ${TMPDIR}; MANUALS_PATH="../manuals"; if ! test -d ${MANUALS_PATH}; then MANUALS_PATH="manuals"; fi if ! test -d ${MANUALS_PATH}; then echo "Manuals directory not found."; exit ${EXIT_IGNORE}; fi for INPUT_FILE in ${MANUALS_PATH}/*.[13]; do run_test "${INPUT_FILE}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done rm -rf ${TMPDIR}; exit ${RESULT}; libesedb-20240420/tests/esedb_test_tools_info_handle.c0000644000175000017500000001300214610727254023561 0ustar00lordyestalordyesta/* * Tools info_handle type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../esedbtools/info_handle.h" /* Tests the info_handle_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_tools_info_handle_initialize( void ) { info_handle_t *info_handle = NULL; libcerror_error_t *error = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = info_handle_initialize( &info_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "info_handle", info_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = info_handle_free( &info_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "info_handle", info_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = info_handle_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); info_handle = (info_handle_t *) 0x12345678UL; result = info_handle_initialize( &info_handle, &error ); info_handle = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test info_handle_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = info_handle_initialize( &info_handle, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( info_handle != NULL ) { info_handle_free( &info_handle, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "info_handle", info_handle ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test info_handle_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = info_handle_initialize( &info_handle, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( info_handle != NULL ) { info_handle_free( &info_handle, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "info_handle", info_handle ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( info_handle != NULL ) { info_handle_free( &info_handle, NULL ); } return( 0 ); } /* Tests the info_handle_free function * Returns 1 if successful or 0 if not */ int esedb_test_tools_info_handle_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = info_handle_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) ESEDB_TEST_RUN( "info_handle_initialize", esedb_test_tools_info_handle_initialize ); ESEDB_TEST_RUN( "info_handle_free", esedb_test_tools_info_handle_free ); return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/test_python_module.sh0000755000175000017500000001046514610727253022023 0ustar00lordyestalordyesta#!/usr/bin/env bash # Tests Python module functions and types. # # Version: 20240417 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_NO_TESTS_RAN=5; EXIT_IGNORE=77; TEST_FUNCTIONS="support"; TEST_FUNCTIONS_WITH_INPUT="file"; OPTION_SETS=(); TEST_TOOL_DIRECTORY="."; INPUT_GLOB="*"; LIBRARY_NAME="libesedb"; PYTHON_MODULE="pyesedb"; test_python_function() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py"; run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_SCRIPT}"; local RESULT=$?; return ${RESULT}; } test_python_function_with_input() { local TEST_FUNCTION=$1; local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}"; local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/${PYTHON_MODULE}_test_${TEST_FUNCTION}.py"; if ! test -d "input"; then echo "Test input directory not found."; return ${EXIT_IGNORE}; fi local RESULT=`ls input/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory"; return ${EXIT_IGNORE}; fi local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "${PYTHON_MODULE}"); local IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in input/*; do if ! test -d "${TEST_SET_INPUT_DIRECTORY}"; then continue; fi if check_for_directory_in_ignore_list "${TEST_SET_INPUT_DIRECTORY}" "${IGNORE_LIST}"; then continue; fi local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); if test -f "${TEST_SET_DIRECTORY}/files"; then IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi for INPUT_FILE in "${INPUT_FILES[@]}"; do local TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; do local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); if test -f ${TEST_DATA_OPTION_FILE}; then TESTED_WITH_OPTIONS=1; IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_SCRIPT}" "${INPUT_FILE}" "${OPTIONS[@]}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi fi done if test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_SCRIPT}" "${INPUT_FILE}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done return ${RESULT}; } if test -n "${SKIP_PYTHON_TESTS}"; then exit ${EXIT_IGNORE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; PLATFORM=`uname -s | sed 's/-.*$//'`; if test "${PLATFORM}" = "MINGW64_NT" || test "${PLATFORM}" = "MSYS_NT"; then cp ../${LIBRARY_NAME}/.libs/*.dll ../${PYTHON_MODULE}/.libs/; cp ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.dll ../${PYTHON_MODULE}/.libs/${PYTHON_MODULE}.pyd; fi RESULT=${EXIT_IGNORE}; for TEST_FUNCTION in ${TEST_FUNCTIONS}; do test_python_function "${TEST_FUNCTION}"; RESULT=$?; if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; then RESULT=${EXIT_IGNORE}; fi if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then exit ${RESULT}; fi for TEST_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT}; do if test -d "input"; then test_python_function_with_input "${TEST_FUNCTION}"; RESULT=$?; else test_python_function "${TEST_FUNCTION}"; RESULT=$?; fi if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; then RESULT=${EXIT_IGNORE}; fi if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi done exit ${RESULT}; libesedb-20240420/tests/esedb_test_catalog.c0000644000175000017500000005627214610727556021532 0ustar00lordyestalordyesta/* * Library catalog type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcdata.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_catalog.h" #include "../libesedb/libesedb_io_handle.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_catalog_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_initialize( void ) { libcerror_error_t *error = NULL; libesedb_catalog_t *catalog = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 4; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->file_size = 16777216; io_handle->page_size = 4096; /* Test regular cases */ result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_free( &catalog, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_initialize( NULL, io_handle, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); catalog = (libesedb_catalog_t *) 0x12345678UL; result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); catalog = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_catalog_initialize with malloc failing * Test libesedb_catalog_initialize with malloc failing in libcdata_array_initialize */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( catalog != NULL ) { libesedb_catalog_free( &catalog, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_catalog_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( catalog != NULL ) { libesedb_catalog_free( &catalog, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( catalog != NULL ) { libesedb_catalog_free( &catalog, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_catalog_free function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_catalog_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_read_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_read_file_io_handle( void ) { uint8_t data[ 4096 ]; libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libesedb_catalog_t *catalog = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->file_size = 16777216; io_handle->page_size = 4096; result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize file IO handle */ result = esedb_test_open_file_io_handle( &file_io_handle, data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ /* TODO implement */ /* Test error cases */ result = libesedb_catalog_read_file_io_handle( NULL, file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up file IO handle */ result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libesedb_catalog_free( &catalog, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } if( catalog != NULL ) { libesedb_catalog_free( &catalog, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_catalog_get_number_of_table_definitions function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_get_number_of_table_definitions( libesedb_catalog_t *catalog ) { libcerror_error_t *error = NULL; int number_of_table_definitions = 0; int result = 0; /* Test regular cases */ result = libesedb_catalog_get_number_of_table_definitions( catalog, &number_of_table_definitions, &error ); ESEDB_TEST_ASSERT_NOT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_get_number_of_table_definitions( NULL, &number_of_table_definitions, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_number_of_table_definitions( catalog, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_get_table_definition_by_index function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_get_table_definition_by_index( libesedb_catalog_t *catalog ) { libcerror_error_t *error = NULL; libesedb_table_definition_t *table_definition = NULL; int result = 0; /* Test regular cases */ /* TODO implement */ /* Test error cases */ result = libesedb_catalog_get_table_definition_by_index( NULL, 0, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_index( catalog, 0, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_get_table_definition_by_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_get_table_definition_by_name( libesedb_catalog_t *catalog ) { libcdata_array_t *table_definition_array = NULL; libcerror_error_t *error = NULL; libesedb_table_definition_t *table_definition = NULL; char *name = "test"; int result = 0; /* Test regular cases */ result = libesedb_catalog_get_table_definition_by_name( catalog, (uint8_t *) name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_get_table_definition_by_name( NULL, (uint8_t *) name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); table_definition_array = catalog->table_definition_array; catalog->table_definition_array = NULL; result = libesedb_catalog_get_table_definition_by_name( catalog, (uint8_t *) name, 4, &table_definition, &error ); catalog->table_definition_array = table_definition_array; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_name( catalog, NULL, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_name( catalog, (uint8_t *) name, (size_t) SSIZE_MAX + 1, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_name( catalog, (uint8_t *) name, 4, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_get_table_definition_by_utf8_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_get_table_definition_by_utf8_name( libesedb_catalog_t *catalog ) { uint8_t utf8_name[ 5 ] = { 't', 'e', 's', 't', 0 }; libcdata_array_t *table_definition_array = NULL; libcerror_error_t *error = NULL; libesedb_table_definition_t *table_definition = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_get_table_definition_by_utf8_name( catalog, utf8_name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_get_table_definition_by_utf8_name( NULL, utf8_name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); table_definition_array = catalog->table_definition_array; catalog->table_definition_array = NULL; result = libesedb_catalog_get_table_definition_by_utf8_name( catalog, utf8_name, 4, &table_definition, &error ); catalog->table_definition_array = table_definition_array; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf8_name( catalog, NULL, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf8_name( catalog, utf8_name, (size_t) SSIZE_MAX + 1, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf8_name( catalog, utf8_name, 4, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_catalog_get_table_definition_by_utf16_name function * Returns 1 if successful or 0 if not */ int esedb_test_catalog_get_table_definition_by_utf16_name( libesedb_catalog_t *catalog ) { uint16_t utf16_name[ 5 ] = { 't', 'e', 's', 't', 0 }; libcdata_array_t *table_definition_array = NULL; libcerror_error_t *error = NULL; libesedb_table_definition_t *table_definition = NULL; int result = 0; /* Test regular cases */ result = libesedb_catalog_get_table_definition_by_utf16_name( catalog, utf16_name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_catalog_get_table_definition_by_utf16_name( NULL, utf16_name, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); table_definition_array = catalog->table_definition_array; catalog->table_definition_array = NULL; result = libesedb_catalog_get_table_definition_by_utf16_name( catalog, utf16_name, 4, &table_definition, &error ); catalog->table_definition_array = table_definition_array; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf16_name( catalog, NULL, 4, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf16_name( catalog, utf16_name, (size_t) SSIZE_MAX + 1, &table_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_catalog_get_table_definition_by_utf16_name( catalog, utf16_name, 4, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) libcerror_error_t *error = NULL; libesedb_catalog_t *catalog = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_catalog_initialize", esedb_test_catalog_initialize ); ESEDB_TEST_RUN( "libesedb_catalog_free", esedb_test_catalog_free ); /* TODO add test for libesedb_catalog_read_value_data */ /* TODO add test for libesedb_catalog_read_values_from_page */ ESEDB_TEST_RUN( "libesedb_catalog_read_file_io_handle", esedb_test_catalog_read_file_io_handle ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->file_size = 16777216; io_handle->page_size = 4096; result = libesedb_catalog_initialize( &catalog, io_handle, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Run tests */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_get_number_of_table_definitions", esedb_test_catalog_get_number_of_table_definitions, catalog ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_get_table_definition_by_index", esedb_test_catalog_get_table_definition_by_index, catalog ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_get_table_definition_by_name", esedb_test_catalog_get_table_definition_by_name, catalog ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_get_table_definition_by_utf8_name", esedb_test_catalog_get_table_definition_by_utf8_name, catalog ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_catalog_get_table_definition_by_utf16_name", esedb_test_catalog_get_table_definition_by_utf16_name, catalog ); /* Clean up */ result = libesedb_catalog_free( &catalog, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog", catalog ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( catalog != NULL ) { libesedb_catalog_free( &catalog, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/esedb_test_libcdata.h0000644000175000017500000000302214610727254021644 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBCDATA_H ) #define _ESEDB_TEST_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _ESEDB_TEST_LIBCDATA_H ) */ libesedb-20240420/tests/esedb_test_memory.c0000644000175000017500000001113414610727254021407 0ustar00lordyestalordyesta/* * Memory allocation functions for testing * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) #define __USE_GNU #include #undef __USE_GNU #endif #include "esedb_test_memory.h" #if defined( HAVE_ESEDB_TEST_MEMORY ) static void *(*esedb_test_real_malloc)(size_t) = NULL; static void *(*esedb_test_real_memcpy)(void *, const void *, size_t) = NULL; static void *(*esedb_test_real_memset)(void *, int, size_t) = NULL; static void *(*esedb_test_real_realloc)(void *, size_t) = NULL; int esedb_test_malloc_attempts_before_fail = -1; int esedb_test_memcpy_attempts_before_fail = -1; int esedb_test_memset_attempts_before_fail = -1; int esedb_test_realloc_attempts_before_fail = -1; /* Custom malloc for testing memory error cases * Note this function might fail if compiled with optimation * Returns a pointer to newly allocated data or NULL */ void *malloc( size_t size ) { void *ptr = NULL; if( esedb_test_real_malloc == NULL ) { esedb_test_real_malloc = dlsym( RTLD_NEXT, "malloc" ); } if( esedb_test_malloc_attempts_before_fail == 0 ) { esedb_test_malloc_attempts_before_fail = -1; return( NULL ); } else if( esedb_test_malloc_attempts_before_fail > 0 ) { esedb_test_malloc_attempts_before_fail--; } ptr = esedb_test_real_malloc( size ); return( ptr ); } /* Custom memcpy for testing memory error cases * Note this function might fail if compiled with optimation and as a shared libary * Returns a pointer to newly allocated data or NULL */ void *memcpy( void *destination, const void *source, size_t size ) { if( esedb_test_real_memcpy == NULL ) { esedb_test_real_memcpy = dlsym( RTLD_NEXT, "memcpy" ); } if( esedb_test_memcpy_attempts_before_fail == 0 ) { esedb_test_memcpy_attempts_before_fail = -1; return( NULL ); } else if( esedb_test_memcpy_attempts_before_fail > 0 ) { esedb_test_memcpy_attempts_before_fail--; } destination = esedb_test_real_memcpy( destination, source, size ); return( destination ); } /* Custom memset for testing memory error cases * Note this function might fail if compiled with optimation and as a shared libary * Returns a pointer to newly allocated data or NULL */ void *memset( void *ptr, int constant, size_t size ) { if( esedb_test_real_memset == NULL ) { esedb_test_real_memset = dlsym( RTLD_NEXT, "memset" ); } if( esedb_test_memset_attempts_before_fail == 0 ) { esedb_test_memset_attempts_before_fail = -1; return( NULL ); } else if( esedb_test_memset_attempts_before_fail > 0 ) { esedb_test_memset_attempts_before_fail--; } ptr = esedb_test_real_memset( ptr, constant, size ); return( ptr ); } /* Custom realloc for testing memory error cases * Note this function might fail if compiled with optimation * Returns a pointer to reallocated data or NULL */ void *realloc( void *ptr, size_t size ) { if( esedb_test_real_realloc == NULL ) { esedb_test_real_realloc = dlsym( RTLD_NEXT, "realloc" ); } if( esedb_test_realloc_attempts_before_fail == 0 ) { esedb_test_realloc_attempts_before_fail = -1; return( NULL ); } else if( esedb_test_realloc_attempts_before_fail > 0 ) { esedb_test_realloc_attempts_before_fail--; } ptr = esedb_test_real_realloc( ptr, size ); return( ptr ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ libesedb-20240420/tests/test_esedbexport.sh0000755000175000017500000001122614610730245021450 0ustar00lordyestalordyesta#!/usr/bin/env bash # Export tool testing script # # Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; PROFILES=("esedbexport"); OPTIONS_PER_PROFILE=(""); OPTION_SETS=(); INPUT_GLOB="*"; test_callback() { local TMPDIR=$1; local TEST_SET_DIRECTORY=$2; local TEST_OUTPUT=$3; local TEST_EXECUTABLE=$4; local TEST_INPUT=$5; shift 5; local ARGUMENTS=$@; TEST_EXECUTABLE=$( readlink_f "${TEST_EXECUTABLE}" ); INPUT_FILE_FULL_PATH=$( readlink_f "${INPUT_FILE}" ); (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} ${OPTIONS[@]}); local RESULT=$?; local TEST_LOG="${TEST_OUTPUT}.log"; if test "${PLATFORM}" = "Darwin"; then (cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5 {} \; | sort -k 2 > "${TEST_LOG}"); else # md5sum prefixes the output of a filename with an escape character (\) with \ (cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5sum {} \; | sed 's/^\\//' | sort -k 2 > "${TEST_LOG}"); fi local TEST_RESULTS="${TMPDIR}/${TEST_LOG}"; local STORED_TEST_RESULTS="${TEST_SET_DIRECTORY}/${TEST_LOG}.gz"; if test -f "${STORED_TEST_RESULTS}"; then # Using zcat here since zdiff has issues on Mac OS X. # Note that zcat on Mac OS X requires the input from stdin. zcat < "${STORED_TEST_RESULTS}" | diff "${TEST_RESULTS}" -; RESULT=$?; else gzip "${TEST_RESULTS}"; mv "${TEST_RESULTS}.gz" ${TEST_SET_DIRECTORY}; fi return ${RESULT}; } if test -n "${SKIP_TOOLS_TESTS}" || test -n "${SKIP_TOOLS_END_TO_END_TESTS}"; then exit ${EXIT_IGNORE}; fi TEST_EXECUTABLE="../esedbtools/esedbexport"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="../esedbtools/esedbexport.exe"; fi if ! test -x "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; exit ${EXIT_FAILURE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi PLATFORM=`uname -s`; source ${TEST_RUNNER}; assert_availability_binary find; if test "${PLATFORM}" = "Darwin"; then assert_availability_binary md5; else assert_availability_binary md5sum; fi if ! test -d "input"; then echo "Test input directory not found."; return ${EXIT_IGNORE}; fi RESULT=`ls input/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory"; return ${EXIT_IGNORE}; fi for PROFILE_INDEX in ${!PROFILES[*]}; do TEST_PROFILE=${PROFILES[${PROFILE_INDEX}]}; TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "${TEST_PROFILE}"); IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); IFS=" " read -a PROFILE_OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]}; RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in input/*; do if ! test -d "${TEST_SET_INPUT_DIRECTORY}"; then continue; fi TEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`; if check_for_test_set_in_ignore_list "${TEST_SET}" "${IGNORE_LIST}"; then continue; fi TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; if test -f "${TEST_SET_DIRECTORY}/files"; then IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi for INPUT_FILE in "${INPUT_FILES[@]}"; do TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; do TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); if test -f ${TEST_DATA_OPTION_FILE}; then TESTED_WITH_OPTIONS=1; IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); run_test_on_input_file "${TEST_SET_DIRECTORY}" "esedbexport" "with_callback" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi fi done if test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "esedbexport" "with_callback" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done # Ignore failures due to corrupted data. if test "${TEST_SET}" = "corrupted"; then RESULT=${EXIT_SUCCESS}; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done done exit ${RESULT}; libesedb-20240420/tests/test_esedbinfo.sh0000755000175000017500000000633114610727253021070 0ustar00lordyestalordyesta#!/usr/bin/env bash # Info tool testing script # # Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; PROFILES=("esedbinfo"); OPTIONS_PER_PROFILE=(""); OPTION_SETS=(); INPUT_GLOB="*"; if test -n "${SKIP_TOOLS_TESTS}" || test -n "${SKIP_TOOLS_END_TO_END_TESTS}"; then exit ${EXIT_IGNORE}; fi TEST_EXECUTABLE="../esedbtools/esedbinfo"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="../esedbtools/esedbinfo.exe"; fi if ! test -x "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; exit ${EXIT_FAILURE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; if ! test -d "input"; then echo "Test input directory not found."; exit ${EXIT_IGNORE}; fi RESULT=`ls input/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory"; exit ${EXIT_IGNORE}; fi for PROFILE_INDEX in ${!PROFILES[*]}; do TEST_PROFILE=${PROFILES[${PROFILE_INDEX}]}; TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "${TEST_PROFILE}"); IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); IFS=" " read -a PROFILE_OPTIONS <<< ${OPTIONS_PER_PROFILE[${PROFILE_INDEX}]}; RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in input/*; do if ! test -d "${TEST_SET_INPUT_DIRECTORY}"; then continue; fi TEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`; if check_for_test_set_in_ignore_list "${TEST_SET}" "${IGNORE_LIST}"; then continue; fi TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; if test -f "${TEST_SET_DIRECTORY}/files"; then IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi for INPUT_FILE in "${INPUT_FILES[@]}"; do TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; do TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); if test -f ${TEST_DATA_OPTION_FILE}; then TESTED_WITH_OPTIONS=1; IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); run_test_on_input_file "${TEST_SET_DIRECTORY}" "esedbinfo" "with_stdout_reference" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}" "${OPTIONS[@]}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi fi done if test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "esedbinfo" "with_stdout_reference" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${PROFILE_OPTIONS[@]}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done # Ignore failures due to corrupted data. if test "${TEST_SET}" = "corrupted"; then RESULT=${EXIT_SUCCESS}; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done done exit ${RESULT}; libesedb-20240420/tests/esedb_test_tools_output.c0000644000175000017500000000461714610727254022667 0ustar00lordyestalordyesta/* * Tools output functions test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_IO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_macros.h" #include "esedb_test_unused.h" #include "../esedbtools/esedbtools_output.h" /* Tests the esedbtools_output_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_tools_output_initialize( void ) { libcerror_error_t *error = NULL; int result = 0; result = esedbtools_output_initialize( _IONBF, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) ESEDB_TEST_RUN( "esedbtools_output_initialize", esedb_test_tools_output_initialize ) /* TODO add tests for esedbtools_output_copyright_fprint */ /* TODO add tests for esedbtools_output_version_fprint */ /* TODO add tests for esedbtools_output_version_detailed_fprint */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_column_type.c0000644000175000017500000000571114610727556022446 0ustar00lordyestalordyesta/* * Library column_type type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_column_type.h" #if defined( HAVE_DEBUG_OUTPUT ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_column_type_get_identifier function * Returns 1 if successful or 0 if not */ int esedb_test_column_type_get_identifier( void ) { const char *result = NULL; /* Test regular cases */ result = libesedb_column_type_get_identifier( 0x0000 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "result", result ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_column_type_get_description function * Returns 1 if successful or 0 if not */ int esedb_test_column_type_get_description( void ) { const char *result = NULL; /* Test regular cases */ result = libesedb_column_type_get_description( 0x0000 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "result", result ); return( 1 ); on_error: return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( HAVE_DEBUG_OUTPUT ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_column_type_get_identifier", esedb_test_column_type_get_identifier ); ESEDB_TEST_RUN( "libesedb_column_type_get_description", esedb_test_column_type_get_description ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_block_tree_node.c0000644000175000017500000001512714610727556023230 0ustar00lordyestalordyesta/* * Library block_tree_node type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_block_tree_node.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_block_tree_node_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_node_initialize( void ) { libcerror_error_t *error = NULL; libesedb_block_tree_node_t *block_tree_node = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test block_tree_node initialization */ result = libesedb_block_tree_node_initialize( &block_tree_node, 0, 1024, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_tree_node", block_tree_node ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_tree_node_free( &block_tree_node, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree_node", block_tree_node ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_block_tree_node_initialize( NULL, 0, 1024, 256, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); block_tree_node = (libesedb_block_tree_node_t *) 0x12345678UL; result = libesedb_block_tree_node_initialize( &block_tree_node, 0, 1024, 256, &error ); block_tree_node = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_block_tree_node_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_block_tree_node_initialize( &block_tree_node, 0, 1024, 256, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( block_tree_node != NULL ) { libesedb_block_tree_node_free( &block_tree_node, NULL, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree_node", block_tree_node ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_block_tree_node_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_block_tree_node_initialize( &block_tree_node, 0, 1024, 256, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( block_tree_node != NULL ) { libesedb_block_tree_node_free( &block_tree_node, NULL, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree_node", block_tree_node ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( block_tree_node != NULL ) { libesedb_block_tree_node_free( &block_tree_node, NULL, NULL ); } return( 0 ); } /* Tests the libesedb_block_tree_node_free function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_node_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_block_tree_node_free( NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_block_tree_node_initialize", esedb_test_block_tree_node_initialize ); ESEDB_TEST_RUN( "libesedb_block_tree_node_free", esedb_test_block_tree_node_free ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/test_runner.sh0000644000175000017500000010150714610727253020441 0ustar00lordyestalordyesta#!/usr/bin/env bash # Bash functions to run an executable for testing. # # Version: 20231119 # # When CHECK_WITH_ASAN is set to a non-empty value the test executable # is run with asan, otherwise it is run without. # # When CHECK_WITH_GDB is set to a non-empty value the test executable # is run with gdb, otherwise it is run without. # # When CHECK_WITH_STDERR is set to a non-empty value the test executable # is run with error output to stderr. # # When CHECK_WITH_VALGRIND is set to a non-empty value the test executable # is run with valgrind, otherwise it is run without. # # PYTHON is used to determine the Python interpreter. EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; # Checks the availability of a binary and exits if not available. # # Arguments: # a string containing the name of the binary # assert_availability_binary() { local BINARY=$1; which ${BINARY} > /dev/null 2>&1; if test $? -ne ${EXIT_SUCCESS}; then echo "Missing binary: ${BINARY}"; echo ""; exit ${EXIT_FAILURE}; fi } # Checks the availability of binaries and exits if not available. # # Globals: # CHECK_WITH_GDB # CHECK_WITH_VALGRIND # assert_availability_binaries() { assert_availability_binary cat; assert_availability_binary cut; assert_availability_binary diff; assert_availability_binary file; assert_availability_binary gzip; assert_availability_binary ls; assert_availability_binary readlink; assert_availability_binary sed; assert_availability_binary tr; assert_availability_binary uname; assert_availability_binary wc; assert_availability_binary zcat; if test -n "${CHECK_WITH_GDB}"; then assert_availability_binary gdb; elif test -n "${CHECK_WITH_VALGRIND}"; then assert_availability_binary valgrind; fi } # Checks if the test set is in the ignore list. # # Arguments: # a string containing the test set # a string containing space separated ignore list # # Returns: # an integer containing the exit status to indicate the input directory # was found in the ignore list. # check_for_test_set_in_ignore_list() { local TEST_SET=$1; local IGNORE_LIST=$2; local IFS=" "; for LIST_ELEMENT in ${IGNORE_LIST}; do if test "${LIST_ELEMENT}" = "${TEST_SET}"; then return ${EXIT_SUCCESS}; fi done return ${EXIT_FAILURE}; } # Checks if the input directory is in the ignore list. # # Arguments: # a string containing the path of the test input directory # a string containing space separated ignore list # # Returns: # an integer containing the exit status to indicate the input directory # was found in the ignore list. # check_for_directory_in_ignore_list() { local INPUT_DIRECTORY=$1; local IGNORE_LIST=$2; local INPUT_BASENAME=`basename ${INPUT_DIRECTORY}`; local IFS=" "; for LIST_ELEMENT in ${IGNORE_LIST}; do if test "${LIST_ELEMENT}" = "${INPUT_BASENAME}"; then return ${EXIT_SUCCESS}; fi done return ${EXIT_FAILURE}; } # Searches for the binary variant of the executable in case the test executable # refers to a libtool shell script. # # Arguments: # a string containing the path of the test executable # # Returns: # a string containing the path of the binary variant of the test executable # find_binary_executable() { local TEST_EXECUTABLE=$1; TEST_EXECUTABLE=$( readlink_f "${TEST_EXECUTABLE}" ); # Note that the behavior of `file -bi` is not helpful on Mac OS X. local EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`; # Check if the test executable is a libtool shell script. # Linux: POSIX shell script, ASCII text executable, with very long lines # Mac OS X: POSIX shell script text executable echo "${EXECUTABLE_TYPE}" | grep "POSIX shell script" > /dev/null 2>&1; RESULT=$?; if test ${RESULT} -eq ${EXIT_SUCCESS}; then local TEST_EXECUTABLE_BASENAME=`basename ${TEST_EXECUTABLE}`; local TEST_EXECUTABLE_DIRNAME=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE="${TEST_EXECUTABLE_DIRNAME}/.libs/${TEST_EXECUTABLE_BASENAME}"; if test -x ${TEST_EXECUTABLE}; then # Note that the behavior of `file -bi` is not helpful on Mac OS X. EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`; # Linux: ELF 64-bit LSB executable, x86-64, ... # Mac OS X: Mach-O 64-bit executable x86_64 echo "${EXECUTABLE_TYPE}" | grep "executable" > /dev/null 2>&1; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then echo "Invalid test executable: ${TEST_EXECUTABLE}"; exit ${EXIT_FAILURE}; fi fi fi echo ${TEST_EXECUTABLE}; } # Searches for the path to the binary variant of the library. # # Arguments: # a string containing the path of the test executable # # Returns: # a string containing the path of the binary variant of the library. # find_binary_library_path() { local TEST_EXECUTABLE=$1; local LIBRARY_NAME=`dirname ${TEST_EXECUTABLE}`; local NAME=`basename ${LIBRARY_NAME}`; if test ${NAME} = ".libs"; then LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; NAME=`basename ${LIBRARY_NAME}`; fi if test ${NAME} = "tests"; then LIBRARY_NAME=`dirname ${LIBRARY_NAME}`; NAME=`basename ${LIBRARY_NAME}`; fi echo ${LIBRARY_NAME} | grep 'tools' > /dev/null 2>&1; if test $? -eq ${EXIT_SUCCESS}; then LIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/\(.*\)tools$/lib\1/'`; else LIBRARY_NAME=`basename ${LIBRARY_NAME} | sed 's/^py//' | sed 's/^\([^_]*\)_test_.*$/lib\1/'`; fi TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; local LIBRARY_PATH="${TEST_EXECUTABLE}/${LIBRARY_NAME}/.libs"; if ! test -d "${LIBRARY_PATH}"; then LIBRARY_PATH="../${LIBRARY_NAME}/.libs"; fi echo "${LIBRARY_PATH}"; } # Searches for the path to the binary variant of the Python module # # Arguments: # a string containing the path of the test executable # # Returns: # a string containing the path of the binary variant of the Python module # find_binary_python_module_path() { local TEST_EXECUTABLE=$1; local PYTHON_MODULE_NAME=`basename ${TEST_EXECUTABLE} | sed 's/^py\(.*\)_test_.*$/py\1/'`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; TEST_EXECUTABLE=`dirname ${TEST_EXECUTABLE}`; local PYTHON_MODULE_PATH="${TEST_EXECUTABLE}/${PYTHON_MODULE_NAME}/.libs"; if ! test -d "${PYTHON_MODULE_PATH}"; then PYTHON_MODULE_PATH="../${PYTHON_MODULE_NAME}/.libs"; fi echo "${PYTHON_MODULE_PATH}"; } # Determines the test data option file. # # Arguments: # a string containing the path of the test set directory # a string containing the path of the test input file # a string containing the name of the test data option set # # Returns: # a string containing the test input files # get_test_data_option_file() { local TEST_SET_DIRECTORY=$1; local INPUT_FILE=$2; local OPTION_SET=$3; local INPUT_NAME=`basename "${INPUT_FILE}"`; local TEST_DATA_OPTION_FILE="${TEST_SET_DIRECTORY}/${INPUT_NAME}.${OPTION_SET}"; echo "${TEST_DATA_OPTION_FILE}"; } # Determines the test profile directory. # The directory is created if it does not exist. # # Arguments: # a string containing the path of the test input directory # a string containing the name of the test profile # # Returns: # a string containing the path of the test profile directory # get_test_profile_directory() { local TEST_INPUT_DIRECTORY=$1; local TEST_PROFILE=$2; local TEST_PROFILE_DIRECTORY="${TEST_INPUT_DIRECTORY}/.${TEST_PROFILE}"; if ! test -d "${TEST_PROFILE_DIRECTORY}"; then mkdir "${TEST_PROFILE_DIRECTORY}"; fi echo "${TEST_PROFILE_DIRECTORY}"; } # Determines the test set directory. # The directory is created if it does not exist. # # Arguments: # a string containing the path of the test profile directory # a string containing the path of the test set input directory # # Returns: # a string containing the path of the test set directory # get_test_set_directory() { local TEST_PROFILE_DIRECTORY=$1; local TEST_SET_INPUT_DIRECTORY=$2; local TEST_SET=`basename ${TEST_SET_INPUT_DIRECTORY}`; local TEST_SET_DIRECTORY="${TEST_PROFILE_DIRECTORY}/${TEST_SET}"; if ! test -d "${TEST_SET_DIRECTORY}"; then mkdir "${TEST_SET_DIRECTORY}"; fi echo "${TEST_SET_DIRECTORY}"; } # Provides a cross-platform variant of "readlink -f" # # Arguments: # a string containing a path # # Returns: # a string containing the path with all symbolic links resolved # readlink_f() { local TARGET="$1" if test -f "${TARGET}"; then while test -L "${TARGET}"; do TARGET=`readlink "${TARGET}"`; done fi local BASENAME=`basename "${TARGET}"`; local DIRNAME=`dirname "${TARGET}"`; DIRNAME=`(cd "${DIRNAME}" && pwd -P)`; echo "${DIRNAME}/${BASENAME}"; } # Reads the test profile ignore file if it exists. # # Arguments: # a string containing the path of the test profile directory # # Returns: # a string containing a space separated ignore list # read_ignore_list() { local TEST_PROFILE_DIRECTORY=$1; local IGNORE_FILE="${TEST_PROFILE_DIRECTORY}/ignore"; local IGNORE_LIST=""; if test -f "${IGNORE_FILE}"; then IGNORE_LIST=`cat ${IGNORE_FILE} | sed '/^#/d' | tr '\n' ' '`; fi echo ${IGNORE_LIST}; } # Reads a test data option file. # # Arguments: # a string containing the path of the test set directory # a string containing the path of the test input file # a string containing the name of the test data option set # # Returns: # a string containing the test data specific options # read_test_data_option_file() { local TEST_SET_DIRECTORY=$1; local INPUT_FILE=$2; local OPTION_SET=$3; local TEST_DATA_OPTION_FILE="${INPUT_FILE}.${OPTION_SET}"; if ! test -f "${TEST_DATA_OPTION_FILE}"; then TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); fi local OPTIONS_STRING=`head -n 1 "${TEST_DATA_OPTION_FILE}" | sed 's/[\r\n]*$//'`; if test "${OPTIONS_STRING}" = "# libyal test data options"; then OPTIONS_STRING=`tail -n +2 "${TEST_DATA_OPTION_FILE}" | sed 's/^offset=/-o/;s/^password=/-p/;s/^recovery_password=/-r/;s/^startup_key=/-s/;s/virtual_address=/-v/' | tr '\n' ' '`; fi echo "${OPTIONS_STRING}"; } # Runs the test with optional arguments. # # Globals: # CHECK_WITH_ASAN # CHECK_WITH_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND # # Arguments: # a string containing the test description # a string containing the path of the test executable # an array containing the arguments for the test executable # # Returns: # an integer containg the exit status of the test executable # run_test_with_arguments() { local TEST_DESCRIPTION=$1; local TEST_EXECUTABLE=$2; shift 2; local ARGUMENTS=("$@"); if ! test -f "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi local PLATFORM=`uname -s | sed 's/-.*$//'`; # Note that the behavior of `file -bi` is not helpful on Mac OS X. local EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`; # Check if the test executable is a Python script. # Linux: Python script, ASCII text executable # Mac OS X: a python script text executable echo "${EXECUTABLE_TYPE}" | grep -i "python script" > /dev/null 2>&1; local IS_PYTHON_SCRIPT=$?; if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON}; then local PYTHON=`which python 2> /dev/null`; if ! test -x ${PYTHON}; then echo "Missing executable: ${PYTHON}"; exit ${EXIT_FAILURE}; fi fi local RESULT=0; if test -n "${CHECK_WITH_ASAN}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); local LSAN_SUPPRESSIONS="lsan.suppressions"; if ! test -f ${LSAN_SUPPRESSIONS}; then LSAN_SUPPRESSIONS="../lsan.suppressions"; fi if test "${PLATFORM}" = "Darwin"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi else local CONFIG_LOG="../config.log"; if ! test -f ${CONFIG_LOG}; then CONFIG_LOG="../../config.log"; fi local CC=`cat ${CONFIG_LOG} | grep -e "^CC=" | sed "s/CC='\\(.*\\)'/\1/"`; local LIBASAN=""; if test -z ${CC} || test ${CC} != "clang"; then local LDCONFIG=`which ldconfig 2> /dev/null`; if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; then LDCONFIG="/sbin/ldconfig"; fi if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; then echo "Missing binary: ldconfig"; echo ""; exit ${EXIT_FAILURE}; fi LIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`; if ! test -f ${LIBASAN}; then echo "Missing library: ${BINARY}"; echo ""; exit ${EXIT_FAILURE}; fi fi if test ${IS_PYTHON_SCRIPT} -eq 0; then LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi fi elif test -n "${CHECK_WITH_GDB}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); if test "${PLATFORM}" = "Darwin"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi else if test ${IS_PYTHON_SCRIPT} -eq 0; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi fi elif test -n "${CHECK_WITH_VALGRIND}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); local VALGRIND_LOG="valgrind.log-$$"; local VALGRIND_OPTIONS=("--tool=memcheck" "--leak-check=full" "--show-leak-kinds=definite,indirect,possible" "--track-origins=yes" "--log-file=${VALGRIND_LOG}"); if test "${PLATFORM}" = "Darwin"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi else if test ${IS_PYTHON_SCRIPT} -eq 0; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; fi fi if test ${RESULT} -eq ${EXIT_SUCCESS}; then grep "All heap blocks were freed -- no leaks are possible" ${VALGRIND_LOG} > /dev/null 2>&1; if test $? -ne ${EXIT_SUCCESS}; then # Ignore "still reachable" # Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost grep "definitely lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_DIRECTLY_LOST=$?; grep "indirectly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_INDIRECTLY_LOST=$?; grep "possibly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_POSSIBLY_LOST=$?; grep "suppressed: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_SUPPRESSED=$?; if test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS}; then echo "Memory leakage detected."; cat ${VALGRIND_LOG}; RESULT=${EXIT_FAILURE}; fi fi # Detect valgrind warnings. local NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`; if test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22; then echo "Unsupported number of lines: ${NUMBER_OF_LINES}"; cat ${VALGRIND_LOG}; RESULT=${EXIT_FAILURE}; fi fi rm -f ${VALGRIND_LOG}; elif test ${IS_PYTHON_SCRIPT} -eq 0; then if ! test -f "${TEST_EXECUTABLE}"; then echo "Invalid test Python script: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); if test "${PLATFORM}" = "Darwin"; then if test -n "${CHECK_WITH_STDERR}"; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} 2> /dev/null; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test -n "${CHECK_WITH_STDERR}"; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} 2> /dev/null; RESULT=$?; fi else if test -n "${CHECK_WITH_STDERR}"; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} 2> /dev/null; RESULT=$?; fi fi else if ! test -x "${TEST_EXECUTABLE}"; then echo "Invalid test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi if test -n "${CHECK_WITH_STDERR}"; then ${TEST_EXECUTABLE} ${ARGUMENTS[@]}; RESULT=$?; else ${TEST_EXECUTABLE} ${ARGUMENTS[@]} 2> /dev/null; RESULT=$?; fi fi if test -n "${TEST_DESCRIPTION}"; then echo -n "${TEST_DESCRIPTION}"; if test ${RESULT} -ne ${EXIT_SUCCESS}; then echo " (FAIL)"; else echo " (PASS)"; fi fi return ${RESULT}; } # Runs the test with an input file and optional arguments. # # Globals: # CHECK_WITH_ASAN # CHECK_WITH_GDB # CHECK_WITH_STDERR # CHECK_WITH_VALGRIND # # Arguments: # a string containing the path of the test executable # a string containing the path of the test input file # an array containing the arguments for the test executable # # Returns: # an integer containg the exit status of the test executable # run_test_with_input_and_arguments() { local TEST_EXECUTABLE=$1; local INPUT_FILE=$2; shift 2; local ARGUMENTS=("$@"); if ! test -f "${TEST_EXECUTABLE}"; then echo "Missing test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi local PLATFORM=`uname -s | sed 's/-.*$//'`; # Note that the behavior of `file -bi` is not helpful on Mac OS X. local EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`; # Check if the test executable is a Python script. # Linux: Python script, ASCII text executable # Mac OS X: a python script text executable echo "${EXECUTABLE_TYPE}" | grep -i "python script" > /dev/null 2>&1; local IS_PYTHON_SCRIPT=$?; if test ${IS_PYTHON_SCRIPT} -eq 0 && test -z ${PYTHON}; then local PYTHON=`which python 2> /dev/null`; if ! test -x ${PYTHON}; then echo "Missing executable: ${PYTHON}"; exit ${EXIT_FAILURE}; fi fi local RESULT=0; if test -n "${CHECK_WITH_ASAN}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); local LSAN_SUPPRESSIONS="lsan.suppressions"; if ! test -f ${LSAN_SUPPRESSIONS}; then LSAN_SUPPRESSIONS="../lsan.suppressions"; fi if test "${PLATFORM}" = "Darwin"; then # TODO DYLD_INSERT_LIBRARIES=/Library/Developer/CommandLineTools/usr/lib/clang/8.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib if test ${IS_PYTHON_SCRIPT} -eq 0; then LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi else local CONFIG_LOG="../config.log"; if ! test -f ${CONFIG_LOG}; then CONFIG_LOG="../../config.log"; fi local CC=`cat ${CONFIG_LOG} | grep -e "^CC=" | sed "s/CC='\\(.*\\)'/\1/"`; local LIBASAN=""; if test -z ${CC} || test ${CC} != "clang"; then local LDCONFIG=`which ldconfig 2> /dev/null`; if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; then LDCONFIG="/sbin/ldconfig"; fi if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; then echo "Missing binary: ldconfig"; echo ""; exit ${EXIT_FAILURE}; fi LIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`; if ! test -f ${LIBASAN}; then echo "Missing library: ${BINARY}"; echo ""; exit ${EXIT_FAILURE}; fi fi if test ${IS_PYTHON_SCRIPT} -eq 0; then LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi fi elif test -n "${CHECK_WITH_GDB}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); if test "${PLATFORM}" = "Darwin"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi else if test ${IS_PYTHON_SCRIPT} -eq 0; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi fi elif test -n "${CHECK_WITH_VALGRIND}"; then local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); local VALGRIND_LOG="valgrind.log-$$"; local VALGRIND_OPTIONS=("--tool=memcheck" "--leak-check=full" "--show-leak-kinds=definite,indirect,possible" "--track-origins=yes" "--log-file=${VALGRIND_LOG}"); if test "${PLATFORM}" = "Darwin"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test ${IS_PYTHON_SCRIPT} -eq 0; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi else if test ${IS_PYTHON_SCRIPT} -eq 0; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; fi fi if test ${RESULT} -eq ${EXIT_SUCCESS}; then grep "All heap blocks were freed -- no leaks are possible" ${VALGRIND_LOG} > /dev/null 2>&1; if test $? -ne ${EXIT_SUCCESS}; then # Ignore "still reachable" # Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost grep "definitely lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_DIRECTLY_LOST=$?; grep "indirectly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_INDIRECTLY_LOST=$?; grep "possibly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_POSSIBLY_LOST=$?; grep "suppressed: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; RESULT_SUPPRESSED=$?; if test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS}; then echo "Memory leakage detected."; cat ${VALGRIND_LOG}; RESULT=${EXIT_FAILURE}; fi fi # Detect valgrind warnings. local NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`; if test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22; then echo "Unsupported number of lines: ${NUMBER_OF_LINES}"; cat ${VALGRIND_LOG}; RESULT=${EXIT_FAILURE}; fi fi rm -f ${VALGRIND_LOG}; elif test ${IS_PYTHON_SCRIPT} -eq 0; then if ! test -f "${TEST_EXECUTABLE}"; then echo "Invalid test Python script: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); if test "${PLATFORM}" = "Darwin"; then if test -n "${CHECK_WITH_STDERR}"; then DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}" 2> /dev/null; RESULT=$?; fi elif test "${PLATFORM}" = "CYGWIN_NT"; then if test -n "${CHECK_WITH_STDERR}"; then PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}" 2> /dev/null; RESULT=$?; fi else if test -n "${CHECK_WITH_STDERR}"; then LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}" 2> /dev/null; RESULT=$?; fi fi else if ! test -x "${TEST_EXECUTABLE}"; then echo "Invalid test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi if test -n "${CHECK_WITH_STDERR}"; then ${TEST_EXECUTABLE} ${ARGUMENTS[@]} "${INPUT_FILE}"; RESULT=$?; else ${TEST_EXECUTABLE} ${ARGUMENTS[@]} "${INPUT_FILE}" 2> /dev/null; RESULT=$?; fi fi return ${RESULT}; } # Runs the test on the input file. # # Note that this function is not intended to be directly invoked # from outside the test runner script. # # Arguments: # a string containing the path of the test set directory # a string containing the description of the test # a string containing the test mode # a string containing the name of the test data option set # a string containing the path of the test executable # a string containing the path of the test input file # an array containing the arguments for the test executable # # Returns: # an integer containg the exit status of the test executable # run_test_on_input_file() { local TEST_SET_DIRECTORY=$1; local TEST_DESCRIPTION=$2; local TEST_MODE=$3; local OPTION_SET=$4; local TEST_EXECUTABLE=$5; local INPUT_FILE=$6; shift 6; local ARGUMENTS=("$@"); local INPUT_NAME=`basename "${INPUT_FILE}"`; local TEST_OUTPUT="${INPUT_NAME}"; if test -n "${OPTION_SET}"; then TEST_OUTPUT="${INPUT_NAME}-${OPTION_SET}"; fi local TMPDIR="tmp$$"; local RESULT=0; rm -rf ${TMPDIR}; mkdir ${TMPDIR}; if test "${TEST_MODE}" = "with_callback"; then test_callback "${TMPDIR}" "${TEST_SET_DIRECTORY}" "${TEST_OUTPUT}" "${TEST_EXECUTABLE}" "${TEST_INPUT}" ${ARGUMENTS[@]}; RESULT=$?; elif test "${TEST_MODE}" = "with_stdout_reference"; then TEST_EXECUTABLE=$( readlink_f "${TEST_EXECUTABLE}" ); if ! test -x ${TEST_EXECUTABLE}; then echo "Invalid test executable: ${TEST_EXECUTABLE}"; echo ""; return ${EXIT_FAILURE}; fi local INPUT_FILE_FULL_PATH=$( readlink_f "${INPUT_FILE}" ); local TEST_LOG="${TEST_OUTPUT}.log"; (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} > "${TEST_LOG}"); RESULT=$?; # Compare output if test ran successfully. if test ${RESULT} -eq ${EXIT_SUCCESS}; then local TEST_RESULTS="${TMPDIR}/${TEST_LOG}"; local STORED_TEST_RESULTS="${TEST_SET_DIRECTORY}/${TEST_LOG}.gz"; # Strip header with version. sed -i'~' '1,2d' "${TEST_RESULTS}"; if test -f "${STORED_TEST_RESULTS}"; then # Using zcat here since zdiff has issues on Mac OS X. # Note that zcat on Mac OS X requires the input from stdin. zcat < "${STORED_TEST_RESULTS}" | diff "${TEST_RESULTS}" -; RESULT=$?; else gzip "${TEST_RESULTS}"; mv "${TEST_RESULTS}.gz" ${TEST_SET_DIRECTORY}; fi fi else run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]}; RESULT=$?; fi rm -rf ${TMPDIR}; if test -n "${TEST_DESCRIPTION}"; then ARGUMENTS=`echo "${ARGUMENTS[*]}" | tr '\n' ' ' | sed 's/[ ]\$//'`; if test -z "${ARGUMENTS}"; then echo -n "${TEST_DESCRIPTION} with input: ${INPUT_FILE}"; else echo -n "${TEST_DESCRIPTION} with options: '${ARGUMENTS}' and input: ${INPUT_FILE}"; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then echo " (FAIL)"; else echo " (PASS)"; fi fi return ${RESULT}; } libesedb-20240420/tests/esedb_test_unused.h0000644000175000017500000000301114610727254021402 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_UNUSED_H ) #define _ESEDB_TEST_UNUSED_H #include #if !defined( ESEDB_TEST_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define ESEDB_TEST_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define ESEDB_TEST_ATTRIBUTE_UNUSED #endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */ #endif /* !defined( ESEDB_TEST_ATTRIBUTE_UNUSED ) */ #if defined( _MSC_VER ) #define ESEDB_TEST_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define ESEDB_TEST_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif /* defined( _MSC_VER ) */ #endif /* !defined( _ESEDB_TEST_UNUSED_H ) */ libesedb-20240420/tests/esedb_test_database.c0000644000175000017500000001722214610727556021654 0ustar00lordyestalordyesta/* * Library database type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_database.h" #include "../libesedb/libesedb_io_handle.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_database_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_database_initialize( void ) { libcerror_error_t *error = NULL; libesedb_database_t *database = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 3; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->file_size = 16777216; io_handle->page_size = 4096; /* Test regular cases */ result = libesedb_database_initialize( &database, io_handle, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "database", database ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_database_free( &database, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "database", database ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_database_initialize( NULL, io_handle, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); database = (libesedb_database_t *) 0x12345678UL; result = libesedb_database_initialize( &database, io_handle, NULL, NULL, &error ); database = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_database_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_database_initialize( &database, io_handle, NULL, NULL, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( database != NULL ) { libesedb_database_free( &database, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "database", database ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_database_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_database_initialize( &database, io_handle, NULL, NULL, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( database != NULL ) { libesedb_database_free( &database, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "database", database ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( database != NULL ) { libesedb_database_free( &database, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_database_free function * Returns 1 if successful or 0 if not */ int esedb_test_database_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_database_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_database_read_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_database_read_file_io_handle( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_database_read_file_io_handle( NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_database_initialize", esedb_test_database_initialize ); ESEDB_TEST_RUN( "libesedb_database_free", esedb_test_database_free ); /* TODO add test for libesedb_database_read_values_from_page */ ESEDB_TEST_RUN( "libesedb_database_read_file_io_handle", esedb_test_database_read_file_io_handle ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_io_handle.c0000644000175000017500000001776514610727254022041 0ustar00lordyestalordyesta/* * Library io_handle type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_io_handle.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_io_handle_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_io_handle_initialize( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_io_handle_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = (libesedb_io_handle_t *) 0x12345678UL; result = libesedb_io_handle_initialize( &io_handle, &error ); io_handle = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_io_handle_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_io_handle_initialize( &io_handle, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_io_handle_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_io_handle_initialize( &io_handle, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_io_handle_free function * Returns 1 if successful or 0 if not */ int esedb_test_io_handle_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_io_handle_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_io_handle_clear function * Returns 1 if successful or 0 if not */ int esedb_test_io_handle_clear( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_io_handle_clear( io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_io_handle_clear( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test libesedb_io_handle_clear with memset failing */ esedb_test_memset_attempts_before_fail = 0; result = libesedb_io_handle_clear( io_handle, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_io_handle_initialize", esedb_test_io_handle_initialize ); ESEDB_TEST_RUN( "libesedb_io_handle_free", esedb_test_io_handle_free ); ESEDB_TEST_RUN( "libesedb_io_handle_clear", esedb_test_io_handle_clear ); /* TODO: add tests for libesedb_io_handle_set_pages_data_range */ /* TODO: add tests for libesedb_io_handle_read_page */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_file_header.c0000644000175000017500000004552114610727556022342 0ustar00lordyestalordyesta/* * Library file_header type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_file_header.h" uint8_t esedb_test_file_header_data1[ 668 ] = { 0xa0, 0xbc, 0x20, 0x0d, 0xef, 0xcd, 0xab, 0x89, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe7, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x7e, 0x06, 0x00, 0x25, 0x08, 0x15, 0x04, 0x01, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x49, 0x00, 0x94, 0x00, 0x3a, 0x01, 0x00, 0x00, 0x10, 0x2b, 0x0e, 0x0c, 0x09, 0x6d, 0x00, 0x00, 0x38, 0x14, 0x0e, 0x0c, 0x09, 0x6d, 0x00, 0x00, 0x16, 0x00, 0x2b, 0x00, 0x39, 0x01, 0x00, 0x00, 0x10, 0x2b, 0x0e, 0x0c, 0x09, 0x6d, 0x00, 0x00, 0x49, 0x00, 0x94, 0x00, 0x3a, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x77, 0x06, 0x00, 0x24, 0x08, 0x15, 0x04, 0x01, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_file_header_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_file_header_initialize( void ) { libcerror_error_t *error = NULL; libesedb_file_header_t *file_header = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_file_header_initialize( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_header_free( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_header_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); file_header = (libesedb_file_header_t *) 0x12345678UL; result = libesedb_file_header_initialize( &file_header, &error ); file_header = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_file_header_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_file_header_initialize( &file_header, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_file_header_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_file_header_initialize( &file_header, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } return( 0 ); } /* Tests the libesedb_file_header_free function * Returns 1 if successful or 0 if not */ int esedb_test_file_header_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_file_header_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_file_header_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_file_header_read_data( void ) { libcerror_error_t *error = NULL; libesedb_file_header_t *file_header = NULL; int result = 0; /* Initialize test */ result = libesedb_file_header_initialize( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, 668, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_header_read_data( NULL, esedb_test_file_header_data1, 668, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_header_read_data( file_header, NULL, 668, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) /* Test esedb_test_file_header_read_data with memcpy failing */ esedb_test_memcpy_attempts_before_fail = 0; result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, 668, &error ); if( esedb_test_memcpy_attempts_before_fail != -1 ) { esedb_test_memcpy_attempts_before_fail = -1; } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Test error case where signature is invalid */ byte_stream_copy_from_uint32_little_endian( &( esedb_test_file_header_data1[ 4 ] ), 0xffffffffUL ); result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, 668, &error ); byte_stream_copy_from_uint32_little_endian( &( esedb_test_file_header_data1[ 4 ] ), 0x89abcdefUL ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Test error case where checksum is invalid */ byte_stream_copy_from_uint32_little_endian( esedb_test_file_header_data1, 0xffffffffUL ); result = libesedb_file_header_read_data( file_header, esedb_test_file_header_data1, 668, &error ); byte_stream_copy_from_uint32_little_endian( esedb_test_file_header_data1, 0x0d20bca0UL ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_file_header_free( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } return( 0 ); } /* Tests the libesedb_file_header_read_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_file_header_read_file_io_handle( void ) { libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libesedb_file_header_t *file_header = NULL; int result = 0; /* Initialize test */ result = libesedb_file_header_initialize( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize file IO handle */ result = esedb_test_open_file_io_handle( &file_io_handle, esedb_test_file_header_data1, 668, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_file_header_read_file_io_handle( file_header, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_file_header_read_file_io_handle( NULL, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_file_header_read_file_io_handle( file_header, NULL, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up file IO handle */ result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test data too small */ result = esedb_test_open_file_io_handle( &file_io_handle, esedb_test_file_header_data1, 8, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_file_header_read_file_io_handle( file_header, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test data invalid */ result = esedb_test_open_file_io_handle( &file_io_handle, esedb_test_file_header_data1, 668, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); byte_stream_copy_from_uint32_little_endian( &( esedb_test_file_header_data1[ 4 ] ), 0xffffffffUL ); result = libesedb_file_header_read_file_io_handle( file_header, file_io_handle, 0, &error ); byte_stream_copy_from_uint32_little_endian( &( esedb_test_file_header_data1[ 4 ] ), 0x89abcdefUL ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libesedb_file_header_free( &file_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "file_header", file_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } if( file_header != NULL ) { libesedb_file_header_free( &file_header, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_file_header_initialize", esedb_test_file_header_initialize ); ESEDB_TEST_RUN( "libesedb_file_header_free", esedb_test_file_header_free ); ESEDB_TEST_RUN( "libesedb_file_header_read_data", esedb_test_file_header_read_data ); ESEDB_TEST_RUN( "libesedb_file_header_read_file_io_handle", esedb_test_file_header_read_file_io_handle ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_page_tree_value.c0000644000175000017500000002204714610727254023233 0ustar00lordyestalordyesta/* * Library page_tree_value type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_page_tree_value.h" uint8_t esedb_test_page_tree_value_data1[ 14 ] = { 0x08, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x12, 0x7f, 0x80, 0x02, 0x13, 0x00, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_tree_value_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_value_initialize( void ) { libcerror_error_t *error = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_page_tree_value_initialize( &page_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_value_free( &page_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_value_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page_tree_value = (libesedb_page_tree_value_t *) 0x12345678UL; result = libesedb_page_tree_value_initialize( &page_tree_value, &error ); page_tree_value = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_tree_value_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_tree_value_initialize( &page_tree_value, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_tree_value_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_tree_value_initialize( &page_tree_value, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } return( 0 ); } /* Tests the libesedb_page_tree_value_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_value_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_tree_value_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_page_tree_value_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_value_read_data( void ) { libcerror_error_t *error = NULL; libesedb_page_tree_value_t *page_tree_value = NULL; int result = 0; /* Initialize test */ result = libesedb_page_tree_value_initialize( &page_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_tree_value_read_data( page_tree_value, esedb_test_page_tree_value_data1, 14, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_value_read_data( NULL, esedb_test_page_tree_value_data1, 14, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_value_read_data( page_tree_value, NULL, 14, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_value_read_data( page_tree_value, esedb_test_page_tree_value_data1, (size_t) SSIZE_MAX + 1, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_value_read_data( page_tree_value, esedb_test_page_tree_value_data1, 0, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_tree_value_free( &page_tree_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_value", page_tree_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree_value != NULL ) { libesedb_page_tree_value_free( &page_tree_value, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_tree_value_initialize", esedb_test_page_tree_value_initialize ); ESEDB_TEST_RUN( "libesedb_page_tree_value_free", esedb_test_page_tree_value_free ); ESEDB_TEST_RUN( "libesedb_page_tree_value_read_data", esedb_test_page_tree_value_read_data ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_getopt.c0000644000175000017500000001066714610727254021413 0ustar00lordyestalordyesta/* * GetOpt functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_getopt.h" #include "esedb_test_libcnotify.h" #if !defined( HAVE_GETOPT ) /* The option index * Start with argument 1 (argument 0 is the program name) */ int optind = 1; /* The current option argument */ system_character_t *optarg = NULL; /* Value to indicate the current option */ system_integer_t optopt = 0; /* The next option in a group */ system_character_t *next_option = NULL; /* 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 */ system_integer_t esedb_test_getopt( int argument_count, system_character_t * const argument_values[], const system_character_t *options_string ) { system_character_t *argument_value = NULL; system_character_t *option_value = NULL; static char *function = "esedb_test_getopt"; size_t options_string_length = 0; if( next_option != NULL ) { argument_value = next_option; next_option = NULL; } else if( optind >= argument_count ) { return( (system_integer_t) -1 ); } else { argument_value = argument_values[ optind ]; /* Check if the argument value is not an empty string */ if( *argument_value == (system_character_t) '\0' ) { return( (system_integer_t) -1 ); } /* Check if the first character is a option marker '-' */ if( *argument_value != (system_character_t) '-' ) { return( (system_integer_t) -1 ); } argument_value++; /* Check if long options are provided '--' */ if( *argument_value == (system_character_t) '-' ) { optind++; return( (system_integer_t) -1 ); } } options_string_length = system_string_length( options_string ); optopt = *argument_value; option_value = 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 == (system_integer_t) ':' ) || ( option_value == NULL ) ) { if( *argument_value == (system_character_t) '\0' ) { optind++; } if( ( *options_string != (system_character_t) ':' ) && ( optopt != (system_integer_t) '?' ) ) { libcnotify_printf( "%s: no such option: %" PRIc_SYSTEM ".\n", function, optopt ); } return( (system_integer_t) '?' ); } option_value++; /* Check if no option argument is required */ if( *option_value != (system_character_t) ':' ) { optarg = NULL; if( *argument_value == (system_character_t) '\0' ) { optind++; } else { /* Multiple options are grouped */ next_option = argument_value; } } /* Check if the argument is right after the option flag with no space in between */ else if( *argument_value != (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( (system_integer_t) ':' ); } libcnotify_printf( "%s: option: %" PRIc_SYSTEM " requires an argument.\n", function, optopt ); return( (system_integer_t) '?' ); } optarg = argument_values[ optind ]; optind++; } return( optopt ); } #endif /* !defined( HAVE_GETOPT ) */ libesedb-20240420/tests/esedb_test_getopt.h0000644000175000017500000000342514610727254021412 0ustar00lordyestalordyesta/* * GetOpt functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_GETOPT_H ) #define _ESEDB_TEST_GETOPT_H #include #include /* 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 esedb_test_getopt( argument_count, argument_values, options_string ) \ getopt( argument_count, argument_values, options_string ) #else #if !defined( __CYGWIN__ ) extern int optind; extern system_character_t *optarg; extern system_integer_t optopt; #else int optind; system_character_t *optarg; system_integer_t optopt; #endif /* !defined( __CYGWIN__ ) */ system_integer_t esedb_test_getopt( int argument_count, system_character_t * const argument_values[], const system_character_t *options_string ); #endif /* defined( HAVE_GETOPT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_TEST_GETOPT_H ) */ libesedb-20240420/tests/esedb_test_functions.h0000644000175000017500000000342414610727254022117 0ustar00lordyestalordyesta/* * Functions for testing * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_FUNCTIONS_H ) #define _ESEDB_TEST_FUNCTIONS_H #include #include #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int esedb_test_get_narrow_source( const system_character_t *source, char *narrow_string, size_t narrow_string_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int esedb_test_get_wide_source( const system_character_t *source, wchar_t *wide_string, size_t wide_string_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ int esedb_test_open_file_io_handle( libbfio_handle_t **file_io_handle, uint8_t *data, size_t data_size, libcerror_error_t **error ); int esedb_test_close_file_io_handle( libbfio_handle_t **file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _ESEDB_TEST_FUNCTIONS_H ) */ libesedb-20240420/tests/esedb_test_block_tree.c0000644000175000017500000003427714610727556022232 0ustar00lordyestalordyesta/* * Library block_tree functions testing program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_block_descriptor.h" #include "../libesedb/libesedb_block_tree.h" #include "../libesedb/libesedb_block_tree_node.h" #include "../libesedb/libesedb_definitions.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_block_tree_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_initialize( void ) { libcerror_error_t *error = NULL; libesedb_block_tree_t *block_tree = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 2; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test block_tree initialization */ result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_tree_free( &block_tree, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_block_tree_initialize( NULL, 0x800000000UL, 0x4000, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); block_tree = (libesedb_block_tree_t *) 0x12345678UL; result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); block_tree = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_block_tree_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( block_tree != NULL ) { libesedb_block_tree_free( &block_tree, NULL, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_block_tree_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( block_tree != NULL ) { libesedb_block_tree_free( &block_tree, NULL, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( block_tree != NULL ) { libesedb_block_tree_free( &block_tree, NULL, NULL ); } return( 0 ); } /* Tests the libesedb_block_tree_free function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_block_tree_free( NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_block_tree_get_block_descriptor_by_offset function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_get_block_descriptor_by_offset( void ) { libcerror_error_t *error = NULL; libesedb_block_descriptor_t *block_descriptor = NULL; libesedb_block_tree_t *block_tree = NULL; off64_t block_offset = 0; int result = 0; /* Initialize test */ result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_block_tree_get_block_descriptor_by_offset( block_tree, 0, &block_descriptor, &block_offset, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_block_tree_get_block_descriptor_by_offset( NULL, 0, &block_descriptor, &block_offset, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_block_tree_get_block_descriptor_by_offset( block_tree, 0, NULL, &block_offset, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_block_tree_get_block_descriptor_by_offset( block_tree, 0, &block_descriptor, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_block_tree_free( &block_tree, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( block_tree != NULL ) { libesedb_block_tree_free( &block_tree, NULL, NULL ); } return( 0 ); } /* Tests the libesedb_block_tree_insert_block_descriptor_by_offset function * Returns 1 if successful or 0 if not */ int esedb_test_block_tree_insert_block_descriptor_by_offset( void ) { libcerror_error_t *error = NULL; libesedb_block_descriptor_t *block_descriptor = NULL; libesedb_block_descriptor_t *existing_block_descriptor = NULL; libesedb_block_tree_t *block_tree = NULL; libesedb_block_tree_node_t *leaf_block_tree_node = NULL; int leaf_value_index = 0; int result = 0; /* Initialize test */ result = libesedb_block_tree_initialize( &block_tree, 0x800000000UL, 0x4000, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_descriptor_initialize( &block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_block_tree_insert_block_descriptor_by_offset( block_tree, 0, block_descriptor, &leaf_value_index, &leaf_block_tree_node, &existing_block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_INT( "leaf_value_index", leaf_value_index, 0 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "leaf_block_tree_node", leaf_block_tree_node ); ESEDB_TEST_ASSERT_IS_NULL( "existing_block_descriptor", existing_block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_tree_insert_block_descriptor_by_offset( block_tree, 0, NULL, &leaf_value_index, &leaf_block_tree_node, &existing_block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_EQUAL_INT( "leaf_value_index", leaf_value_index, 0 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "leaf_block_tree_node", leaf_block_tree_node ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "existing_block_descriptor", existing_block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_block_tree_insert_block_descriptor_by_offset( NULL, 0, block_descriptor, &leaf_value_index, &leaf_block_tree_node, &existing_block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_block_tree_insert_block_descriptor_by_offset( block_tree, 0, block_descriptor, NULL, &leaf_block_tree_node, &existing_block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_block_tree_insert_block_descriptor_by_offset( block_tree, 0, block_descriptor, &leaf_value_index, NULL, &existing_block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_block_tree_insert_block_descriptor_by_offset( block_tree, 0, block_descriptor, &leaf_value_index, &leaf_block_tree_node, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_block_descriptor_free( &block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_tree_free( &block_tree, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_tree", block_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( block_descriptor != NULL ) { libesedb_block_descriptor_free( &block_descriptor, NULL ); } if( block_tree != NULL ) { libesedb_block_tree_free( &block_tree, NULL, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_block_tree_initialize", esedb_test_block_tree_initialize ); ESEDB_TEST_RUN( "libesedb_block_tree_free", esedb_test_block_tree_free ); ESEDB_TEST_RUN( "libesedb_block_tree_get_block_descriptor_by_offset", esedb_test_block_tree_get_block_descriptor_by_offset ); ESEDB_TEST_RUN( "libesedb_block_tree_insert_block_descriptor_by_offset", esedb_test_block_tree_insert_block_descriptor_by_offset ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/esedb_test_libfcache.h0000644000175000017500000000264714610727254022015 0ustar00lordyestalordyesta/* * The libfcache header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBFCACHE_H ) #define _ESEDB_TEST_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 /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif /* !defined( _ESEDB_TEST_LIBFCACHE_H ) */ libesedb-20240420/tests/esedb_test_libfdata.h0000644000175000017500000000301714610727254021653 0ustar00lordyestalordyesta/* * The libfdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_LIBFDATA_H ) #define _ESEDB_TEST_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 #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 /* defined( HAVE_LOCAL_LIBFDATA ) */ #endif /* !defined( _ESEDB_TEST_LIBFDATA_H ) */ libesedb-20240420/tests/esedb_test_data_definition.c0000644000175000017500000002252114610727253023221 0ustar00lordyestalordyesta/* * Library data_definition type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_data_definition.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_data_definition_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_initialize( void ) { libcerror_error_t *error = NULL; libesedb_data_definition_t *data_definition = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_data_definition_initialize( &data_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "data_definition", data_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_data_definition_free( &data_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_definition", data_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_data_definition_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); data_definition = (libesedb_data_definition_t *) 0x12345678UL; result = libesedb_data_definition_initialize( &data_definition, &error ); data_definition = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_data_definition_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_data_definition_initialize( &data_definition, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( data_definition != NULL ) { libesedb_data_definition_free( &data_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_definition", data_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_data_definition_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_data_definition_initialize( &data_definition, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( data_definition != NULL ) { libesedb_data_definition_free( &data_definition, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "data_definition", data_definition ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( data_definition != NULL ) { libesedb_data_definition_free( &data_definition, NULL ); } return( 0 ); } /* Tests the libesedb_data_definition_free function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_definition_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_data_definition_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_read_data( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_definition_read_data( NULL, NULL, NULL, NULL, NULL, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_data_definition_read_record function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_read_record( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_definition_read_record( NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_data_definition_read_long_value function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_read_long_value( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_definition_read_long_value( NULL, NULL, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_data_definition_read_long_value_segment function * Returns 1 if successful or 0 if not */ int esedb_test_data_definition_read_long_value_segment( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_data_definition_read_long_value_segment( NULL, NULL, NULL, NULL, NULL, 0, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_data_definition_initialize", esedb_test_data_definition_initialize ); ESEDB_TEST_RUN( "libesedb_data_definition_free", esedb_test_data_definition_free ); ESEDB_TEST_RUN( "libesedb_data_definition_read_data", esedb_test_data_definition_read_data ); ESEDB_TEST_RUN( "libesedb_data_definition_read_record", esedb_test_data_definition_read_record ); ESEDB_TEST_RUN( "libesedb_data_definition_read_long_value", esedb_test_data_definition_read_long_value ); ESEDB_TEST_RUN( "libesedb_data_definition_read_long_value_segment", esedb_test_data_definition_read_long_value_segment ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/Makefile.in0000644000175000017500000026616114610746266017617 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ check_PROGRAMS = esedb_test_block_descriptor$(EXEEXT) \ esedb_test_block_tree$(EXEEXT) \ esedb_test_block_tree_node$(EXEEXT) \ esedb_test_catalog$(EXEEXT) \ esedb_test_catalog_definition$(EXEEXT) \ esedb_test_checksum$(EXEEXT) esedb_test_column$(EXEEXT) \ esedb_test_column_type$(EXEEXT) \ esedb_test_compression$(EXEEXT) \ esedb_test_data_definition$(EXEEXT) \ esedb_test_data_segment$(EXEEXT) esedb_test_database$(EXEEXT) \ esedb_test_error$(EXEEXT) esedb_test_file$(EXEEXT) \ esedb_test_file_header$(EXEEXT) esedb_test_index$(EXEEXT) \ esedb_test_io_handle$(EXEEXT) \ esedb_test_leaf_page_descriptor$(EXEEXT) \ esedb_test_long_value$(EXEEXT) esedb_test_multi_value$(EXEEXT) \ esedb_test_notify$(EXEEXT) esedb_test_page$(EXEEXT) \ esedb_test_page_header$(EXEEXT) esedb_test_page_tree$(EXEEXT) \ esedb_test_page_tree_key$(EXEEXT) \ esedb_test_page_tree_value$(EXEEXT) \ esedb_test_page_value$(EXEEXT) esedb_test_record$(EXEEXT) \ esedb_test_root_page_header$(EXEEXT) \ esedb_test_space_tree$(EXEEXT) \ esedb_test_space_tree_value$(EXEEXT) \ esedb_test_support$(EXEEXT) esedb_test_table$(EXEEXT) \ esedb_test_table_definition$(EXEEXT) \ esedb_test_tools_info_handle$(EXEEXT) \ esedb_test_tools_output$(EXEEXT) \ esedb_test_tools_signal$(EXEEXT) \ esedb_test_tools_windows_search_compression$(EXEEXT) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_esedb_test_block_descriptor_OBJECTS = \ esedb_test_block_descriptor.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_block_descriptor_OBJECTS = \ $(am_esedb_test_block_descriptor_OBJECTS) esedb_test_block_descriptor_DEPENDENCIES = ../libesedb/libesedb.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_esedb_test_block_tree_OBJECTS = esedb_test_block_tree.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_block_tree_OBJECTS = $(am_esedb_test_block_tree_OBJECTS) esedb_test_block_tree_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_block_tree_node_OBJECTS = \ esedb_test_block_tree_node.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_block_tree_node_OBJECTS = \ $(am_esedb_test_block_tree_node_OBJECTS) esedb_test_block_tree_node_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_catalog_OBJECTS = esedb_test_catalog.$(OBJEXT) \ esedb_test_functions.$(OBJEXT) esedb_test_memory.$(OBJEXT) esedb_test_catalog_OBJECTS = $(am_esedb_test_catalog_OBJECTS) esedb_test_catalog_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_catalog_definition_OBJECTS = \ esedb_test_catalog_definition.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_catalog_definition_OBJECTS = \ $(am_esedb_test_catalog_definition_OBJECTS) esedb_test_catalog_definition_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_checksum_OBJECTS = esedb_test_checksum.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_checksum_OBJECTS = $(am_esedb_test_checksum_OBJECTS) esedb_test_checksum_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_column_OBJECTS = esedb_test_column.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_column_OBJECTS = $(am_esedb_test_column_OBJECTS) esedb_test_column_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_column_type_OBJECTS = esedb_test_column_type.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_column_type_OBJECTS = $(am_esedb_test_column_type_OBJECTS) esedb_test_column_type_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_compression_OBJECTS = esedb_test_compression.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_compression_OBJECTS = $(am_esedb_test_compression_OBJECTS) esedb_test_compression_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_data_definition_OBJECTS = \ esedb_test_data_definition.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_data_definition_OBJECTS = \ $(am_esedb_test_data_definition_OBJECTS) esedb_test_data_definition_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_data_segment_OBJECTS = \ esedb_test_data_segment.$(OBJEXT) \ esedb_test_functions.$(OBJEXT) esedb_test_memory.$(OBJEXT) esedb_test_data_segment_OBJECTS = \ $(am_esedb_test_data_segment_OBJECTS) esedb_test_data_segment_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_database_OBJECTS = esedb_test_database.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_database_OBJECTS = $(am_esedb_test_database_OBJECTS) esedb_test_database_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_error_OBJECTS = esedb_test_error.$(OBJEXT) esedb_test_error_OBJECTS = $(am_esedb_test_error_OBJECTS) esedb_test_error_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_file_OBJECTS = esedb_test_file.$(OBJEXT) \ esedb_test_functions.$(OBJEXT) esedb_test_getopt.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_file_OBJECTS = $(am_esedb_test_file_OBJECTS) esedb_test_file_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_file_header_OBJECTS = esedb_test_file_header.$(OBJEXT) \ esedb_test_functions.$(OBJEXT) esedb_test_memory.$(OBJEXT) esedb_test_file_header_OBJECTS = $(am_esedb_test_file_header_OBJECTS) esedb_test_file_header_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_index_OBJECTS = esedb_test_index.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_index_OBJECTS = $(am_esedb_test_index_OBJECTS) esedb_test_index_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_io_handle_OBJECTS = esedb_test_io_handle.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_io_handle_OBJECTS = $(am_esedb_test_io_handle_OBJECTS) esedb_test_io_handle_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_leaf_page_descriptor_OBJECTS = \ esedb_test_leaf_page_descriptor.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_leaf_page_descriptor_OBJECTS = \ $(am_esedb_test_leaf_page_descriptor_OBJECTS) esedb_test_leaf_page_descriptor_DEPENDENCIES = \ ../libesedb/libesedb.la am_esedb_test_long_value_OBJECTS = esedb_test_long_value.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_long_value_OBJECTS = $(am_esedb_test_long_value_OBJECTS) esedb_test_long_value_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_multi_value_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_multi_value.$(OBJEXT) esedb_test_multi_value_OBJECTS = $(am_esedb_test_multi_value_OBJECTS) esedb_test_multi_value_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_notify_OBJECTS = esedb_test_notify.$(OBJEXT) esedb_test_notify_OBJECTS = $(am_esedb_test_notify_OBJECTS) esedb_test_notify_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_OBJECTS = esedb_test_functions.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) esedb_test_page.$(OBJEXT) esedb_test_page_OBJECTS = $(am_esedb_test_page_OBJECTS) esedb_test_page_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_header_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_page_header.$(OBJEXT) esedb_test_page_header_OBJECTS = $(am_esedb_test_page_header_OBJECTS) esedb_test_page_header_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_tree_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_page_tree.$(OBJEXT) esedb_test_page_tree_OBJECTS = $(am_esedb_test_page_tree_OBJECTS) esedb_test_page_tree_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_tree_key_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_page_tree_key.$(OBJEXT) esedb_test_page_tree_key_OBJECTS = \ $(am_esedb_test_page_tree_key_OBJECTS) esedb_test_page_tree_key_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_tree_value_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_page_tree_value.$(OBJEXT) esedb_test_page_tree_value_OBJECTS = \ $(am_esedb_test_page_tree_value_OBJECTS) esedb_test_page_tree_value_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_page_value_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_page_value.$(OBJEXT) esedb_test_page_value_OBJECTS = $(am_esedb_test_page_value_OBJECTS) esedb_test_page_value_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_record_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_record.$(OBJEXT) esedb_test_record_OBJECTS = $(am_esedb_test_record_OBJECTS) esedb_test_record_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_root_page_header_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_root_page_header.$(OBJEXT) esedb_test_root_page_header_OBJECTS = \ $(am_esedb_test_root_page_header_OBJECTS) esedb_test_root_page_header_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_space_tree_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_space_tree.$(OBJEXT) esedb_test_space_tree_OBJECTS = $(am_esedb_test_space_tree_OBJECTS) esedb_test_space_tree_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_space_tree_value_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_space_tree_value.$(OBJEXT) esedb_test_space_tree_value_OBJECTS = \ $(am_esedb_test_space_tree_value_OBJECTS) esedb_test_space_tree_value_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_support_OBJECTS = esedb_test_functions.$(OBJEXT) \ esedb_test_getopt.$(OBJEXT) esedb_test_memory.$(OBJEXT) \ esedb_test_support.$(OBJEXT) esedb_test_support_OBJECTS = $(am_esedb_test_support_OBJECTS) esedb_test_support_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_table_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_table.$(OBJEXT) esedb_test_table_OBJECTS = $(am_esedb_test_table_OBJECTS) esedb_test_table_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_table_definition_OBJECTS = esedb_test_memory.$(OBJEXT) \ esedb_test_table_definition.$(OBJEXT) esedb_test_table_definition_OBJECTS = \ $(am_esedb_test_table_definition_OBJECTS) esedb_test_table_definition_DEPENDENCIES = ../libesedb/libesedb.la am__dirstamp = $(am__leading_dot)dirstamp am_esedb_test_tools_info_handle_OBJECTS = \ ../esedbtools/info_handle.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) \ esedb_test_tools_info_handle.$(OBJEXT) esedb_test_tools_info_handle_OBJECTS = \ $(am_esedb_test_tools_info_handle_OBJECTS) esedb_test_tools_info_handle_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_tools_output_OBJECTS = \ ../esedbtools/esedbtools_output.$(OBJEXT) \ esedb_test_tools_output.$(OBJEXT) esedb_test_tools_output_OBJECTS = \ $(am_esedb_test_tools_output_OBJECTS) esedb_test_tools_output_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_tools_signal_OBJECTS = \ ../esedbtools/esedbtools_signal.$(OBJEXT) \ esedb_test_tools_signal.$(OBJEXT) esedb_test_tools_signal_OBJECTS = \ $(am_esedb_test_tools_signal_OBJECTS) esedb_test_tools_signal_DEPENDENCIES = ../libesedb/libesedb.la am_esedb_test_tools_windows_search_compression_OBJECTS = \ ../esedbtools/windows_search_compression.$(OBJEXT) \ esedb_test_memory.$(OBJEXT) \ esedb_test_tools_windows_search_compression.$(OBJEXT) esedb_test_tools_windows_search_compression_OBJECTS = \ $(am_esedb_test_tools_windows_search_compression_OBJECTS) esedb_test_tools_windows_search_compression_DEPENDENCIES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ../esedbtools/$(DEPDIR)/esedbtools_output.Po \ ../esedbtools/$(DEPDIR)/esedbtools_signal.Po \ ../esedbtools/$(DEPDIR)/info_handle.Po \ ../esedbtools/$(DEPDIR)/windows_search_compression.Po \ ./$(DEPDIR)/esedb_test_block_descriptor.Po \ ./$(DEPDIR)/esedb_test_block_tree.Po \ ./$(DEPDIR)/esedb_test_block_tree_node.Po \ ./$(DEPDIR)/esedb_test_catalog.Po \ ./$(DEPDIR)/esedb_test_catalog_definition.Po \ ./$(DEPDIR)/esedb_test_checksum.Po \ ./$(DEPDIR)/esedb_test_column.Po \ ./$(DEPDIR)/esedb_test_column_type.Po \ ./$(DEPDIR)/esedb_test_compression.Po \ ./$(DEPDIR)/esedb_test_data_definition.Po \ ./$(DEPDIR)/esedb_test_data_segment.Po \ ./$(DEPDIR)/esedb_test_database.Po \ ./$(DEPDIR)/esedb_test_error.Po ./$(DEPDIR)/esedb_test_file.Po \ ./$(DEPDIR)/esedb_test_file_header.Po \ ./$(DEPDIR)/esedb_test_functions.Po \ ./$(DEPDIR)/esedb_test_getopt.Po \ ./$(DEPDIR)/esedb_test_index.Po \ ./$(DEPDIR)/esedb_test_io_handle.Po \ ./$(DEPDIR)/esedb_test_leaf_page_descriptor.Po \ ./$(DEPDIR)/esedb_test_long_value.Po \ ./$(DEPDIR)/esedb_test_memory.Po \ ./$(DEPDIR)/esedb_test_multi_value.Po \ ./$(DEPDIR)/esedb_test_notify.Po \ ./$(DEPDIR)/esedb_test_page.Po \ ./$(DEPDIR)/esedb_test_page_header.Po \ ./$(DEPDIR)/esedb_test_page_tree.Po \ ./$(DEPDIR)/esedb_test_page_tree_key.Po \ ./$(DEPDIR)/esedb_test_page_tree_value.Po \ ./$(DEPDIR)/esedb_test_page_value.Po \ ./$(DEPDIR)/esedb_test_record.Po \ ./$(DEPDIR)/esedb_test_root_page_header.Po \ ./$(DEPDIR)/esedb_test_space_tree.Po \ ./$(DEPDIR)/esedb_test_space_tree_value.Po \ ./$(DEPDIR)/esedb_test_support.Po \ ./$(DEPDIR)/esedb_test_table.Po \ ./$(DEPDIR)/esedb_test_table_definition.Po \ ./$(DEPDIR)/esedb_test_tools_info_handle.Po \ ./$(DEPDIR)/esedb_test_tools_output.Po \ ./$(DEPDIR)/esedb_test_tools_signal.Po \ ./$(DEPDIR)/esedb_test_tools_windows_search_compression.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(esedb_test_block_descriptor_SOURCES) \ $(esedb_test_block_tree_SOURCES) \ $(esedb_test_block_tree_node_SOURCES) \ $(esedb_test_catalog_SOURCES) \ $(esedb_test_catalog_definition_SOURCES) \ $(esedb_test_checksum_SOURCES) $(esedb_test_column_SOURCES) \ $(esedb_test_column_type_SOURCES) \ $(esedb_test_compression_SOURCES) \ $(esedb_test_data_definition_SOURCES) \ $(esedb_test_data_segment_SOURCES) \ $(esedb_test_database_SOURCES) $(esedb_test_error_SOURCES) \ $(esedb_test_file_SOURCES) $(esedb_test_file_header_SOURCES) \ $(esedb_test_index_SOURCES) $(esedb_test_io_handle_SOURCES) \ $(esedb_test_leaf_page_descriptor_SOURCES) \ $(esedb_test_long_value_SOURCES) \ $(esedb_test_multi_value_SOURCES) $(esedb_test_notify_SOURCES) \ $(esedb_test_page_SOURCES) $(esedb_test_page_header_SOURCES) \ $(esedb_test_page_tree_SOURCES) \ $(esedb_test_page_tree_key_SOURCES) \ $(esedb_test_page_tree_value_SOURCES) \ $(esedb_test_page_value_SOURCES) $(esedb_test_record_SOURCES) \ $(esedb_test_root_page_header_SOURCES) \ $(esedb_test_space_tree_SOURCES) \ $(esedb_test_space_tree_value_SOURCES) \ $(esedb_test_support_SOURCES) $(esedb_test_table_SOURCES) \ $(esedb_test_table_definition_SOURCES) \ $(esedb_test_tools_info_handle_SOURCES) \ $(esedb_test_tools_output_SOURCES) \ $(esedb_test_tools_signal_SOURCES) \ $(esedb_test_tools_windows_search_compression_SOURCES) DIST_SOURCES = $(esedb_test_block_descriptor_SOURCES) \ $(esedb_test_block_tree_SOURCES) \ $(esedb_test_block_tree_node_SOURCES) \ $(esedb_test_catalog_SOURCES) \ $(esedb_test_catalog_definition_SOURCES) \ $(esedb_test_checksum_SOURCES) $(esedb_test_column_SOURCES) \ $(esedb_test_column_type_SOURCES) \ $(esedb_test_compression_SOURCES) \ $(esedb_test_data_definition_SOURCES) \ $(esedb_test_data_segment_SOURCES) \ $(esedb_test_database_SOURCES) $(esedb_test_error_SOURCES) \ $(esedb_test_file_SOURCES) $(esedb_test_file_header_SOURCES) \ $(esedb_test_index_SOURCES) $(esedb_test_io_handle_SOURCES) \ $(esedb_test_leaf_page_descriptor_SOURCES) \ $(esedb_test_long_value_SOURCES) \ $(esedb_test_multi_value_SOURCES) $(esedb_test_notify_SOURCES) \ $(esedb_test_page_SOURCES) $(esedb_test_page_header_SOURCES) \ $(esedb_test_page_tree_SOURCES) \ $(esedb_test_page_tree_key_SOURCES) \ $(esedb_test_page_tree_value_SOURCES) \ $(esedb_test_page_value_SOURCES) $(esedb_test_record_SOURCES) \ $(esedb_test_root_page_header_SOURCES) \ $(esedb_test_space_tree_SOURCES) \ $(esedb_test_space_tree_value_SOURCES) \ $(esedb_test_support_SOURCES) $(esedb_test_table_SOURCES) \ $(esedb_test_table_definition_SOURCES) \ $(esedb_test_tools_info_handle_SOURCES) \ $(esedb_test_tools_output_SOURCES) \ $(esedb_test_tools_signal_SOURCES) \ $(esedb_test_tools_windows_search_compression_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_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@ \ @PTHREAD_CPPFLAGS@ \ @LIBESEDB_DLL_IMPORT@ @HAVE_PYTHON_TESTS_TRUE@TESTS_PYESEDB = \ @HAVE_PYTHON_TESTS_TRUE@ test_python_module.sh TESTS = \ test_library.sh \ test_tools.sh \ test_esedbinfo.sh \ test_esedbexport.sh \ $(TESTS_PYESEDB) check_SCRIPTS = \ pyesedb_test_file.py \ pyesedb_test_support.py \ test_esedbexport.sh \ test_esedbinfo.sh \ test_library.sh \ test_manpage.sh \ test_python_module.sh \ test_runner.sh \ test_tools.sh EXTRA_DIST = \ $(check_SCRIPTS) esedb_test_block_descriptor_SOURCES = \ esedb_test_block_descriptor.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_descriptor_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_block_tree_SOURCES = \ esedb_test_block_tree.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_block_tree_node_SOURCES = \ esedb_test_block_tree_node.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_block_tree_node_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_catalog_SOURCES = \ esedb_test_catalog.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcdata.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_catalog_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_catalog_definition_SOURCES = \ esedb_test_catalog_definition.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_catalog_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_checksum_SOURCES = \ esedb_test_checksum.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_checksum_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_column_SOURCES = \ esedb_test_column.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_column_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_column_type_SOURCES = \ esedb_test_column_type.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_column_type_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_compression_SOURCES = \ esedb_test_compression.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_compression_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_data_definition_SOURCES = \ esedb_test_data_definition.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_data_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_data_segment_SOURCES = \ esedb_test_data_segment.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_libfcache.h \ esedb_test_libfdata.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_data_segment_LDADD = \ @LIBFDATA_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_database_SOURCES = \ esedb_test_database.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_database_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_error_SOURCES = \ esedb_test_error.c \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_unused.h esedb_test_error_LDADD = \ ../libesedb/libesedb.la esedb_test_file_SOURCES = \ esedb_test_file.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_getopt.c esedb_test_getopt.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libclocale.h \ esedb_test_libcnotify.h \ esedb_test_libesedb.h \ esedb_test_libuna.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_file_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCTHREADS_LIBADD@ \ @LIBCERROR_LIBADD@ \ @PTHREAD_LIBADD@ esedb_test_file_header_SOURCES = \ esedb_test_file_header.c \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_file_header_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_index_SOURCES = \ esedb_test_index.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_index_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_io_handle_SOURCES = \ esedb_test_io_handle.c \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_io_handle_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_leaf_page_descriptor_SOURCES = \ esedb_test_leaf_page_descriptor.c \ esedb_test_libcdata.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_leaf_page_descriptor_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_long_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_long_value.c \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_unused.h esedb_test_long_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_multi_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_multi_value.c \ esedb_test_unused.h esedb_test_multi_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_notify_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_notify.c \ esedb_test_unused.h esedb_test_notify_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_SOURCES = \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page.c \ esedb_test_unused.h esedb_test_page_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_header_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_header.c \ esedb_test_unused.h esedb_test_page_header_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree.c \ esedb_test_unused.h esedb_test_page_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_key_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_libfdata.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree_key.c \ esedb_test_unused.h esedb_test_page_tree_key_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_tree_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_tree_value.c \ esedb_test_unused.h esedb_test_page_tree_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_page_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_page_value.c \ esedb_test_unused.h esedb_test_page_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_record_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_record.c \ esedb_test_unused.h esedb_test_record_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_root_page_header_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_root_page_header.c \ esedb_test_unused.h esedb_test_root_page_header_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_space_tree_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_space_tree.c \ esedb_test_unused.h esedb_test_space_tree_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_space_tree_value_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_space_tree_value.c \ esedb_test_unused.h esedb_test_space_tree_value_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_support_SOURCES = \ esedb_test_functions.c esedb_test_functions.h \ esedb_test_getopt.c esedb_test_getopt.h \ esedb_test_libbfio.h \ esedb_test_libcerror.h \ esedb_test_libclocale.h \ esedb_test_libcnotify.h \ esedb_test_libesedb.h \ esedb_test_libuna.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_support.c \ esedb_test_unused.h esedb_test_support_LDADD = \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_table_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_table.c \ esedb_test_unused.h esedb_test_table_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_table_definition_SOURCES = \ esedb_test_libcerror.h \ esedb_test_libesedb.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_table_definition.c \ esedb_test_unused.h esedb_test_table_definition_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_info_handle_SOURCES = \ ../esedbtools/info_handle.c ../esedbtools/info_handle.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_tools_info_handle.c \ esedb_test_unused.h esedb_test_tools_info_handle_LDADD = \ @LIBFDATETIME_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_output_SOURCES = \ ../esedbtools/esedbtools_output.c ../esedbtools/esedbtools_output.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_tools_output.c \ esedb_test_unused.h esedb_test_tools_output_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_signal_SOURCES = \ ../esedbtools/esedbtools_signal.c ../esedbtools/esedbtools_signal.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_tools_signal.c \ esedb_test_unused.h esedb_test_tools_signal_LDADD = \ ../libesedb/libesedb.la \ @LIBCERROR_LIBADD@ esedb_test_tools_windows_search_compression_SOURCES = \ ../esedbtools/windows_search_compression.c ../esedbtools/windows_search_compression.h \ esedb_test_libcerror.h \ esedb_test_macros.h \ esedb_test_memory.c esedb_test_memory.h \ esedb_test_tools_windows_search_compression.c \ esedb_test_unused.h esedb_test_tools_windows_search_compression_LDADD = \ @LIBCNOTIFY_LIBADD@ \ @LIBCERROR_LIBADD@ DISTCLEANFILES = \ Makefile \ Makefile.in \ notify_stream.log all: all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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 esedb_test_block_descriptor$(EXEEXT): $(esedb_test_block_descriptor_OBJECTS) $(esedb_test_block_descriptor_DEPENDENCIES) $(EXTRA_esedb_test_block_descriptor_DEPENDENCIES) @rm -f esedb_test_block_descriptor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_block_descriptor_OBJECTS) $(esedb_test_block_descriptor_LDADD) $(LIBS) esedb_test_block_tree$(EXEEXT): $(esedb_test_block_tree_OBJECTS) $(esedb_test_block_tree_DEPENDENCIES) $(EXTRA_esedb_test_block_tree_DEPENDENCIES) @rm -f esedb_test_block_tree$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_block_tree_OBJECTS) $(esedb_test_block_tree_LDADD) $(LIBS) esedb_test_block_tree_node$(EXEEXT): $(esedb_test_block_tree_node_OBJECTS) $(esedb_test_block_tree_node_DEPENDENCIES) $(EXTRA_esedb_test_block_tree_node_DEPENDENCIES) @rm -f esedb_test_block_tree_node$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_block_tree_node_OBJECTS) $(esedb_test_block_tree_node_LDADD) $(LIBS) esedb_test_catalog$(EXEEXT): $(esedb_test_catalog_OBJECTS) $(esedb_test_catalog_DEPENDENCIES) $(EXTRA_esedb_test_catalog_DEPENDENCIES) @rm -f esedb_test_catalog$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_catalog_OBJECTS) $(esedb_test_catalog_LDADD) $(LIBS) esedb_test_catalog_definition$(EXEEXT): $(esedb_test_catalog_definition_OBJECTS) $(esedb_test_catalog_definition_DEPENDENCIES) $(EXTRA_esedb_test_catalog_definition_DEPENDENCIES) @rm -f esedb_test_catalog_definition$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_catalog_definition_OBJECTS) $(esedb_test_catalog_definition_LDADD) $(LIBS) esedb_test_checksum$(EXEEXT): $(esedb_test_checksum_OBJECTS) $(esedb_test_checksum_DEPENDENCIES) $(EXTRA_esedb_test_checksum_DEPENDENCIES) @rm -f esedb_test_checksum$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_checksum_OBJECTS) $(esedb_test_checksum_LDADD) $(LIBS) esedb_test_column$(EXEEXT): $(esedb_test_column_OBJECTS) $(esedb_test_column_DEPENDENCIES) $(EXTRA_esedb_test_column_DEPENDENCIES) @rm -f esedb_test_column$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_column_OBJECTS) $(esedb_test_column_LDADD) $(LIBS) esedb_test_column_type$(EXEEXT): $(esedb_test_column_type_OBJECTS) $(esedb_test_column_type_DEPENDENCIES) $(EXTRA_esedb_test_column_type_DEPENDENCIES) @rm -f esedb_test_column_type$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_column_type_OBJECTS) $(esedb_test_column_type_LDADD) $(LIBS) esedb_test_compression$(EXEEXT): $(esedb_test_compression_OBJECTS) $(esedb_test_compression_DEPENDENCIES) $(EXTRA_esedb_test_compression_DEPENDENCIES) @rm -f esedb_test_compression$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_compression_OBJECTS) $(esedb_test_compression_LDADD) $(LIBS) esedb_test_data_definition$(EXEEXT): $(esedb_test_data_definition_OBJECTS) $(esedb_test_data_definition_DEPENDENCIES) $(EXTRA_esedb_test_data_definition_DEPENDENCIES) @rm -f esedb_test_data_definition$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_data_definition_OBJECTS) $(esedb_test_data_definition_LDADD) $(LIBS) esedb_test_data_segment$(EXEEXT): $(esedb_test_data_segment_OBJECTS) $(esedb_test_data_segment_DEPENDENCIES) $(EXTRA_esedb_test_data_segment_DEPENDENCIES) @rm -f esedb_test_data_segment$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_data_segment_OBJECTS) $(esedb_test_data_segment_LDADD) $(LIBS) esedb_test_database$(EXEEXT): $(esedb_test_database_OBJECTS) $(esedb_test_database_DEPENDENCIES) $(EXTRA_esedb_test_database_DEPENDENCIES) @rm -f esedb_test_database$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_database_OBJECTS) $(esedb_test_database_LDADD) $(LIBS) esedb_test_error$(EXEEXT): $(esedb_test_error_OBJECTS) $(esedb_test_error_DEPENDENCIES) $(EXTRA_esedb_test_error_DEPENDENCIES) @rm -f esedb_test_error$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_error_OBJECTS) $(esedb_test_error_LDADD) $(LIBS) esedb_test_file$(EXEEXT): $(esedb_test_file_OBJECTS) $(esedb_test_file_DEPENDENCIES) $(EXTRA_esedb_test_file_DEPENDENCIES) @rm -f esedb_test_file$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_file_OBJECTS) $(esedb_test_file_LDADD) $(LIBS) esedb_test_file_header$(EXEEXT): $(esedb_test_file_header_OBJECTS) $(esedb_test_file_header_DEPENDENCIES) $(EXTRA_esedb_test_file_header_DEPENDENCIES) @rm -f esedb_test_file_header$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_file_header_OBJECTS) $(esedb_test_file_header_LDADD) $(LIBS) esedb_test_index$(EXEEXT): $(esedb_test_index_OBJECTS) $(esedb_test_index_DEPENDENCIES) $(EXTRA_esedb_test_index_DEPENDENCIES) @rm -f esedb_test_index$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_index_OBJECTS) $(esedb_test_index_LDADD) $(LIBS) esedb_test_io_handle$(EXEEXT): $(esedb_test_io_handle_OBJECTS) $(esedb_test_io_handle_DEPENDENCIES) $(EXTRA_esedb_test_io_handle_DEPENDENCIES) @rm -f esedb_test_io_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_io_handle_OBJECTS) $(esedb_test_io_handle_LDADD) $(LIBS) esedb_test_leaf_page_descriptor$(EXEEXT): $(esedb_test_leaf_page_descriptor_OBJECTS) $(esedb_test_leaf_page_descriptor_DEPENDENCIES) $(EXTRA_esedb_test_leaf_page_descriptor_DEPENDENCIES) @rm -f esedb_test_leaf_page_descriptor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_leaf_page_descriptor_OBJECTS) $(esedb_test_leaf_page_descriptor_LDADD) $(LIBS) esedb_test_long_value$(EXEEXT): $(esedb_test_long_value_OBJECTS) $(esedb_test_long_value_DEPENDENCIES) $(EXTRA_esedb_test_long_value_DEPENDENCIES) @rm -f esedb_test_long_value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_long_value_OBJECTS) $(esedb_test_long_value_LDADD) $(LIBS) esedb_test_multi_value$(EXEEXT): $(esedb_test_multi_value_OBJECTS) $(esedb_test_multi_value_DEPENDENCIES) $(EXTRA_esedb_test_multi_value_DEPENDENCIES) @rm -f esedb_test_multi_value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_multi_value_OBJECTS) $(esedb_test_multi_value_LDADD) $(LIBS) esedb_test_notify$(EXEEXT): $(esedb_test_notify_OBJECTS) $(esedb_test_notify_DEPENDENCIES) $(EXTRA_esedb_test_notify_DEPENDENCIES) @rm -f esedb_test_notify$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_notify_OBJECTS) $(esedb_test_notify_LDADD) $(LIBS) esedb_test_page$(EXEEXT): $(esedb_test_page_OBJECTS) $(esedb_test_page_DEPENDENCIES) $(EXTRA_esedb_test_page_DEPENDENCIES) @rm -f esedb_test_page$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_OBJECTS) $(esedb_test_page_LDADD) $(LIBS) esedb_test_page_header$(EXEEXT): $(esedb_test_page_header_OBJECTS) $(esedb_test_page_header_DEPENDENCIES) $(EXTRA_esedb_test_page_header_DEPENDENCIES) @rm -f esedb_test_page_header$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_header_OBJECTS) $(esedb_test_page_header_LDADD) $(LIBS) esedb_test_page_tree$(EXEEXT): $(esedb_test_page_tree_OBJECTS) $(esedb_test_page_tree_DEPENDENCIES) $(EXTRA_esedb_test_page_tree_DEPENDENCIES) @rm -f esedb_test_page_tree$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_tree_OBJECTS) $(esedb_test_page_tree_LDADD) $(LIBS) esedb_test_page_tree_key$(EXEEXT): $(esedb_test_page_tree_key_OBJECTS) $(esedb_test_page_tree_key_DEPENDENCIES) $(EXTRA_esedb_test_page_tree_key_DEPENDENCIES) @rm -f esedb_test_page_tree_key$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_tree_key_OBJECTS) $(esedb_test_page_tree_key_LDADD) $(LIBS) esedb_test_page_tree_value$(EXEEXT): $(esedb_test_page_tree_value_OBJECTS) $(esedb_test_page_tree_value_DEPENDENCIES) $(EXTRA_esedb_test_page_tree_value_DEPENDENCIES) @rm -f esedb_test_page_tree_value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_tree_value_OBJECTS) $(esedb_test_page_tree_value_LDADD) $(LIBS) esedb_test_page_value$(EXEEXT): $(esedb_test_page_value_OBJECTS) $(esedb_test_page_value_DEPENDENCIES) $(EXTRA_esedb_test_page_value_DEPENDENCIES) @rm -f esedb_test_page_value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_page_value_OBJECTS) $(esedb_test_page_value_LDADD) $(LIBS) esedb_test_record$(EXEEXT): $(esedb_test_record_OBJECTS) $(esedb_test_record_DEPENDENCIES) $(EXTRA_esedb_test_record_DEPENDENCIES) @rm -f esedb_test_record$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_record_OBJECTS) $(esedb_test_record_LDADD) $(LIBS) esedb_test_root_page_header$(EXEEXT): $(esedb_test_root_page_header_OBJECTS) $(esedb_test_root_page_header_DEPENDENCIES) $(EXTRA_esedb_test_root_page_header_DEPENDENCIES) @rm -f esedb_test_root_page_header$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_root_page_header_OBJECTS) $(esedb_test_root_page_header_LDADD) $(LIBS) esedb_test_space_tree$(EXEEXT): $(esedb_test_space_tree_OBJECTS) $(esedb_test_space_tree_DEPENDENCIES) $(EXTRA_esedb_test_space_tree_DEPENDENCIES) @rm -f esedb_test_space_tree$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_space_tree_OBJECTS) $(esedb_test_space_tree_LDADD) $(LIBS) esedb_test_space_tree_value$(EXEEXT): $(esedb_test_space_tree_value_OBJECTS) $(esedb_test_space_tree_value_DEPENDENCIES) $(EXTRA_esedb_test_space_tree_value_DEPENDENCIES) @rm -f esedb_test_space_tree_value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_space_tree_value_OBJECTS) $(esedb_test_space_tree_value_LDADD) $(LIBS) esedb_test_support$(EXEEXT): $(esedb_test_support_OBJECTS) $(esedb_test_support_DEPENDENCIES) $(EXTRA_esedb_test_support_DEPENDENCIES) @rm -f esedb_test_support$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_support_OBJECTS) $(esedb_test_support_LDADD) $(LIBS) esedb_test_table$(EXEEXT): $(esedb_test_table_OBJECTS) $(esedb_test_table_DEPENDENCIES) $(EXTRA_esedb_test_table_DEPENDENCIES) @rm -f esedb_test_table$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_table_OBJECTS) $(esedb_test_table_LDADD) $(LIBS) esedb_test_table_definition$(EXEEXT): $(esedb_test_table_definition_OBJECTS) $(esedb_test_table_definition_DEPENDENCIES) $(EXTRA_esedb_test_table_definition_DEPENDENCIES) @rm -f esedb_test_table_definition$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_table_definition_OBJECTS) $(esedb_test_table_definition_LDADD) $(LIBS) ../esedbtools/$(am__dirstamp): @$(MKDIR_P) ../esedbtools @: > ../esedbtools/$(am__dirstamp) ../esedbtools/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ../esedbtools/$(DEPDIR) @: > ../esedbtools/$(DEPDIR)/$(am__dirstamp) ../esedbtools/info_handle.$(OBJEXT): ../esedbtools/$(am__dirstamp) \ ../esedbtools/$(DEPDIR)/$(am__dirstamp) esedb_test_tools_info_handle$(EXEEXT): $(esedb_test_tools_info_handle_OBJECTS) $(esedb_test_tools_info_handle_DEPENDENCIES) $(EXTRA_esedb_test_tools_info_handle_DEPENDENCIES) @rm -f esedb_test_tools_info_handle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_tools_info_handle_OBJECTS) $(esedb_test_tools_info_handle_LDADD) $(LIBS) ../esedbtools/esedbtools_output.$(OBJEXT): \ ../esedbtools/$(am__dirstamp) \ ../esedbtools/$(DEPDIR)/$(am__dirstamp) esedb_test_tools_output$(EXEEXT): $(esedb_test_tools_output_OBJECTS) $(esedb_test_tools_output_DEPENDENCIES) $(EXTRA_esedb_test_tools_output_DEPENDENCIES) @rm -f esedb_test_tools_output$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_tools_output_OBJECTS) $(esedb_test_tools_output_LDADD) $(LIBS) ../esedbtools/esedbtools_signal.$(OBJEXT): \ ../esedbtools/$(am__dirstamp) \ ../esedbtools/$(DEPDIR)/$(am__dirstamp) esedb_test_tools_signal$(EXEEXT): $(esedb_test_tools_signal_OBJECTS) $(esedb_test_tools_signal_DEPENDENCIES) $(EXTRA_esedb_test_tools_signal_DEPENDENCIES) @rm -f esedb_test_tools_signal$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_tools_signal_OBJECTS) $(esedb_test_tools_signal_LDADD) $(LIBS) ../esedbtools/windows_search_compression.$(OBJEXT): \ ../esedbtools/$(am__dirstamp) \ ../esedbtools/$(DEPDIR)/$(am__dirstamp) esedb_test_tools_windows_search_compression$(EXEEXT): $(esedb_test_tools_windows_search_compression_OBJECTS) $(esedb_test_tools_windows_search_compression_DEPENDENCIES) $(EXTRA_esedb_test_tools_windows_search_compression_DEPENDENCIES) @rm -f esedb_test_tools_windows_search_compression$(EXEEXT) $(AM_V_CCLD)$(LINK) $(esedb_test_tools_windows_search_compression_OBJECTS) $(esedb_test_tools_windows_search_compression_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ../esedbtools/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@../esedbtools/$(DEPDIR)/esedbtools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@../esedbtools/$(DEPDIR)/esedbtools_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@../esedbtools/$(DEPDIR)/info_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@../esedbtools/$(DEPDIR)/windows_search_compression.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_block_descriptor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_block_tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_block_tree_node.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_catalog.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_catalog_definition.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_checksum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_column.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_column_type.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_compression.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_data_definition.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_data_segment.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_database.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_error.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_file_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_functions.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_getopt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_index.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_io_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_leaf_page_descriptor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_long_value.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_memory.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_multi_value.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_notify.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_tree_key.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_tree_value.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_value.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_record.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_root_page_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_space_tree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_space_tree_value.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_support.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_table.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_table_definition.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_tools_info_handle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_tools_output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_tools_signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_tools_windows_search_compression.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: $(check_PROGRAMS) $(check_SCRIPTS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) $(check_SCRIPTS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? test_library.sh.log: test_library.sh @p='test_library.sh'; \ b='test_library.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test_tools.sh.log: test_tools.sh @p='test_tools.sh'; \ b='test_tools.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test_esedbinfo.sh.log: test_esedbinfo.sh @p='test_esedbinfo.sh'; \ b='test_esedbinfo.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test_esedbexport.sh.log: test_esedbexport.sh @p='test_esedbexport.sh'; \ b='test_esedbexport.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test_python_module.sh.log: test_python_module.sh @p='test_python_module.sh'; \ b='test_python_module.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) 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) -rm -f ../esedbtools/$(DEPDIR)/$(am__dirstamp) -rm -f ../esedbtools/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ../esedbtools/$(DEPDIR)/esedbtools_output.Po -rm -f ../esedbtools/$(DEPDIR)/esedbtools_signal.Po -rm -f ../esedbtools/$(DEPDIR)/info_handle.Po -rm -f ../esedbtools/$(DEPDIR)/windows_search_compression.Po -rm -f ./$(DEPDIR)/esedb_test_block_descriptor.Po -rm -f ./$(DEPDIR)/esedb_test_block_tree.Po -rm -f ./$(DEPDIR)/esedb_test_block_tree_node.Po -rm -f ./$(DEPDIR)/esedb_test_catalog.Po -rm -f ./$(DEPDIR)/esedb_test_catalog_definition.Po -rm -f ./$(DEPDIR)/esedb_test_checksum.Po -rm -f ./$(DEPDIR)/esedb_test_column.Po -rm -f ./$(DEPDIR)/esedb_test_column_type.Po -rm -f ./$(DEPDIR)/esedb_test_compression.Po -rm -f ./$(DEPDIR)/esedb_test_data_definition.Po -rm -f ./$(DEPDIR)/esedb_test_data_segment.Po -rm -f ./$(DEPDIR)/esedb_test_database.Po -rm -f ./$(DEPDIR)/esedb_test_error.Po -rm -f ./$(DEPDIR)/esedb_test_file.Po -rm -f ./$(DEPDIR)/esedb_test_file_header.Po -rm -f ./$(DEPDIR)/esedb_test_functions.Po -rm -f ./$(DEPDIR)/esedb_test_getopt.Po -rm -f ./$(DEPDIR)/esedb_test_index.Po -rm -f ./$(DEPDIR)/esedb_test_io_handle.Po -rm -f ./$(DEPDIR)/esedb_test_leaf_page_descriptor.Po -rm -f ./$(DEPDIR)/esedb_test_long_value.Po -rm -f ./$(DEPDIR)/esedb_test_memory.Po -rm -f ./$(DEPDIR)/esedb_test_multi_value.Po -rm -f ./$(DEPDIR)/esedb_test_notify.Po -rm -f ./$(DEPDIR)/esedb_test_page.Po -rm -f ./$(DEPDIR)/esedb_test_page_header.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree_key.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree_value.Po -rm -f ./$(DEPDIR)/esedb_test_page_value.Po -rm -f ./$(DEPDIR)/esedb_test_record.Po -rm -f ./$(DEPDIR)/esedb_test_root_page_header.Po -rm -f ./$(DEPDIR)/esedb_test_space_tree.Po -rm -f ./$(DEPDIR)/esedb_test_space_tree_value.Po -rm -f ./$(DEPDIR)/esedb_test_support.Po -rm -f ./$(DEPDIR)/esedb_test_table.Po -rm -f ./$(DEPDIR)/esedb_test_table_definition.Po -rm -f ./$(DEPDIR)/esedb_test_tools_info_handle.Po -rm -f ./$(DEPDIR)/esedb_test_tools_output.Po -rm -f ./$(DEPDIR)/esedb_test_tools_signal.Po -rm -f ./$(DEPDIR)/esedb_test_tools_windows_search_compression.Po -rm -f Makefile 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 -f ../esedbtools/$(DEPDIR)/esedbtools_output.Po -rm -f ../esedbtools/$(DEPDIR)/esedbtools_signal.Po -rm -f ../esedbtools/$(DEPDIR)/info_handle.Po -rm -f ../esedbtools/$(DEPDIR)/windows_search_compression.Po -rm -f ./$(DEPDIR)/esedb_test_block_descriptor.Po -rm -f ./$(DEPDIR)/esedb_test_block_tree.Po -rm -f ./$(DEPDIR)/esedb_test_block_tree_node.Po -rm -f ./$(DEPDIR)/esedb_test_catalog.Po -rm -f ./$(DEPDIR)/esedb_test_catalog_definition.Po -rm -f ./$(DEPDIR)/esedb_test_checksum.Po -rm -f ./$(DEPDIR)/esedb_test_column.Po -rm -f ./$(DEPDIR)/esedb_test_column_type.Po -rm -f ./$(DEPDIR)/esedb_test_compression.Po -rm -f ./$(DEPDIR)/esedb_test_data_definition.Po -rm -f ./$(DEPDIR)/esedb_test_data_segment.Po -rm -f ./$(DEPDIR)/esedb_test_database.Po -rm -f ./$(DEPDIR)/esedb_test_error.Po -rm -f ./$(DEPDIR)/esedb_test_file.Po -rm -f ./$(DEPDIR)/esedb_test_file_header.Po -rm -f ./$(DEPDIR)/esedb_test_functions.Po -rm -f ./$(DEPDIR)/esedb_test_getopt.Po -rm -f ./$(DEPDIR)/esedb_test_index.Po -rm -f ./$(DEPDIR)/esedb_test_io_handle.Po -rm -f ./$(DEPDIR)/esedb_test_leaf_page_descriptor.Po -rm -f ./$(DEPDIR)/esedb_test_long_value.Po -rm -f ./$(DEPDIR)/esedb_test_memory.Po -rm -f ./$(DEPDIR)/esedb_test_multi_value.Po -rm -f ./$(DEPDIR)/esedb_test_notify.Po -rm -f ./$(DEPDIR)/esedb_test_page.Po -rm -f ./$(DEPDIR)/esedb_test_page_header.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree_key.Po -rm -f ./$(DEPDIR)/esedb_test_page_tree_value.Po -rm -f ./$(DEPDIR)/esedb_test_page_value.Po -rm -f ./$(DEPDIR)/esedb_test_record.Po -rm -f ./$(DEPDIR)/esedb_test_root_page_header.Po -rm -f ./$(DEPDIR)/esedb_test_space_tree.Po -rm -f ./$(DEPDIR)/esedb_test_space_tree_value.Po -rm -f ./$(DEPDIR)/esedb_test_support.Po -rm -f ./$(DEPDIR)/esedb_test_table.Po -rm -f ./$(DEPDIR)/esedb_test_table_definition.Po -rm -f ./$(DEPDIR)/esedb_test_tools_info_handle.Po -rm -f ./$(DEPDIR)/esedb_test_tools_output.Po -rm -f ./$(DEPDIR)/esedb_test_tools_signal.Po -rm -f ./$(DEPDIR)/esedb_test_tools_windows_search_compression.Po -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ cscopelist-am ctags ctags-am 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 \ recheck sources-am sources-local splint-am splint-local tags \ tags-am uninstall uninstall-am .PRECIOUS: 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: libesedb-20240420/tests/esedb_test_root_page_header.c0000644000175000017500000002211014610727254023362 0ustar00lordyestalordyesta/* * Library root_page_header type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_root_page_header.h" uint8_t esedb_test_root_page_header_data1[ 16 ] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_root_page_header_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_root_page_header_initialize( void ) { libcerror_error_t *error = NULL; libesedb_root_page_header_t *root_page_header = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_root_page_header_initialize( &root_page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_root_page_header_free( &root_page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_root_page_header_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); root_page_header = (libesedb_root_page_header_t *) 0x12345678UL; result = libesedb_root_page_header_initialize( &root_page_header, &error ); root_page_header = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_root_page_header_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_root_page_header_initialize( &root_page_header, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( root_page_header != NULL ) { libesedb_root_page_header_free( &root_page_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_root_page_header_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_root_page_header_initialize( &root_page_header, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( root_page_header != NULL ) { libesedb_root_page_header_free( &root_page_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( root_page_header != NULL ) { libesedb_root_page_header_free( &root_page_header, NULL ); } return( 0 ); } /* Tests the libesedb_root_page_header_free function * Returns 1 if successful or 0 if not */ int esedb_test_root_page_header_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_root_page_header_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_root_page_header_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_root_page_header_read_data( void ) { libcerror_error_t *error = NULL; libesedb_root_page_header_t *root_page_header = NULL; int result = 0; /* Initialize test */ result = libesedb_root_page_header_initialize( &root_page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_root_page_header_read_data( root_page_header, esedb_test_root_page_header_data1, 16, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_root_page_header_read_data( NULL, esedb_test_root_page_header_data1, 16, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_root_page_header_read_data( root_page_header, NULL, 16, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_root_page_header_read_data( root_page_header, esedb_test_root_page_header_data1, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_root_page_header_read_data( root_page_header, esedb_test_root_page_header_data1, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_root_page_header_free( &root_page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "root_page_header", root_page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( root_page_header != NULL ) { libesedb_root_page_header_free( &root_page_header, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_root_page_header_initialize", esedb_test_root_page_header_initialize ); ESEDB_TEST_RUN( "libesedb_root_page_header_free", esedb_test_root_page_header_free ); ESEDB_TEST_RUN( "libesedb_root_page_header_read_data", esedb_test_root_page_header_read_data ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_long_value.c0000644000175000017500000000646214610727556022247 0ustar00lordyestalordyesta/* * Library long_value type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_long_value.h" /* Tests the libesedb_long_value_free function * Returns 1 if successful or 0 if not */ int esedb_test_long_value_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_long_value_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_long_value_initialize */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_long_value_free", esedb_test_long_value_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* TODO: add tests for libesedb_long_value_get_data_size */ /* TODO: add tests for libesedb_long_value_get_data */ /* TODO: add tests for libesedb_long_value_get_record_value */ /* TODO: add tests for libesedb_long_value_get_number_of_data_segments */ /* TODO: add tests for libesedb_long_value_get_data_segment_size */ /* TODO: add tests for libesedb_long_value_get_data_segment */ /* TODO: add tests for libesedb_long_value_get_utf8_string_size */ /* TODO: add tests for libesedb_long_value_get_utf8_string */ /* TODO: add tests for libesedb_long_value_get_utf16_string_size */ /* TODO: add tests for libesedb_long_value_get_utf16_string */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_page_value.c0000644000175000017500000001357314610727254022220 0ustar00lordyestalordyesta/* * Library page_value type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_page_value.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_value_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_value_initialize( void ) { libcerror_error_t *error = NULL; libesedb_page_value_t *page_value = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_page_value_initialize( &page_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_value", page_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_value_free( &page_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_value", page_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_value_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page_value = (libesedb_page_value_t *) 0x12345678UL; result = libesedb_page_value_initialize( &page_value, &error ); page_value = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_value_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_value_initialize( &page_value, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page_value != NULL ) { libesedb_page_value_free( &page_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_value", page_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_value_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_value_initialize( &page_value, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page_value != NULL ) { libesedb_page_value_free( &page_value, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_value", page_value ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_value != NULL ) { libesedb_page_value_free( &page_value, NULL ); } return( 0 ); } /* Tests the libesedb_page_value_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_value_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_value_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_value_initialize", esedb_test_page_value_initialize ); ESEDB_TEST_RUN( "libesedb_page_value_free", esedb_test_page_value_free ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_page_tree_key.c0000644000175000017500000003527514610727556022723 0ustar00lordyestalordyesta/* * Library page_tree_key type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_libfdata.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_definitions.h" #include "../libesedb/libesedb_page_tree_key.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_tree_key_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_key_initialize( void ) { libcerror_error_t *error = NULL; libesedb_page_tree_key_t *page_tree_key = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_key_free( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_key_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page_tree_key = (libesedb_page_tree_key_t *) 0x12345678UL; result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); page_tree_key = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_tree_key_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page_tree_key != NULL ) { libesedb_page_tree_key_free( &page_tree_key, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_tree_key_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page_tree_key != NULL ) { libesedb_page_tree_key_free( &page_tree_key, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree_key != NULL ) { libesedb_page_tree_key_free( &page_tree_key, NULL ); } return( 0 ); } /* Tests the libesedb_page_tree_key_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_key_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_tree_key_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_page_tree_key_set_data function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_key_set_data( void ) { uint8_t key_data[ 6 ] = { 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02 }; libcerror_error_t *error = NULL; libesedb_page_tree_key_t *page_tree_key = NULL; int result = 0; /* Initialize test */ result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_tree_key_set_data( page_tree_key, key_data, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_key_set_data( NULL, key_data, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_key_set_data( page_tree_key, NULL, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_key_set_data( page_tree_key, key_data, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_tree_key_free( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree_key != NULL ) { libesedb_page_tree_key_free( &page_tree_key, NULL ); } return( 0 ); } /* Tests the libesedb_page_tree_key_append_data function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_key_append_data( void ) { uint8_t key_data[ 6 ] = { 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02 }; uint8_t additional_key_data[ 3 ] = { 0x7f, 0x80, 0x00 }; libcerror_error_t *error = NULL; libesedb_page_tree_key_t *page_tree_key = NULL; int result = 0; /* Initialize test */ result = libesedb_page_tree_key_initialize( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_key_set_data( page_tree_key, key_data, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_tree_key_append_data( page_tree_key, additional_key_data, 3, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_key_append_data( NULL, additional_key_data, 3, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_key_append_data( page_tree_key, NULL, 3, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_key_append_data( page_tree_key, additional_key_data, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_tree_key_free( &page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree_key", page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree_key != NULL ) { libesedb_page_tree_key_free( &page_tree_key, NULL ); } return( 0 ); } /* Tests the libesedb_page_tree_key_compare function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_key_compare( void ) { uint8_t first_key_data[ 6 ] = { 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02 }; uint8_t second_key_data[ 6 ] = { 0x01, 0x7f, 0x80, 0x00, 0x00, 0x02 }; libcerror_error_t *error = NULL; libesedb_page_tree_key_t *first_page_tree_key = NULL; libesedb_page_tree_key_t *second_page_tree_key = NULL; int result = 0; /* Initialize test */ result = libesedb_page_tree_key_initialize( &first_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "first_page_tree_key", first_page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_key_set_data( first_page_tree_key, first_key_data, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); first_page_tree_key->type = LIBESEDB_KEY_TYPE_INDEX_VALUE; result = libesedb_page_tree_key_initialize( &second_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "second_page_tree_key", second_page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_key_set_data( second_page_tree_key, second_key_data, 6, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); second_page_tree_key->type = LIBESEDB_KEY_TYPE_LEAF; /* Test regular cases */ result = libesedb_page_tree_key_compare( first_page_tree_key, second_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, LIBFDATA_COMPARE_EQUAL ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_key_compare( NULL, second_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_key_compare( first_page_tree_key, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_tree_key_free( &second_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "second_page_tree_key", second_page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_key_free( &first_page_tree_key, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "first_page_tree_key", first_page_tree_key ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( second_page_tree_key != NULL ) { libesedb_page_tree_key_free( &second_page_tree_key, NULL ); } if( first_page_tree_key != NULL ) { libesedb_page_tree_key_free( &first_page_tree_key, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_tree_key_initialize", esedb_test_page_tree_key_initialize ); ESEDB_TEST_RUN( "libesedb_page_tree_key_free", esedb_test_page_tree_key_free ); ESEDB_TEST_RUN( "libesedb_page_tree_key_set_data", esedb_test_page_tree_key_set_data ); ESEDB_TEST_RUN( "libesedb_page_tree_key_append_data", esedb_test_page_tree_key_append_data ); ESEDB_TEST_RUN( "libesedb_page_tree_key_compare", esedb_test_page_tree_key_compare ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_block_descriptor.c0000644000175000017500000001451414610727556023441 0ustar00lordyestalordyesta/* * Library block_descriptor type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_block_descriptor.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_block_descriptor_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_block_descriptor_initialize( void ) { libcerror_error_t *error = NULL; libesedb_block_descriptor_t *block_descriptor = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_block_descriptor_initialize( &block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_block_descriptor_free( &block_descriptor, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_block_descriptor_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); block_descriptor = (libesedb_block_descriptor_t *) 0x12345678UL; result = libesedb_block_descriptor_initialize( &block_descriptor, &error ); block_descriptor = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_block_descriptor_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_block_descriptor_initialize( &block_descriptor, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( block_descriptor != NULL ) { libesedb_block_descriptor_free( &block_descriptor, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_block_descriptor_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_block_descriptor_initialize( &block_descriptor, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( block_descriptor != NULL ) { libesedb_block_descriptor_free( &block_descriptor, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "block_descriptor", block_descriptor ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( block_descriptor != NULL ) { libesedb_block_descriptor_free( &block_descriptor, NULL ); } return( 0 ); } /* Tests the libesedb_block_descriptor_free function * Returns 1 if successful or 0 if not */ int esedb_test_block_descriptor_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_block_descriptor_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_block_descriptor_initialize", esedb_test_block_descriptor_initialize ); ESEDB_TEST_RUN( "libesedb_block_descriptor_free", esedb_test_block_descriptor_free ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/esedb_test_page_tree.c0000644000175000017500000002156614610727556022051 0ustar00lordyestalordyesta/* * Library page_tree type testing program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_io_handle.h" #include "../libesedb/libesedb_page_tree.h" #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_tree_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_initialize( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_tree_t *page_tree = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 3; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->file_size = 16777216; io_handle->page_size = 4096; /* Test page_tree initialization */ result = libesedb_page_tree_initialize( &page_tree, io_handle, NULL, NULL, 0, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_tree", page_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_tree_free( &page_tree, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree", page_tree ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_tree_initialize( NULL, io_handle, NULL, NULL, 0, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page_tree = (libesedb_page_tree_t *) 0x12345678UL; result = libesedb_page_tree_initialize( &page_tree, io_handle, NULL, NULL, 0, 1, NULL, NULL, &error ); page_tree = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_tree_initialize( &page_tree, NULL, NULL, NULL, 0, 1, NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_tree_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_tree_initialize( &page_tree, io_handle, NULL, NULL, 0, 1, NULL, NULL, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page_tree != NULL ) { libesedb_page_tree_free( &page_tree, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree", page_tree ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_tree_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_tree_initialize( &page_tree, io_handle, NULL, NULL, 0, 1, NULL, NULL, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page_tree != NULL ) { libesedb_page_tree_free( &page_tree, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_tree", page_tree ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_tree != NULL ) { libesedb_page_tree_free( &page_tree, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_tree_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_tree_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_page_tree_read_root_page_header function * Returns 1 if successful or 0 if not */ int esedb_test_page_tree_read_root_page_header( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_tree_read_root_page_header( NULL, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_tree_initialize", esedb_test_page_tree_initialize ); ESEDB_TEST_RUN( "libesedb_page_tree_free", esedb_test_page_tree_free ); ESEDB_TEST_RUN( "libesedb_page_tree_read_root_page_header", esedb_test_page_tree_read_root_page_header ); /* TODO: add tests for libesedb_page_tree_read_space_trees */ /* TODO: add tests for libesedb_page_tree_get_key */ /* TODO: add tests for libesedb_page_tree_get_number_of_leaf_values_from_page */ /* TODO: add tests for libesedb_page_tree_get_number_of_leaf_values */ /* TODO: add tests for libesedb_page_tree_get_leaf_value_by_index_from_page */ /* TODO: add tests for libesedb_page_tree_get_leaf_value_by_index */ /* TODO: add tests for libesedb_page_tree_get_leaf_value_by_key_from_page */ /* TODO: add tests for libesedb_page_tree_get_leaf_value_by_key */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: return( EXIT_FAILURE ); } libesedb-20240420/tests/esedb_test_page.c0000644000175000017500000016172614610727556021035 0ustar00lordyestalordyesta/* * Library page type testing program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_functions.h" #include "esedb_test_libbfio.h" #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_io_handle.h" #include "../libesedb/libesedb_page.h" #include "../libesedb/libesedb_page_header.h" uint8_t esedb_test_page_data1[ 4096 ] = { 0x22, 0xcb, 0xba, 0x88, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x03, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_initialize( void ) { libcerror_error_t *error = NULL; libesedb_page_t *page = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 3; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test page initialization */ result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page = (libesedb_page_t *) 0x12345678UL; result = libesedb_page_initialize( &page, &error ); page = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_initialize( &page, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page != NULL ) { libesedb_page_free( &page, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_initialize( &page, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page != NULL ) { libesedb_page_free( &page, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } return( 0 ); } /* Tests the libesedb_page_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_page_calculate_checksums function * Returns 1 if successful or 0 if not */ int esedb_test_page_calculate_checksums( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_t *page = NULL; uint32_t ecc32_checksum = 0; uint32_t xor32_checksum = 0; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_calculate_checksums( page, io_handle, esedb_test_page_data1, 4096, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_calculate_checksums( NULL, io_handle, esedb_test_page_data1, 4096, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_calculate_checksums( page, NULL, esedb_test_page_data1, 4096, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_calculate_checksums( page, io_handle, NULL, 4096, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_calculate_checksums( page, io_handle, esedb_test_page_data1, 0, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_calculate_checksums( page, io_handle, esedb_test_page_data1, (size_t) SSIZE_MAX + 1, &ecc32_checksum, &xor32_checksum, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_calculate_checksums( page, io_handle, esedb_test_page_data1, 4096, &ecc32_checksum, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_read_tags function * Returns 1 if successful or 0 if not */ int esedb_test_page_read_tags( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_t *page = NULL; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_read_tags( page, io_handle, esedb_test_page_data1, 4096, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_read_tags( NULL, io_handle, esedb_test_page_data1, 4096, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_tags( page, NULL, esedb_test_page_data1, 4096, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_tags( page, io_handle, NULL, 4096, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_tags( page, io_handle, esedb_test_page_data1, 0, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_tags( page, io_handle, esedb_test_page_data1, (size_t) SSIZE_MAX + 1, 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_tags( page, io_handle, esedb_test_page_data1, 4096, 8192 / 4, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_read_values function * Returns 1 if successful or 0 if not */ int esedb_test_page_read_values( void ) { uint8_t page_data[ 4096 ]; libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_t *page = NULL; void *memcpy_result = NULL; int result = 0; /* Initialize test */ memcpy_result = memory_copy( page_data, esedb_test_page_data1, 4096 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "memcpy_result", memcpy_result ); result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_header_read_data( page->header, io_handle, page_data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_read_values( page, io_handle, page_data, 4096, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_read_values( NULL, io_handle, page_data, 4096, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_values( page, NULL, page_data, 4096, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_values( page, io_handle, NULL, 4096, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_values( page, io_handle, page_data, (size_t) SSIZE_MAX + 1, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_read_file_io_handle function * Returns 1 if successful or 0 if not */ int esedb_test_page_read_file_io_handle( void ) { libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_t *page = NULL; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize file IO handle */ result = esedb_test_open_file_io_handle( &file_io_handle, esedb_test_page_data1, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "file_io_handle", file_io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_read_file_io_handle( page, io_handle, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Initialize test */ result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_read_file_io_handle( NULL, io_handle, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page->data = (uint8_t *) 0x12345678UL; result = libesedb_page_read_file_io_handle( page, io_handle, file_io_handle, 0, &error ); page->data = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_read_file_io_handle( page, NULL, file_io_handle, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up file IO handle */ result = esedb_test_close_file_io_handle( &file_io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_get_previous_page_number function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_previous_page_number( libesedb_page_t *page ) { libcerror_error_t *error = NULL; uint32_t previous_page_number = 0; int result = 0; /* Test regular cases */ result = libesedb_page_get_previous_page_number( page, &previous_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "previous_page_number", previous_page_number, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_previous_page_number( NULL, &previous_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_previous_page_number( page, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_get_next_page_number function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_next_page_number( libesedb_page_t *page ) { libcerror_error_t *error = NULL; uint32_t next_page_number = 0; int result = 0; /* Test regular cases */ result = libesedb_page_get_next_page_number( page, &next_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "next_page_number", next_page_number, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_next_page_number( NULL, &next_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_next_page_number( page, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_get_father_data_page_object_identifier function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_father_data_page_object_identifier( libesedb_page_t *page ) { libcerror_error_t *error = NULL; uint32_t father_data_page_object_identifier = 0; int result = 0; /* Test regular cases */ result = libesedb_page_get_father_data_page_object_identifier( page, &father_data_page_object_identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "father_data_page_object_identifier", father_data_page_object_identifier, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_father_data_page_object_identifier( NULL, &father_data_page_object_identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_father_data_page_object_identifier( page, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_get_flags function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_flags( libesedb_page_t *page ) { libcerror_error_t *error = NULL; uint32_t flags = 0; int result = 0; /* Test regular cases */ result = libesedb_page_get_flags( page, &flags, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "flags", flags, (uint32_t) 0x00000803UL ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_flags( NULL, &flags, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_flags( page, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_get_number_of_values function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_number_of_values( libesedb_page_t *page ) { libcerror_error_t *error = NULL; uint16_t number_of_values = 0; int result = 0; /* Test regular cases */ result = libesedb_page_get_number_of_values( page, &number_of_values, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT16( "number_of_values", number_of_values, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_number_of_values( NULL, &number_of_values, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_number_of_values( page, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_get_value_by_index function * Returns 1 if successful or 0 if not */ int esedb_test_page_get_value_by_index( libesedb_page_t *page ) { libcerror_error_t *error = NULL; libesedb_page_value_t *page_value = NULL; int result = 0; /* Test regular cases */ result = libesedb_page_get_value_by_index( page, 0, &page_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_value", page_value ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_get_value_by_index( NULL, 0, &page_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_value_by_index( page, -1, &page_value, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_get_value_by_index( page, 0, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) uint8_t page_data[ 4096 ]; libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_t *page = NULL; void *memcpy_result = NULL; int result = 0; #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_initialize", esedb_test_page_initialize ); ESEDB_TEST_RUN( "libesedb_page_free", esedb_test_page_free ); ESEDB_TEST_RUN( "libesedb_page_calculate_checksums", esedb_test_page_calculate_checksums ); ESEDB_TEST_RUN( "libesedb_page_read_tags", esedb_test_page_read_tags ); ESEDB_TEST_RUN( "libesedb_page_read_values", esedb_test_page_read_values ); ESEDB_TEST_RUN( "libesedb_page_read_file_io_handle", esedb_test_page_read_file_io_handle ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) /* Initialize test */ memcpy_result = memory_copy( page_data, esedb_test_page_data1, 4096 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "memcpy_result", memcpy_result ); result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_initialize( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_header_read_data( page->header, io_handle, page_data, 4096, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_read_values( page, io_handle, page_data, 4096, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Run tests */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_previous_page_number", esedb_test_page_get_previous_page_number, page ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_next_page_number", esedb_test_page_get_next_page_number, page ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_father_data_page_object_identifier", esedb_test_page_get_father_data_page_object_identifier, page ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_flags", esedb_test_page_get_flags, page ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_number_of_values", esedb_test_page_get_number_of_values, page ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_get_value_by_index", esedb_test_page_get_value_by_index, page ); /* Clean up */ result = libesedb_page_free( &page, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page", page ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page != NULL ) { libesedb_page_free( &page, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/esedb_test_page_header.c0000644000175000017500000004277714610727556022351 0ustar00lordyestalordyesta/* * Library page_header type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_io_handle.h" #include "../libesedb/libesedb_page_header.h" uint8_t esedb_test_page_header_data1[ 40 ] = { 0xc2, 0x26, 0x01, 0x00, 0xbe, 0x7e, 0xbe, 0x7e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x03, 0x28, 0x00, 0x00 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_page_header_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_initialize( void ) { libcerror_error_t *error = NULL; libesedb_page_header_t *page_header = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Test regular cases */ result = libesedb_page_header_initialize( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_header_free( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_initialize( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); page_header = (libesedb_page_header_t *) 0x12345678UL; result = libesedb_page_header_initialize( &page_header, &error ); page_header = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_page_header_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_page_header_initialize( &page_header, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( page_header != NULL ) { libesedb_page_header_free( &page_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_page_header_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_page_header_initialize( &page_header, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( page_header != NULL ) { libesedb_page_header_free( &page_header, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_header != NULL ) { libesedb_page_header_free( &page_header, NULL ); } return( 0 ); } /* Tests the libesedb_page_header_free function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_page_header_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_page_header_read_data function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_read_data( void ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_header_t *page_header = NULL; int result = 0; /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_header_initialize( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_page_header_read_data( page_header, io_handle, esedb_test_page_header_data1, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_read_data( NULL, io_handle, esedb_test_page_header_data1, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_read_data( page_header, io_handle, NULL, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_read_data( page_header, io_handle, esedb_test_page_header_data1, (size_t) SSIZE_MAX + 1, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_read_data( page_header, io_handle, esedb_test_page_header_data1, 0, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); /* Clean up */ result = libesedb_page_header_free( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_header != NULL ) { libesedb_page_header_free( &page_header, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } /* Tests the libesedb_page_header_get_previous_page_number function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_get_previous_page_number( libesedb_page_header_t *page_header ) { libcerror_error_t *error = NULL; uint32_t previous_page_number = 0; int result = 0; /* Test regular cases */ result = libesedb_page_header_get_previous_page_number( page_header, &previous_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "previous_page_number", previous_page_number, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_get_previous_page_number( NULL, &previous_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_get_previous_page_number( page_header, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_header_get_next_page_number function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_get_next_page_number( libesedb_page_header_t *page_header ) { libcerror_error_t *error = NULL; uint32_t next_page_number = 0; int result = 0; /* Test regular cases */ result = libesedb_page_header_get_next_page_number( page_header, &next_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "next_page_number", next_page_number, 0 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_get_next_page_number( NULL, &next_page_number, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_get_next_page_number( page_header, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_header_get_father_data_page_object_identifier function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_get_father_data_page_object_identifier( libesedb_page_header_t *page_header ) { libcerror_error_t *error = NULL; uint32_t father_data_page_object_identifier = 0; int result = 0; /* Test regular cases */ result = libesedb_page_header_get_father_data_page_object_identifier( page_header, &father_data_page_object_identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "father_data_page_object_identifier", father_data_page_object_identifier, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_get_father_data_page_object_identifier( NULL, &father_data_page_object_identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_get_father_data_page_object_identifier( page_header, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } /* Tests the libesedb_page_header_get_flags function * Returns 1 if successful or 0 if not */ int esedb_test_page_header_get_flags( libesedb_page_header_t *page_header ) { libcerror_error_t *error = NULL; uint32_t flags = 0; int result = 0; /* Test regular cases */ result = libesedb_page_header_get_flags( page_header, &flags, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "flags", flags, (uint32_t) 0x00002803UL ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_page_header_get_flags( NULL, &flags, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_page_header_get_flags( page_header, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; libesedb_page_header_t *page_header = NULL; int result = 0; #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_page_header_initialize", esedb_test_page_header_initialize ); ESEDB_TEST_RUN( "libesedb_page_header_free", esedb_test_page_header_free ); ESEDB_TEST_RUN( "libesedb_page_header_read_data", esedb_test_page_header_read_data ); #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); io_handle->format_revision = 0x0000000c; io_handle->page_size = 4096; result = libesedb_page_header_initialize( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_page_header_read_data( page_header, io_handle, esedb_test_page_header_data1, 40, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Run tests */ ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_header_get_previous_page_number", esedb_test_page_header_get_previous_page_number, page_header ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_header_get_next_page_number", esedb_test_page_header_get_next_page_number, page_header ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_header_get_father_data_page_object_identifier", esedb_test_page_header_get_father_data_page_object_identifier, page_header ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_page_header_get_flags", esedb_test_page_header_get_flags, page_header ); /* Clean up */ result = libesedb_page_header_free( &page_header, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "page_header", page_header ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( page_header != NULL ) { libesedb_page_header_free( &page_header, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( EXIT_FAILURE ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ } libesedb-20240420/tests/esedb_test_column.c0000644000175000017500000005400714610727556021407 0ustar00lordyestalordyesta/* * Library column type test program * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "esedb_test_libcerror.h" #include "esedb_test_libesedb.h" #include "esedb_test_macros.h" #include "esedb_test_memory.h" #include "esedb_test_unused.h" #include "../libesedb/libesedb_catalog_definition.h" #include "../libesedb/libesedb_column.h" #include "../libesedb/libesedb_io_handle.h" uint8_t esedb_test_column_catalog_definition_data1[ 45 ] = { 0x08, 0x80, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0b, 0x00, 0x4d, 0x53, 0x79, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73 }; #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) /* Tests the libesedb_column_initialize function * Returns 1 if successful or 0 if not */ int esedb_test_column_initialize( void ) { libcerror_error_t *error = NULL; libesedb_catalog_definition_t *catalog_definition = NULL; libesedb_column_t *column = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #if defined( HAVE_ESEDB_TEST_MEMORY ) int number_of_malloc_fail_tests = 1; int number_of_memset_fail_tests = 1; int test_number = 0; #endif /* Initialize test */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test regular cases */ result = libesedb_column_initialize( &column, io_handle, catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_column_free( &column, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_column_initialize( NULL, io_handle, catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); column = (libesedb_column_t *) 0x12345678UL; result = libesedb_column_initialize( &column, io_handle, catalog_definition, &error ); column = NULL; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_initialize( &column, NULL, catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_initialize( &column, io_handle, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); #if defined( HAVE_ESEDB_TEST_MEMORY ) for( test_number = 0; test_number < number_of_malloc_fail_tests; test_number++ ) { /* Test libesedb_column_initialize with malloc failing */ esedb_test_malloc_attempts_before_fail = test_number; result = libesedb_column_initialize( &column, io_handle, catalog_definition, &error ); if( esedb_test_malloc_attempts_before_fail != -1 ) { esedb_test_malloc_attempts_before_fail = -1; if( column != NULL ) { libesedb_column_free( &column, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } for( test_number = 0; test_number < number_of_memset_fail_tests; test_number++ ) { /* Test libesedb_column_initialize with memset failing */ esedb_test_memset_attempts_before_fail = test_number; result = libesedb_column_initialize( &column, io_handle, catalog_definition, &error ); if( esedb_test_memset_attempts_before_fail != -1 ) { esedb_test_memset_attempts_before_fail = -1; if( column != NULL ) { libesedb_column_free( &column, NULL ); } } else { ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); } } #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */ /* Clean up */ result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } if( column != NULL ) { libesedb_column_free( &column, NULL ); } if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } return( 0 ); } #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* Tests the libesedb_column_free function * Returns 1 if successful or 0 if not */ int esedb_test_column_free( void ) { libcerror_error_t *error = NULL; int result = 0; /* Test error cases */ result = libesedb_column_free( NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_identifier function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_identifier( libesedb_column_t *column ) { libcerror_error_t *error = NULL; uint32_t identifier = 0; int result = 0; /* Test regular cases */ result = libesedb_column_get_identifier( column, &identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "identifier", identifier, 2 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_column_get_identifier( NULL, &identifier, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_identifier( column, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_type function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_type( libesedb_column_t *column ) { libcerror_error_t *error = NULL; uint32_t column_type = 0; int result = 0; /* Test regular cases */ result = libesedb_column_get_type( column, &column_type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_UINT32( "column_type", column_type, 4 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_column_get_type( NULL, &column_type, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_type( column, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_utf8_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_utf8_name_size( libesedb_column_t *column ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; size_t utf8_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_column_get_utf8_name_size( column, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf8_string_size", utf8_string_size, (size_t) 12 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_column_get_utf8_name_size( NULL, &utf8_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = ( (libesedb_internal_column_t *) column )->io_handle; ( (libesedb_internal_column_t *) column )->io_handle = NULL; result = libesedb_column_get_utf8_name_size( column, &utf8_string_size, &error ); ( (libesedb_internal_column_t *) column )->io_handle = io_handle; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_utf8_name_size( column, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_utf8_name function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_utf8_name( libesedb_column_t *column ) { uint8_t utf8_string[ 32 ]; uint8_t expected_utf8_string[ 12 ] = { 'M', 'S', 'y', 's', 'O', 'b', 'j', 'e', 'c', 't', 's', 0 }; libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; /* Test regular cases */ result = libesedb_column_get_utf8_name( column, utf8_string, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf8_string, expected_utf8_string, 12 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_column_get_utf8_name( NULL, utf8_string, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = ( (libesedb_internal_column_t *) column )->io_handle; ( (libesedb_internal_column_t *) column )->io_handle = NULL; result = libesedb_column_get_utf8_name( column, utf8_string, 32, &error ); ( (libesedb_internal_column_t *) column )->io_handle = io_handle; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_utf8_name( column, NULL, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_utf16_name_size function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_utf16_name_size( libesedb_column_t *column ) { libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; size_t utf16_string_size = 0; int result = 0; /* Test regular cases */ result = libesedb_column_get_utf16_name_size( column, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_EQUAL_SIZE( "utf16_string_size", utf16_string_size, (size_t) 12 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); /* Test error cases */ result = libesedb_column_get_utf16_name_size( NULL, &utf16_string_size, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = ( (libesedb_internal_column_t *) column )->io_handle; ( (libesedb_internal_column_t *) column )->io_handle = NULL; result = libesedb_column_get_utf16_name_size( column, &utf16_string_size, &error ); ( (libesedb_internal_column_t *) column )->io_handle = io_handle; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_utf16_name_size( column, NULL, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } /* Tests the libesedb_column_get_utf16_name function * Returns 1 if successful or 0 if not */ int esedb_test_column_get_utf16_name( libesedb_column_t *column ) { uint16_t utf16_string[ 32 ]; uint16_t expected_utf16_string[ 12 ] = { 'M', 'S', 'y', 's', 'O', 'b', 'j', 'e', 'c', 't', 's', 0 }; libcerror_error_t *error = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; /* Test regular cases */ result = libesedb_column_get_utf16_name( column, utf16_string, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = memory_compare( utf16_string, expected_utf16_string, 12 ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 0 ); /* Test error cases */ result = libesedb_column_get_utf16_name( NULL, utf16_string, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); io_handle = ( (libesedb_internal_column_t *) column )->io_handle; ( (libesedb_internal_column_t *) column )->io_handle = NULL; result = libesedb_column_get_utf16_name( column, utf16_string, 32, &error ); ( (libesedb_internal_column_t *) column )->io_handle = io_handle; ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); result = libesedb_column_get_utf16_name( column, NULL, 32, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, -1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "error", error ); libcerror_error_free( &error ); return( 1 ); on_error: if( error != NULL ) { libcerror_error_free( &error ); } return( 0 ); } #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ /* The main program */ #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #else int main( int argc ESEDB_TEST_ATTRIBUTE_UNUSED, char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED ) #endif { #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) libcerror_error_t *error = NULL; libesedb_catalog_definition_t *catalog_definition = NULL; libesedb_column_t *column = NULL; libesedb_io_handle_t *io_handle = NULL; int result = 0; #endif ESEDB_TEST_UNREFERENCED_PARAMETER( argc ) ESEDB_TEST_UNREFERENCED_PARAMETER( argv ) #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) ESEDB_TEST_RUN( "libesedb_column_initialize", esedb_test_column_initialize ); #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ ESEDB_TEST_RUN( "libesedb_column_free", esedb_test_column_free ); #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) /* Initialize column for tests */ result = libesedb_io_handle_initialize( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_initialize( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_read_data( catalog_definition, esedb_test_column_catalog_definition_data1, 45, LIBESEDB_CODEPAGE_WINDOWS_1252, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_column_initialize( &column, io_handle, catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NOT_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_identifier", esedb_test_column_get_identifier, column ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_type", esedb_test_column_get_type, column ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_utf8_name_size", esedb_test_column_get_utf8_name_size, column ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_utf8_name", esedb_test_column_get_utf8_name, column ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_utf16_name_size", esedb_test_column_get_utf16_name_size, column ); ESEDB_TEST_RUN_WITH_ARGS( "libesedb_column_get_utf16_name", esedb_test_column_get_utf16_name, column ); /* Clean up */ result = libesedb_column_free( &column, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "column", column ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_catalog_definition_free( &catalog_definition, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "catalog_definition", catalog_definition ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); result = libesedb_io_handle_free( &io_handle, &error ); ESEDB_TEST_ASSERT_EQUAL_INT( "result", result, 1 ); ESEDB_TEST_ASSERT_IS_NULL( "io_handle", io_handle ); ESEDB_TEST_ASSERT_IS_NULL( "error", error ); #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #endif /* defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) */ return( EXIT_SUCCESS ); on_error: #if defined( __GNUC__ ) && !defined( LIBESEDB_DLL_IMPORT ) if( error != NULL ) { libcerror_error_free( &error ); } if( column != NULL ) { libesedb_column_free( &column, NULL ); } if( catalog_definition != NULL ) { libesedb_catalog_definition_free( &catalog_definition, NULL ); } if( io_handle != NULL ) { libesedb_io_handle_free( &io_handle, NULL ); } #endif return( EXIT_FAILURE ); } libesedb-20240420/tests/test_library.sh0000755000175000017500000001045614610730144020572 0ustar00lordyestalordyesta#!/usr/bin/env bash # Tests library functions and types. # # Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; EXIT_IGNORE=77; LIBRARY_TESTS="block_descriptor block_tree block_tree_node catalog catalog_definition checksum column column_type compression data_definition data_segment database error file_header index io_handle leaf_page_descriptor long_value multi_value notify page page_header page_tree page_tree_key page_tree_value page_value record table root_page_header space_tree space_tree_value table_definition"; LIBRARY_TESTS_WITH_INPUT="file support"; OPTION_SETS=(); INPUT_GLOB="*"; run_test() { local TEST_NAME=$1; local TEST_DESCRIPTION="Testing: ${TEST_NAME}"; local TEST_EXECUTABLE="./esedb_test_${TEST_NAME}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe"; fi # TODO: add support for TEST_PROFILE and OPTION_SETS? run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_EXECUTABLE}"; local RESULT=$?; return ${RESULT}; } run_test_with_input() { local TEST_NAME=$1; local TEST_DESCRIPTION="Testing: ${TEST_NAME}"; local TEST_EXECUTABLE="./esedb_test_${TEST_NAME}"; if ! test -x "${TEST_EXECUTABLE}"; then TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe"; fi if ! test -d "input"; then echo "Test input directory not found."; return ${EXIT_IGNORE}; fi local RESULT=`ls input/* | tr ' ' '\n' | wc -l`; if test ${RESULT} -eq ${EXIT_SUCCESS}; then echo "No files or directories found in the test input directory"; return ${EXIT_IGNORE}; fi local TEST_PROFILE_DIRECTORY=$(get_test_profile_directory "input" "libesedb"); local IGNORE_LIST=$(read_ignore_list "${TEST_PROFILE_DIRECTORY}"); RESULT=${EXIT_SUCCESS}; for TEST_SET_INPUT_DIRECTORY in input/*; do if ! test -d "${TEST_SET_INPUT_DIRECTORY}"; then continue; fi if check_for_directory_in_ignore_list "${TEST_SET_INPUT_DIRECTORY}" "${IGNORE_LIST}"; then continue; fi local TEST_SET_DIRECTORY=$(get_test_set_directory "${TEST_PROFILE_DIRECTORY}" "${TEST_SET_INPUT_DIRECTORY}"); if test -f "${TEST_SET_DIRECTORY}/files"; then IFS="" read -a INPUT_FILES <<< $(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"); else IFS="" read -a INPUT_FILES <<< $(ls -1d ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}); fi for INPUT_FILE in "${INPUT_FILES[@]}"; do OPTION_INPUT_FILE="${INPUT_FILE}"; if test "${OSTYPE}" = "msys"; then # A test executable built with MinGW expects a Windows path. INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; fi local TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; do local TEST_DATA_OPTION_FILE=$(get_test_data_option_file "${TEST_SET_DIRECTORY}" "${OPTION_INPUT_FILE}" "${OPTION_SET}"); if test -f ${TEST_DATA_OPTION_FILE}; then TESTED_WITH_OPTIONS=1; IFS=" " read -a OPTIONS <<< $(read_test_data_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}"); run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" "${OPTIONS[@]}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi fi done if test ${TESTED_WITH_OPTIONS} -eq 0; then run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "default" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done return ${RESULT}; } if test -n "${SKIP_LIBRARY_TESTS}"; then exit ${EXIT_IGNORE}; fi TEST_DIRECTORY=`dirname $0`; TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then echo "Missing test runner: ${TEST_RUNNER}"; exit ${EXIT_FAILURE}; fi source ${TEST_RUNNER}; RESULT=${EXIT_IGNORE}; for TEST_NAME in ${LIBRARY_TESTS}; do run_test "${TEST_NAME}"; RESULT=$?; if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then exit ${RESULT}; fi for TEST_NAME in ${LIBRARY_TESTS_WITH_INPUT}; do if test -d "input"; then run_test_with_input "${TEST_NAME}"; RESULT=$?; else run_test "${TEST_NAME}"; RESULT=$?; fi if test ${RESULT} -ne ${EXIT_SUCCESS}; then break; fi done exit ${RESULT}; libesedb-20240420/tests/esedb_test_macros.h0000644000175000017500000002057614610727254021402 0ustar00lordyestalordyesta/* * Macros for testing * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _ESEDB_TEST_MACROS_H ) #define _ESEDB_TEST_MACROS_H #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #define ESEDB_TEST_ASSERT_EQUAL_INT( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%d) != %d\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%d) == %d\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_GREATER_THAN_INT( name, value, expected_value ) \ if( value <= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%d) <= %d\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_LESS_THAN_INT( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%d) >= %d\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_INTPTR( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (0x%08x" PRIjx ") != 0x%08x" PRIjx "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INTPTR( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (0x%08x" PRIjx ") == 0x%08x" PRIjx "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_FLOAT( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%f) != %f\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_FLOAT( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%f) == %f\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_SIZE( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIzd ") != %" PRIzd "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_SSIZE( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIzd ") != %" PRIzd "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_SSIZE( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIzd ") == %" PRIzd "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_INT8( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi8 ") != %" PRIi8 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT8( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi8 ") == %" PRIi8 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_UINT8( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi8 ") != %" PRIu8 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_LESS_THAN_UINT8( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi8 ") >= %" PRIu8 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_INT16( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi16 ") != %" PRIi16 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT16( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi16 ") == %" PRIi16 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_UINT16( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi16 ") != %" PRIu16 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_LESS_THAN_UINT16( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi16 ") >= %" PRIu16 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_INT32( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi32 ") != %" PRIi32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT32( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi32 ") == %" PRIi32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_UINT32( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIu32 ") != %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_LESS_THAN_UINT32( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIu32 ") >= %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_INT64( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi64 ") != %" PRIi64 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT64( name, value, expected_value ) \ if( value == expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIi64 ") == %" PRIi64 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_EQUAL_UINT64( name, value, expected_value ) \ if( value != expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIu64 ") != %" PRIu64 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_LESS_THAN_UINT64( name, value, expected_value ) \ if( value >= expected_value ) \ { \ fprintf( stdout, "%s:%d %s (%" PRIu64 ") >= %" PRIu64 "\n", __FILE__, __LINE__, name, value, expected_value ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_IS_NOT_NULL( name, value ) \ if( value == NULL ) \ { \ fprintf( stdout, "%s:%d %s == NULL\n", __FILE__, __LINE__, name ); \ goto on_error; \ } #define ESEDB_TEST_ASSERT_IS_NULL( name, value ) \ if( value != NULL ) \ { \ fprintf( stdout, "%s:%d %s != NULL\n", __FILE__, __LINE__, name ); \ goto on_error; \ } #define ESEDB_TEST_RUN( name, function ) \ if( function() != 1 ) \ { \ fprintf( stdout, "Unable to run test: %s\n", name ); \ goto on_error; \ } #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) #define ESEDB_TEST_RUN_WITH_ARGS( name, function, ... ) \ if( function( __VA_ARGS__ ) != 1 ) \ { \ fprintf( stdout, "Unable to run test: %s\n", name ); \ goto on_error; \ } #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */ #define ESEDB_TEST_FPRINT_ERROR( error ) \ libcerror_error_backtrace_fprint( error, stdout ); #endif /* !defined( _ESEDB_TEST_MACROS_H ) */ libesedb-20240420/ossfuzz/0000755000175000017500000000000014610746415016113 5ustar00lordyestalordyestalibesedb-20240420/ossfuzz/table_fuzzer.cc0000644000175000017500000000507514610727250021121 0ustar00lordyestalordyesta/* * OSS-Fuzz target for libesedb table type * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include /* Note that some of the OSS-Fuzz engines use C++ */ extern "C" { #include "ossfuzz_libbfio.h" #include "ossfuzz_libesedb.h" #if !defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ int LLVMFuzzerTestOneInput( const uint8_t *data, size_t size ) { libbfio_handle_t *file_io_handle = NULL; libesedb_file_t *file = NULL; libesedb_table_t *table = NULL; int number_of_tables = 0; if( libbfio_memory_range_initialize( &file_io_handle, NULL ) != 1 ) { return( 0 ); } if( libbfio_memory_range_set( file_io_handle, (uint8_t *) data, size, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_initialize( &file, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, NULL ) != 1 ) { goto on_error_libesedb_file; } if( libesedb_file_get_number_of_tables( file, &number_of_tables, NULL ) != 1 ) { goto on_error_libesedb_file; } if( number_of_tables > 0 ) { if( libesedb_file_get_table( file, 0, &table, NULL ) == 1 ) { libesedb_table_free( &table, NULL ); } } libesedb_file_close( file, NULL ); on_error_libesedb_file: libesedb_file_free( &file, NULL ); on_error_libbfio: libbfio_handle_free( &file_io_handle, NULL ); return( 0 ); } } /* extern "C" */ libesedb-20240420/ossfuzz/ossfuzz_libesedb.h0000644000175000017500000000171414610727250021637 0ustar00lordyestalordyesta/* * The libesedb header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _OSSFUZZ_LIBESEDB_H ) #define _OSSFUZZ_LIBESEDB_H #include #include #endif /* !defined( _OSSFUZZ_LIBESEDB_H ) */ libesedb-20240420/ossfuzz/Makefile.am0000644000175000017500000000456214610730635020153 0ustar00lordyestalordyestaif HAVE_LIB_FUZZING_ENGINE AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ bin_PROGRAMS = \ column_fuzzer \ file_fuzzer \ record_fuzzer \ table_fuzzer column_fuzzer_SOURCES = \ column_fuzzer.cc \ ossfuzz_libbfio.h \ ossfuzz_libesedb.h column_fuzzer_LDADD = \ @LIB_FUZZING_ENGINE@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ file_fuzzer_SOURCES = \ file_fuzzer.cc \ ossfuzz_libbfio.h \ ossfuzz_libesedb.h file_fuzzer_LDADD = \ @LIB_FUZZING_ENGINE@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ record_fuzzer_SOURCES = \ ossfuzz_libbfio.h \ ossfuzz_libesedb.h \ record_fuzzer.cc record_fuzzer_LDADD = \ @LIB_FUZZING_ENGINE@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ table_fuzzer_SOURCES = \ ossfuzz_libbfio.h \ ossfuzz_libesedb.h \ table_fuzzer.cc table_fuzzer_LDADD = \ @LIB_FUZZING_ENGINE@ \ @LIBBFIO_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCDATA_LIBADD@ \ ../libesedb/libesedb.la \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBINTL@ endif DISTCLEANFILES = \ Makefile \ Makefile.in splint-local: @echo "Running splint on column_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(column_fuzzer_SOURCES) @echo "Running splint on file_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_fuzzer_SOURCES) @echo "Running splint on record_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(record_fuzzer_SOURCES) @echo "Running splint on table_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(table_fuzzer_SOURCES) libesedb-20240420/ossfuzz/column_fuzzer.cc0000644000175000017500000000605614610727250021327 0ustar00lordyestalordyesta/* * OSS-Fuzz target for libesedb column type * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include /* Note that some of the OSS-Fuzz engines use C++ */ extern "C" { #include "ossfuzz_libbfio.h" #include "ossfuzz_libesedb.h" #if !defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ int LLVMFuzzerTestOneInput( const uint8_t *data, size_t size ) { libbfio_handle_t *file_io_handle = NULL; libesedb_column_t *column = NULL; libesedb_file_t *file = NULL; libesedb_table_t *table = NULL; int number_of_columns = 0; int number_of_tables = 0; if( libbfio_memory_range_initialize( &file_io_handle, NULL ) != 1 ) { return( 0 ); } if( libbfio_memory_range_set( file_io_handle, (uint8_t *) data, size, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_initialize( &file, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, NULL ) != 1 ) { goto on_error_libesedb_file; } if( libesedb_file_get_number_of_tables( file, &number_of_tables, NULL ) != 1 ) { goto on_error_libesedb_file; } if( number_of_tables > 0 ) { if( libesedb_file_get_table( file, 0, &table, NULL ) == 1 ) { if( libesedb_table_get_number_of_columns( table, &number_of_columns, 0, NULL ) != 1 ) { goto on_error_libesedb_table; } if( number_of_columns > 0 ) { if( libesedb_table_get_column( table, 0, &column, 0, NULL ) == 1 ) { libesedb_column_free( &column, NULL ); } } on_error_libesedb_table: libesedb_table_free( &table, NULL ); } } libesedb_file_close( file, NULL ); on_error_libesedb_file: libesedb_file_free( &file, NULL ); on_error_libbfio: libbfio_handle_free( &file_io_handle, NULL ); return( 0 ); } } /* extern "C" */ libesedb-20240420/ossfuzz/ossfuzz_libbfio.h0000644000175000017500000000331314610727250021471 0ustar00lordyestalordyesta/* * The libbfio header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _OSSFUZZ_LIBBFIO_H ) #define _OSSFUZZ_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 ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBBFIO_DLL_IMPORT #endif #include #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT ) #error Multi-threading support requires libbfio with multi-threading support #endif #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif /* !defined( _OSSFUZZ_LIBBFIO_H ) */ libesedb-20240420/ossfuzz/record_fuzzer.cc0000644000175000017500000000602714610727250021306 0ustar00lordyestalordyesta/* * OSS-Fuzz target for libesedb record type * * Copyright (C) 2011-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include /* Note that some of the OSS-Fuzz engines use C++ */ extern "C" { #include "ossfuzz_libbfio.h" #include "ossfuzz_libesedb.h" #if !defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ int LLVMFuzzerTestOneInput( const uint8_t *data, size_t size ) { libbfio_handle_t *file_io_handle = NULL; libesedb_file_t *file = NULL; libesedb_record_t *record = NULL; libesedb_table_t *table = NULL; int number_of_records = 0; int number_of_tables = 0; if( libbfio_memory_range_initialize( &file_io_handle, NULL ) != 1 ) { return( 0 ); } if( libbfio_memory_range_set( file_io_handle, (uint8_t *) data, size, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_initialize( &file, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, NULL ) != 1 ) { goto on_error_libesedb_file; } if( libesedb_file_get_number_of_tables( file, &number_of_tables, NULL ) != 1 ) { goto on_error_libesedb_file; } if( number_of_tables > 0 ) { if( libesedb_file_get_table( file, 0, &table, NULL ) == 1 ) { if( libesedb_table_get_number_of_records( table, &number_of_records, NULL ) != 1 ) { goto on_error_libesedb_table; } if( number_of_records > 0 ) { if( libesedb_table_get_record( table, 0, &record, NULL ) == 1 ) { libesedb_record_free( &record, NULL ); } } on_error_libesedb_table: libesedb_table_free( &table, NULL ); } } libesedb_file_close( file, NULL ); on_error_libesedb_file: libesedb_file_free( &file, NULL ); on_error_libbfio: libbfio_handle_free( &file_io_handle, NULL ); return( 0 ); } } /* extern "C" */ libesedb-20240420/ossfuzz/file_fuzzer.cc0000644000175000017500000000424614610727250020750 0ustar00lordyestalordyesta/* * OSS-Fuzz target for libesedb file type * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include /* Note that some of the OSS-Fuzz engines use C++ */ extern "C" { #include "ossfuzz_libbfio.h" #include "ossfuzz_libesedb.h" #if !defined( LIBESEDB_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBESEDB_EXTERN \ int libesedb_file_open_file_io_handle( libesedb_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libesedb_error_t **error ); #endif /* !defined( LIBESEDB_HAVE_BFIO ) */ int LLVMFuzzerTestOneInput( const uint8_t *data, size_t size ) { libbfio_handle_t *file_io_handle = NULL; libesedb_file_t *file = NULL; if( libbfio_memory_range_initialize( &file_io_handle, NULL ) != 1 ) { return( 0 ); } if( libbfio_memory_range_set( file_io_handle, (uint8_t *) data, size, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_initialize( &file, NULL ) != 1 ) { goto on_error_libbfio; } if( libesedb_file_open_file_io_handle( file, file_io_handle, LIBESEDB_OPEN_READ, NULL ) != 1 ) { goto on_error_libesedb; } libesedb_file_close( file, NULL ); on_error_libesedb: libesedb_file_free( &file, NULL ); on_error_libbfio: libbfio_handle_free( &file_io_handle, NULL ); return( 0 ); } } /* extern "C" */ libesedb-20240420/ossfuzz/Makefile.in0000644000175000017500000011373414610746266020175 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ @HAVE_LIB_FUZZING_ENGINE_TRUE@bin_PROGRAMS = column_fuzzer$(EXEEXT) \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ file_fuzzer$(EXEEXT) \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ record_fuzzer$(EXEEXT) \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ table_fuzzer$(EXEEXT) subdir = ossfuzz ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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__column_fuzzer_SOURCES_DIST = column_fuzzer.cc ossfuzz_libbfio.h \ ossfuzz_libesedb.h @HAVE_LIB_FUZZING_ENGINE_TRUE@am_column_fuzzer_OBJECTS = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ column_fuzzer.$(OBJEXT) column_fuzzer_OBJECTS = $(am_column_fuzzer_OBJECTS) @HAVE_LIB_FUZZING_ENGINE_TRUE@column_fuzzer_DEPENDENCIES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__file_fuzzer_SOURCES_DIST = file_fuzzer.cc ossfuzz_libbfio.h \ ossfuzz_libesedb.h @HAVE_LIB_FUZZING_ENGINE_TRUE@am_file_fuzzer_OBJECTS = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ file_fuzzer.$(OBJEXT) file_fuzzer_OBJECTS = $(am_file_fuzzer_OBJECTS) @HAVE_LIB_FUZZING_ENGINE_TRUE@file_fuzzer_DEPENDENCIES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la am__record_fuzzer_SOURCES_DIST = ossfuzz_libbfio.h ossfuzz_libesedb.h \ record_fuzzer.cc @HAVE_LIB_FUZZING_ENGINE_TRUE@am_record_fuzzer_OBJECTS = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ record_fuzzer.$(OBJEXT) record_fuzzer_OBJECTS = $(am_record_fuzzer_OBJECTS) @HAVE_LIB_FUZZING_ENGINE_TRUE@record_fuzzer_DEPENDENCIES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la am__table_fuzzer_SOURCES_DIST = ossfuzz_libbfio.h ossfuzz_libesedb.h \ table_fuzzer.cc @HAVE_LIB_FUZZING_ENGINE_TRUE@am_table_fuzzer_OBJECTS = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ table_fuzzer.$(OBJEXT) table_fuzzer_OBJECTS = $(am_table_fuzzer_OBJECTS) @HAVE_LIB_FUZZING_ENGINE_TRUE@table_fuzzer_DEPENDENCIES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/column_fuzzer.Po \ ./$(DEPDIR)/file_fuzzer.Po ./$(DEPDIR)/record_fuzzer.Po \ ./$(DEPDIR)/table_fuzzer.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(column_fuzzer_SOURCES) $(file_fuzzer_SOURCES) \ $(record_fuzzer_SOURCES) $(table_fuzzer_SOURCES) DIST_SOURCES = $(am__column_fuzzer_SOURCES_DIST) \ $(am__file_fuzzer_SOURCES_DIST) \ $(am__record_fuzzer_SOURCES_DIST) \ $(am__table_fuzzer_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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_LIB_FUZZING_ENGINE_TRUE@AM_CPPFLAGS = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ -I../include -I$(top_srcdir)/include \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_CPPFLAGS@ @HAVE_LIB_FUZZING_ENGINE_TRUE@column_fuzzer_SOURCES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ column_fuzzer.cc \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libesedb.h @HAVE_LIB_FUZZING_ENGINE_TRUE@column_fuzzer_LDADD = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ @HAVE_LIB_FUZZING_ENGINE_TRUE@file_fuzzer_SOURCES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ file_fuzzer.cc \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libesedb.h @HAVE_LIB_FUZZING_ENGINE_TRUE@file_fuzzer_LDADD = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ @HAVE_LIB_FUZZING_ENGINE_TRUE@record_fuzzer_SOURCES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libesedb.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ record_fuzzer.cc @HAVE_LIB_FUZZING_ENGINE_TRUE@record_fuzzer_LDADD = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ @HAVE_LIB_FUZZING_ENGINE_TRUE@table_fuzzer_SOURCES = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libbfio.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ossfuzz_libesedb.h \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ table_fuzzer.cc @HAVE_LIB_FUZZING_ENGINE_TRUE@table_fuzzer_LDADD = \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIB_FUZZING_ENGINE@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBBFIO_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBUNA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCDATA_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ ../libesedb/libesedb.la \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCNOTIFY_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_LIB_FUZZING_ENGINE_TRUE@ @LIBINTL@ DISTCLEANFILES = \ Makefile \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .cc .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 ossfuzz/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ossfuzz/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ 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 column_fuzzer$(EXEEXT): $(column_fuzzer_OBJECTS) $(column_fuzzer_DEPENDENCIES) $(EXTRA_column_fuzzer_DEPENDENCIES) @rm -f column_fuzzer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(column_fuzzer_OBJECTS) $(column_fuzzer_LDADD) $(LIBS) file_fuzzer$(EXEEXT): $(file_fuzzer_OBJECTS) $(file_fuzzer_DEPENDENCIES) $(EXTRA_file_fuzzer_DEPENDENCIES) @rm -f file_fuzzer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(file_fuzzer_OBJECTS) $(file_fuzzer_LDADD) $(LIBS) record_fuzzer$(EXEEXT): $(record_fuzzer_OBJECTS) $(record_fuzzer_DEPENDENCIES) $(EXTRA_record_fuzzer_DEPENDENCIES) @rm -f record_fuzzer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(record_fuzzer_OBJECTS) $(record_fuzzer_LDADD) $(LIBS) table_fuzzer$(EXEEXT): $(table_fuzzer_OBJECTS) $(table_fuzzer_DEPENDENCIES) $(EXTRA_table_fuzzer_DEPENDENCIES) @rm -f table_fuzzer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(table_fuzzer_OBJECTS) $(table_fuzzer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/column_fuzzer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_fuzzer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/record_fuzzer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table_fuzzer.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/column_fuzzer.Po -rm -f ./$(DEPDIR)/file_fuzzer.Po -rm -f ./$(DEPDIR)/record_fuzzer.Po -rm -f ./$(DEPDIR)/table_fuzzer.Po -rm -f Makefile 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 -f ./$(DEPDIR)/column_fuzzer.Po -rm -f ./$(DEPDIR)/file_fuzzer.Po -rm -f ./$(DEPDIR)/record_fuzzer.Po -rm -f ./$(DEPDIR)/table_fuzzer.Po -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile splint-local: @echo "Running splint on column_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(column_fuzzer_SOURCES) @echo "Running splint on file_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_fuzzer_SOURCES) @echo "Running splint on record_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(record_fuzzer_SOURCES) @echo "Running splint on table_fuzzer ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(table_fuzzer_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: libesedb-20240420/ltmain.sh0000644000175000017500000121201014610746255016207 0ustar00lordyestalordyesta#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2019, 2021-2022 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 this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.7 package_revision=2.4.7 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! 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 # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_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 # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_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 '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. 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. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # 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" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_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 "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # 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. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # 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 "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_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 "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_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_append 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_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || 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_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd 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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution 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_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # 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). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" 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 () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '_result', escaped # suitably for 'eval'. # # The '_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # 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. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_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) version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "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 yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; 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 } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: # 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 ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" # Keeping compiler generated duplicates in $postdeps and $predeps is not # harmful, and is necessary in a majority of systems that use it to satisfy # symbol dependencies. opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; 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." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 | func_generated_by_libtool_p } # 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 yes = "$lalib_p" } # 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 () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # 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 () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs 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 () { $debug_cmd 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 () { $debug_cmd 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 yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; 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 "$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 () { $debug_cmd # 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 () { $debug_cmd 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 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd $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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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 | *.go | *.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 yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot 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_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_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 yes = "$build_old_libs"; 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 no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; 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 yes = "$need_locks"; 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 warn = "$need_locks"; 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_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; 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 warn = "$need_locks" && 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 yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; 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 warn = "$need_locks" && 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 no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && 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 -Xcompiler 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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -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 () { $debug_cmd # 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 $opt_dry_run; then # 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 else 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 fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd 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_quiet && 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 finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_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_arg pretty "$arg" func_append install_prog "$func_quote_arg_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=false 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=: ;; -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-m = "X$prev" && 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_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_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_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_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=: if $isdir; 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 ;; os2*) 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 yes = "$build_old_libs"; 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=: 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'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; 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_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_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_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_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 install = "$opt_mode" && 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 () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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) $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 can'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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; 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 func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' 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[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi 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" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; 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" "${nlist}I"' # 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_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 () { $debug_cmd 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 () { $debug_cmd 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_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 () { $debug_cmd 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 case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) 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 } }'` ;; esac 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 () { $debug_cmd 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 () { $debug_cmd 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 that possess that section. Heuristic: eliminate # all those that 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_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 () { $debug_cmd 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 () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; 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 yes = "$lock_old_archive_extraction"; 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 () { $debug_cmd 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` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result 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 "$sed_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 where 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) $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\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $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/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that 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) $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 () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac 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 yes = "$fast_install"; 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 yes = "$shlibpath_overrides_runpath" && 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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* 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_platform || defined ... */ #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 #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 (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]; size_t 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 = (size_t) (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 (STREQ (str, pat)) *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 size_t 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) { size_t orig_value_len = strlen (orig_value); size_t 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 #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\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 -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' 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 () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd 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 # what 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 that 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= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false 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 yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && 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_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_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) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; 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 ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. 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 none = "$pic_object" && test none = "$non_pic_object"; 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 none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; 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 none != "$non_pic_object"; 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 none = "$pic_object"; 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 ;; os2dllname) os2dllname=$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 rpath = "$prev"; 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 ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" 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-export-symbols = "X$arg"; 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-lc = "X$arg" || test X-lm = "X$arg"; 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && 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-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm 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 ;; # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. -pthread) case $host in *solaris2*) ;; *) case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac ;; esac continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) 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 ;; -os2dllname) prev=os2dllname 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_arg pretty "$flag" func_append arg " $func_quote_arg_result" func_append compiler_flags " $func_quote_arg_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_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" func_append compiler_flags " $wl$func_quote_arg_result" func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xassembler) prev=xassembler continue ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_arg pretty "$arg" arg=$func_quote_arg_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 # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -Wa,* Pass flags directly to the assembler -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*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_arg pretty "$arg" arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) func_quote_arg pretty "$arg" arg=$func_quote_arg_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 none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; 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 none = "$pic_object"; 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 dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; 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_arg pretty "$arg" arg=$func_quote_arg_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 yes = "$export_dynamic" && 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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" 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 lib = "$linkmode"; 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=false 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 lib,link = "$linkmode,$pass"; 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; 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 dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; 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 conv = "$pass" && 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 conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; 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 link = "$pass"; 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 conv = "$pass"; 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=false 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=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; 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=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; 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 prog != "$linkmode" && test lib != "$linkmode"; 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 yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; 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 dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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 yes = "$installed"; 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 yes = "$hardcode_automatic" && 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 dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; 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 lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: 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 $linkalldeplibs; 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 prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; 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 yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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* | *os2*) 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 cannot # 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 no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # 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 yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; 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 prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; 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 no = "$link_static" && 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 no != "$link_all_deplibs"; 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 link = "$pass"; then if test prog = "$linkmode"; 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 dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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 no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; 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 pass_all != "$deplibs_check_method"; 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 no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|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" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; 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 0 -ne "$loop"; 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) # correct to gnu/linux during the next big refactor 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 0 -ne "$loop"; 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 ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 -n "$precious_files_regex"; 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 yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; 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 yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 yes = "$build_libtool_libs"; 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* | *-*-midnightbsd*) # 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 yes = "$build_libtool_need_lc"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 none = "$deplibs_check_method"; 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 yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || 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 eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" 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 relink = "$opt_mode" || 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 func_dll_def_p "$export_symbols" || { # 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 ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || 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 yes = "$try_normal_branch" \ && { 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 : != "$skipped_export"; 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 : != "$skipped_export" && 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 yes = "$compiler_needs_object" && 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 yes = "$thread_safe" && 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 relink = "$opt_mode"; 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 yes = "$module" && 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 : != "$skipped_export" && 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 : != "$skipped_export" && test yes = "$with_gnu_ld"; 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 : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; 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 -z "$objlist" || 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 1 -eq "$k"; 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 ${skipped_export-false} && { 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 } 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_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; 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 ${skipped_export-false} && { 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 } 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 yes = "$module" && 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=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; 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 relink = "$opt_mode"; 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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags 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 yes = "$build_libtool_libs" || 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 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 test yes = "$build_libtool_libs" || { 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 } if test -n "$pic_flag" || test default != "$pic_mode"; 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" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && 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 CXX = "$tagname"; 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 yes = "$build_old_libs"; 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@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # 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 } 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 yes = "$no_install"; 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 case $hardcode_action,$fast_install in relink,*) # 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" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # 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_arg pretty "$var_value" relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done func_quote eval cd "`pwd`" func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result 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 case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac 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 yes = "$build_libtool_libs"; 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 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result 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 -z "$oldobjs"; 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 yes = "$build_old_libs" && 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_arg pretty,unquoted "$var_value" relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. func_quote eval cd "`pwd`" relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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 func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` 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 -n "$bindir"; 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) $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 cannot 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 no,yes = "$installed,$need_relink"; 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 } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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=: ;; -*) 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 . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; 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 $rmforce; 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" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || 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 none != "$pic_object"; 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 none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; 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 yes = "$fast_install" && 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 } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi 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 # where 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: libesedb-20240420/libfwnt/0000755000175000017500000000000014610746414016034 5ustar00lordyestalordyestalibesedb-20240420/libfwnt/libfwnt_locale_identifier.h0000644000175000017500000000313314610746245023375 0ustar00lordyestalordyesta/* * Locale identifier (LCID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LOCALE_IDENTIFIER_H ) #define _LIBFWNT_LOCALE_IDENTIFIER_H #include #include #if defined( __cplusplus ) extern "C" { #endif 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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_LOCALE_IDENTIFIER_H ) */ libesedb-20240420/libfwnt/libfwnt_lzxpress.c0000644000175000017500000006366714610746245021643 0ustar00lordyestalordyesta/* * LZXPRESS (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_huffman_tree.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_lzxpress.h" /* Compresses data using LZXPRESS (LZ77 + DIRECT2) compression * Returns 1 on success or -1 on error */ int libfwnt_lzxpress_compress( const uint8_t *uncompressed_data, size_t uncompressed_data_size, uint8_t *compressed_data, size_t *compressed_data_size, libcerror_error_t **error ) { static char *function = "libfwnt_lzxpress_compress"; 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 ); } 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 ); } /* TODO implement */ return( -1 ); } /* Decompresses data using LZXPRESS (LZ77 + DIRECT2) compression * Return 1 on success or -1 on error */ int libfwnt_lzxpress_decompress( const 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 = "libfwnt_lzxpress_decompress"; size_t compressed_data_offset = 0; size_t compression_index = 0; size_t compression_shared_byte_index = 0; size_t safe_uncompressed_data_size = 0; size_t uncompressed_data_offset = 0; uint32_t compression_indicator = 0; uint32_t compression_indicator_bitmask = 0; uint16_t compression_tuple = 0; uint16_t compression_tuple_size = 0; int16_t compression_tuple_offset = 0; 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 < 2 ) || ( compressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data size value out of bounds.", 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data size.", 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 ); } safe_uncompressed_data_size = *uncompressed_data_size; while( compressed_data_offset < compressed_data_size ) { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { break; } if( ( compressed_data_size < 4 ) || ( compressed_data_offset > ( compressed_data_size - 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( &( compressed_data[ compressed_data_offset ] ), compression_indicator ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, compressed_data_offset, compressed_data_offset ); libcnotify_printf( "%s: compression indicator\t\t\t: 0x%08" PRIx32 "\n", function, compression_indicator ); libcnotify_printf( "\n" ); } #endif compressed_data_offset += 4; for( compression_indicator_bitmask = 0x80000000UL; compression_indicator_bitmask > 0; compression_indicator_bitmask >>= 1 ) { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { break; } if( compressed_data_offset >= compressed_data_size ) { break; } /* If the indicator bit is 0 the data is uncompressed * or 1 if the data is compressed */ if( ( compression_indicator & compression_indicator_bitmask ) != 0 ) { if( compressed_data_offset > ( compressed_data_size - 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( compressed_data[ compressed_data_offset ] ), compression_tuple ); compressed_data_offset += 2; /* The compression tuple contains: * 0 - 2 the size * 3 - 15 the offset - 1 */ compression_tuple_size = ( compression_tuple & 0x0007 ); compression_tuple_offset = ( compression_tuple >> 3 ) + 1; /* Check for a first level extended size * stored in the 4-bits of a shared extended compression tuple size byte * the size is added to the previous size */ if( compression_tuple_size == 0x07 ) { if( compression_shared_byte_index == 0 ) { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } compression_tuple_size += compressed_data[ compressed_data_offset ] & 0x0f; compression_shared_byte_index = compressed_data_offset++; } else { compression_tuple_size += compressed_data[ compression_shared_byte_index ] >> 4; compression_shared_byte_index = 0; } } /* Check for a second level extended size * stored in the 8-bits of the next byte * the size is added to the previous size */ if( compression_tuple_size == ( 0x07 + 0x0f ) ) { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } compression_tuple_size += compressed_data[ compressed_data_offset++ ]; } /* Check for a third level extended size * stored in the 16-bits of the next two bytes * the previous size is ignored */ if( compression_tuple_size == ( 0x07 + 0x0f + 0xff ) ) { if( compressed_data_offset > ( compressed_data_size - 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( &( compressed_data[ compressed_data_offset ] ), compression_tuple_size ); compressed_data_offset += 2; } /* The size value is stored as * size - 3 */ compression_tuple_size += 3; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, compressed_data_offset, compressed_data_offset ); libcnotify_printf( "%s: compression tuple offset\t\t\t: %" PRIi16 "\n", function, compression_tuple_offset ); libcnotify_printf( "%s: compression tuple size\t\t\t: %" PRIu16 "\n", function, compression_tuple_size ); libcnotify_printf( "%s: uncompressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, uncompressed_data_offset, uncompressed_data_offset ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( compression_tuple_size > 32771 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compression tuple size value out of bounds.", function ); return( -1 ); } compression_index = uncompressed_data_offset - compression_tuple_offset; while( compression_tuple_size > 0 ) { if( compression_index >= uncompressed_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid compressed data at offset: %" PRIzd " - compression index: %" PRIzd " out of range: %" PRIzd ".", function, compressed_data_offset, compression_index, uncompressed_data_offset ); return( -1 ); } if( uncompressed_data_offset >= safe_uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); return( -1 ); } uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ compression_index++ ]; compression_tuple_size--; } } else { if( compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } if( uncompressed_data_offset > safe_uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); return( -1 ); } uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ compressed_data_offset++ ]; } } } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); } /* Decompresses a LZXPRESS Huffman compressed chunk * Return 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_decompress_chunk( libfwnt_bit_stream_t *bit_stream, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ) { uint8_t code_size_array[ 512 ]; libfwnt_huffman_tree_t *huffman_tree = NULL; static char *function = "libfwnt_lzxpress_huffman_decompress_chunk"; size_t next_chunk_uncompressed_data_offset = 0; size_t safe_uncompressed_data_offset = 0; uint32_t compression_offset = 0; uint32_t compression_size = 0; uint32_t symbol = 0; uint8_t byte_value = 0; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( ( bit_stream->byte_stream_size - bit_stream->byte_stream_offset ) < 260 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid bit stream - byte stream value too small.", 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 ); } if( uncompressed_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data offset.", function ); return( -1 ); } safe_uncompressed_data_offset = *uncompressed_data_offset; if( safe_uncompressed_data_offset >= uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: uncompressed data offset value out of bounds.", function ); return( -1 ); } /* The table contains 4-bits code size per symbol */ while( symbol < 512 ) { byte_value = bit_stream->byte_stream[ bit_stream->byte_stream_offset ]; code_size_array[ symbol++ ] = byte_value & 0x0f; byte_value >>= 4; code_size_array[ symbol++ ] = byte_value & 0x0f; bit_stream->byte_stream_offset += 1; } if( libfwnt_huffman_tree_initialize( &huffman_tree, 512, 15, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create Huffman tree.", function ); goto on_error; } if( libfwnt_huffman_tree_build( huffman_tree, code_size_array, 512, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to build Huffman tree.", function ); goto on_error; } if( libfwnt_bit_stream_read( bit_stream, 32, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 32-bit from bit stream.", function ); goto on_error; } next_chunk_uncompressed_data_offset = safe_uncompressed_data_offset + 65536; if( next_chunk_uncompressed_data_offset > uncompressed_data_size ) { next_chunk_uncompressed_data_offset = uncompressed_data_size; } while( ( bit_stream->byte_stream_offset < bit_stream->byte_stream_size ) || ( bit_stream->bit_buffer_size > 0 ) ) { if( safe_uncompressed_data_offset >= next_chunk_uncompressed_data_offset ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: end of chunk at compressed data offset: %" PRIzd " (0x%08" PRIzx "), uncompressed data offset: %" PRIzd " (0x%08" PRIzx ")\n", function, bit_stream->byte_stream_offset, bit_stream->byte_stream_offset, safe_uncompressed_data_offset, safe_uncompressed_data_offset ); libcnotify_printf( "\n" ); } #endif bit_stream->bit_buffer_size = 0; break; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, bit_stream->byte_stream_offset, bit_stream->byte_stream_offset ); } #endif if( libfwnt_huffman_tree_get_symbol_from_bit_stream( huffman_tree, bit_stream, &symbol, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read symbol.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: huffman symbol\t\t: 0x%04" PRIx16 "\n", function, symbol ); } #endif if( symbol < 256 ) { uncompressed_data[ safe_uncompressed_data_offset++ ] = (uint8_t) symbol; } /* Make sure the bit buffer contains at least 16-bit to ensure end-of-block marker is read correctly */ if( bit_stream->bit_buffer_size < 16 ) { if( libfwnt_bit_stream_read( bit_stream, 16, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 16-bit from bit stream.", function ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of bits\t\t: %" PRId8 "\n", function, bit_stream->bit_buffer_size ); } #endif /* Check if we have an end-of-block marker (symbol 256) and the number of remaining bits are 0 */ /* TODO add ( symbol == 256 ) */ if( ( bit_stream->bit_buffer == 0 ) && ( safe_uncompressed_data_offset >= uncompressed_data_size ) ) { break; } if( symbol >= 256 ) { symbol -= 256; compression_offset = 0; compression_size = symbol & 0x000f; symbol >>= 4; if( symbol != 0 ) { if( libfwnt_bit_stream_get_value( bit_stream, (uint8_t) symbol, &compression_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve compression offset from bit stream.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compression offset\t\t: %" PRIu32 "\n", function, compression_offset ); } #endif } compression_offset = (uint32_t) ( ( 1 << symbol ) | compression_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compression size\t\t: %" PRIu32 "\n", function, compression_size ); } #endif /* Ignore any data beyond the uncompressed block size */ if( compression_size == 15 ) { if( bit_stream->byte_stream_offset > ( bit_stream->byte_stream_size - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compressed data size value too small.", function ); goto on_error; } compression_size = bit_stream->byte_stream[ bit_stream->byte_stream_offset ] + 15; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: extended compression offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, bit_stream->byte_stream_offset, bit_stream->byte_stream_offset ); libcnotify_printf( "%s: extended compression size\t: %" PRIu32 "\n", function, compression_size ); } #endif bit_stream->byte_stream_offset += 1; if( compression_size == 270 ) { if( bit_stream->byte_stream_offset > ( bit_stream->byte_stream_size - 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compressed data size value too small.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( &( bit_stream->byte_stream[ bit_stream->byte_stream_offset ] ), compression_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: extended compression offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, bit_stream->byte_stream_offset, bit_stream->byte_stream_offset ); libcnotify_printf( "%s: extended compression size\t: %" PRIu32 "\n", function, compression_size ); } #endif bit_stream->byte_stream_offset += 2; if( compression_size == 0 ) { if( bit_stream->byte_stream_offset > ( bit_stream->byte_stream_size - 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compressed data size value too small.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( bit_stream->byte_stream[ bit_stream->byte_stream_offset ] ), compression_size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: extended compression offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, bit_stream->byte_stream_offset, bit_stream->byte_stream_offset ); libcnotify_printf( "%s: extended compression size\t: %" PRIu32 "\n", function, compression_size ); } #endif bit_stream->byte_stream_offset += 4; } } } compression_size += 3; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compression offset\t\t: %" PRIu32 "\n", function, compression_offset ); libcnotify_printf( "%s: compression size\t\t: %" PRIu32 "\n", function, compression_size ); libcnotify_printf( "%s: uncompressed data offset\t: %" PRIzd " (0x%08" PRIzx ")\n", function, safe_uncompressed_data_offset, safe_uncompressed_data_offset ); } #endif if( compression_offset > safe_uncompressed_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compression offset value out of bounds.", function ); goto on_error; } if( compression_size > ( uncompressed_data_size - safe_uncompressed_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: compression size value out of bounds.", function ); goto on_error; } compression_offset = safe_uncompressed_data_offset - compression_offset; while( compression_size > 0 ) { uncompressed_data[ safe_uncompressed_data_offset++ ] = uncompressed_data[ compression_offset++ ]; compression_size--; } /* Make sure the bit buffer contains at least 16-bit to ensure successive chunks in a stream are read correctly */ if( bit_stream->bit_buffer_size < 16 ) { if( libfwnt_bit_stream_read( bit_stream, 16, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 16-bit from bit stream.", function ); goto on_error; } } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif } if( libfwnt_huffman_tree_free( &huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free Huffman tree.", function ); goto on_error; } *uncompressed_data_offset = safe_uncompressed_data_offset; return( 1 ); on_error: if( huffman_tree != NULL ) { libfwnt_huffman_tree_free( &huffman_tree, NULL ); } return( -1 ); } /* Decompresses data using LZXPRESS Huffman compression * Return 1 on success or -1 on error */ int libfwnt_lzxpress_huffman_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ) { libfwnt_bit_stream_t *bit_stream = NULL; static char *function = "libfwnt_lzxpress_huffman_decompress"; size_t safe_uncompressed_data_size = 0; size_t uncompressed_data_offset = 0; 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( libfwnt_bit_stream_initialize( &bit_stream, compressed_data, compressed_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create bit stream.", function ); goto on_error; } safe_uncompressed_data_size = *uncompressed_data_size; while( bit_stream->byte_stream_offset < bit_stream->byte_stream_size ) { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { break; } if( libfwnt_lzxpress_huffman_decompress_chunk( bit_stream, uncompressed_data, safe_uncompressed_data_size, &uncompressed_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to decompress chunk.", function ); goto on_error; } } if( libfwnt_bit_stream_free( &bit_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free bit stream.", function ); goto on_error; } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); on_error: if( bit_stream != NULL ) { libfwnt_bit_stream_free( &bit_stream, NULL ); } return( -1 ); } libesedb-20240420/libfwnt/libfwnt_extern.h0000644000175000017500000000254014610746245021242 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFWNT_EXTERN_VARIABLE extern #else #define LIBFWNT_EXTERN_VARIABLE LIBFWNT_EXTERN #endif #else #define LIBFWNT_EXTERN /* extern */ #define LIBFWNT_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFWNT_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfwnt/libfwnt_security_identifier.c0000644000175000017500000007302614610746245024010 0ustar00lordyestalordyesta/* * Windows NT Security Identifier (SID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" /* Creates a security identifier * Make sure the value security_identifier is referencing, is set to NULL * 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"; int result = 1; 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; if( internal_security_identifier->is_managed == 0 ) { if( libfwnt_internal_security_identifier_free( &internal_security_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free security identifier.", function ); result = -1; } } *security_identifier = NULL; } return( result ); } /* Frees a security identifier * Returns 1 if successful or -1 on error */ int libfwnt_internal_security_identifier_free( libfwnt_internal_security_identifier_t **internal_security_identifier, libcerror_error_t **error ) { static char *function = "libfwnt_internal_security_identifier_free"; if( internal_security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security identifier.", function ); return( -1 ); } if( *internal_security_identifier != NULL ) { memory_free( *internal_security_identifier ); *internal_security_identifier = NULL; } return( 1 ); } /* Converts a security 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, const 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"; size_t security_identifier_size = 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( 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( internal_security_identifier->number_of_sub_authorities > 15 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported security identifier contains more than 15 sub authoritites.", function ); return( -1 ); } security_identifier_size = 8 + ( (size_t) internal_security_identifier->number_of_sub_authorities * 4 ); if( (size_t) security_identifier_size > 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 += 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"; size_t value_string_index = 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( 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 ); } value_string_index = 2; value_64bit = internal_security_identifier->revision_number; do { value_string_index++; value_64bit /= 10; } while( value_64bit > 0 ); value_string_index++; value_64bit = internal_security_identifier->authority; do { value_string_index++; 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++ ) { value_string_index++; value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; do { value_string_index++; value_64bit /= 10; } while( value_64bit > 0 ); } value_string_index++; *string_size = value_string_index; 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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_string_length++; value_64bit /= 10; } 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 ); } libesedb-20240420/libfwnt/libfwnt_libcerror.h0000644000175000017500000000263314610746245021723 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFWNT_LIBCERROR_H ) */ libesedb-20240420/libfwnt/libfwnt_bit_stream.c0000644000175000017500000001561114610746245022064 0ustar00lordyestalordyesta/* * Bit-stream functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_libcerror.h" /* Creates a bit stream * Make sure the value bit_stream is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwnt_bit_stream_initialize( libfwnt_bit_stream_t **bit_stream, const uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ) { static char *function = "libfwnt_bit_stream_initialize"; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( *bit_stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid bit stream value already set.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream value.", 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 value exceeds maximum.", function ); return( -1 ); } *bit_stream = memory_allocate_structure( libfwnt_bit_stream_t ); if( *bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create bit stream.", function ); goto on_error; } if( memory_set( *bit_stream, 0, sizeof( libfwnt_bit_stream_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear bit stream.", function ); goto on_error; } ( *bit_stream )->byte_stream = byte_stream; ( *bit_stream )->byte_stream_size = byte_stream_size; return( 1 ); on_error: if( *bit_stream != NULL ) { memory_free( *bit_stream ); *bit_stream = NULL; } return( -1 ); } /* Frees a bit stream * Returns 1 if successful or -1 on error */ int libfwnt_bit_stream_free( libfwnt_bit_stream_t **bit_stream, libcerror_error_t **error ) { static char *function = "libfwnt_bit_stream_free"; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( *bit_stream != NULL ) { memory_free( *bit_stream ); *bit_stream = NULL; } return( 1 ); } /* Reads bits from the underlying byte stream * Returns 1 on success or -1 on error */ int libfwnt_bit_stream_read( libfwnt_bit_stream_t *bit_stream, uint8_t number_of_bits, libcerror_error_t **error ) { static char *function = "libfwnt_bit_stream_read"; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( ( number_of_bits == 0 ) || ( number_of_bits > 32 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of bits value out of bounds.", function ); return( -1 ); } while( bit_stream->bit_buffer_size < number_of_bits ) { if( ( bit_stream->byte_stream_size < 2 ) || ( bit_stream->byte_stream_offset > ( bit_stream->byte_stream_size - 2 ) ) ) { /* If the bit stream overflows fill the bit buffer with 0 byte values */ bit_stream->bit_buffer <<= 16; bit_stream->bit_buffer_size += 16; } else { bit_stream->bit_buffer <<= 8; bit_stream->bit_buffer |= bit_stream->byte_stream[ bit_stream->byte_stream_offset + 1 ]; bit_stream->bit_buffer <<= 8; bit_stream->bit_buffer |= bit_stream->byte_stream[ bit_stream->byte_stream_offset ]; bit_stream->bit_buffer_size += 16; bit_stream->byte_stream_offset += 2; } } return( 1 ); } /* Retrieves a value from the bit stream * Returns 1 on success or -1 on error */ int libfwnt_bit_stream_get_value( libfwnt_bit_stream_t *bit_stream, uint8_t number_of_bits, uint32_t *value_32bit, libcerror_error_t **error ) { static char *function = "libfwnt_bit_stream_get_value"; uint32_t safe_value_32bit = 0; uint8_t remaining_bit_buffer_size = 0; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( number_of_bits > (uint8_t) 32 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of bits value exceeds maximum.", function ); return( -1 ); } if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 32-bit value.", function ); return( -1 ); } if( number_of_bits == 0 ) { *value_32bit = 0; return( 1 ); } if( bit_stream->bit_buffer_size < number_of_bits ) { if( libfwnt_bit_stream_read( bit_stream, number_of_bits, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read bits.", function ); return( -1 ); } } safe_value_32bit = bit_stream->bit_buffer; if( number_of_bits < 32 ) { safe_value_32bit >>= bit_stream->bit_buffer_size - number_of_bits; } bit_stream->bit_buffer_size -= number_of_bits; /* The behavior of "bit_buffer & ( 0xfffffffUL >> 32 )" differs for some compilers. */ if( bit_stream->bit_buffer_size == 0 ) { bit_stream->bit_buffer = 0; } else { remaining_bit_buffer_size = 32 - bit_stream->bit_buffer_size; bit_stream->bit_buffer &= 0xffffffffUL >> remaining_bit_buffer_size; } *value_32bit = safe_value_32bit; return( 1 ); } libesedb-20240420/libfwnt/libfwnt_error.h0000644000175000017500000000335414610746245021072 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( HAVE_LOCAL_LIBFWNT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_INTERNAL_ERROR_H ) */ libesedb-20240420/libfwnt/libfwnt_lznt1.h0000644000175000017500000000312014610746245021000 0ustar00lordyestalordyesta/* * LZNT1 (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LZNT1_H ) #define _LIBFWNT_LZNT1_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libfwnt_lznt1_decompress_chunk( const uint8_t *compressed_data, size_t compressed_data_size, size_t *compressed_data_offset, size_t compression_chunk_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_lznt1_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_LZNT1_H ) */ libesedb-20240420/libfwnt/libfwnt_notify.c0000644000175000017500000000526614610746245021250 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_notify.h" #if !defined( HAVE_LOCAL_LIBFWNT ) /* Sets the verbose notification */ void libfwnt_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libfwnt_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libfwnt_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 libfwnt_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libfwnt_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 libfwnt_notify_stream_close( libcerror_error_t **error ) { static char *function = "libfwnt_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 /* !defined( HAVE_LOCAL_LIBFWNT ) */ libesedb-20240420/libfwnt/Makefile.am0000644000175000017500000000250014610746245020067 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFWNT AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfwnt.la libfwnt_la_SOURCES = \ libfwnt_access_control_entry.c libfwnt_access_control_entry.h \ libfwnt_access_control_list.c libfwnt_access_control_list.h \ libfwnt_bit_stream.c libfwnt_bit_stream.h \ libfwnt_debug.c libfwnt_debug.h \ libfwnt_definitions.h \ libfwnt_extern.h \ libfwnt_error.c libfwnt_error.h \ libfwnt_huffman_tree.c libfwnt_huffman_tree.h \ libfwnt_libcerror.h \ libfwnt_libcdata.h \ libfwnt_libcnotify.h \ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ libfwnt_lznt1.c libfwnt_lznt1.h \ libfwnt_lzx.c libfwnt_lzx.h \ libfwnt_lzxpress.c libfwnt_lzxpress.h \ libfwnt_notify.c libfwnt_notify.h \ libfwnt_security_descriptor.c libfwnt_security_descriptor.h \ libfwnt_security_identifier.c libfwnt_security_identifier.h \ libfwnt_support.c libfwnt_support.h \ libfwnt_types.h \ libfwnt_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfwnt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwnt_la_SOURCES) libesedb-20240420/libfwnt/libfwnt_security_identifier.h0000644000175000017500000001222014610746245024002 0ustar00lordyestalordyesta/* * Windows NT Security Identifier (SID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 * * The maximum number of sub authorities seems to be 15. */ 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[ 15 ]; /* Value to indicate if the identifier is managed by the descriptor */ uint8_t is_managed; }; 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 ); int libfwnt_internal_security_identifier_free( libfwnt_internal_security_identifier_t **internal_security_identifier, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_from_byte_stream( libfwnt_security_identifier_t *security_identifier, const 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 /* !defined( _LIBFWNT_INTERNAL_SECURITY_IDENTIFIER_H ) */ libesedb-20240420/libfwnt/libfwnt_support.h0000644000175000017500000000224114610746245021447 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFWNT_SUPPORT_H ) */ libesedb-20240420/libfwnt/libfwnt_huffman_tree.h0000644000175000017500000000403014610746245022374 0ustar00lordyestalordyesta/* * Huffman tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_HUFFMAN_TREE_H ) #define _LIBFWNT_HUFFMAN_TREE_H #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwnt_huffman_tree libfwnt_huffman_tree_t; struct libfwnt_huffman_tree { /* The maximum number of bits allowed for a Huffman code */ uint8_t maximum_code_size; /* The symbols array */ int *symbols; /* The code size counts array */ int *code_size_counts; }; int libfwnt_huffman_tree_initialize( libfwnt_huffman_tree_t **huffman_tree, int number_of_symbols, uint8_t maximum_code_size, libcerror_error_t **error ); int libfwnt_huffman_tree_free( libfwnt_huffman_tree_t **huffman_tree, libcerror_error_t **error ); int libfwnt_huffman_tree_build( libfwnt_huffman_tree_t *huffman_tree, const uint8_t *code_sizes_array, int number_of_code_sizes, libcerror_error_t **error ); int libfwnt_huffman_tree_get_symbol_from_bit_stream( libfwnt_huffman_tree_t *huffman_tree, libfwnt_bit_stream_t *bit_stream, uint32_t *symbol, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_HUFFMAN_TREE_H ) */ libesedb-20240420/libfwnt/libfwnt_error.c0000644000175000017500000000552014610746245021062 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfwnt_error_sprint( libfwnt_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfwnt_error_backtrace_sprint( libfwnt_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ libesedb-20240420/libfwnt/libfwnt_access_control_list.h0000644000175000017500000000535314610746245023776 0ustar00lordyestalordyesta/* * Windows NT Access Contol List (ACL) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_ACCESS_CONTROL_LIST_H ) #define _LIBFWNT_INTERNAL_ACCESS_CONTROL_LIST_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcdata.h" #include "libfwnt_libcerror.h" #include "libfwnt_types.h" #if defined( __cplusplus ) extern "C" { #endif /* The Windows NT Access Control List is formatted as following: * header: revision number, padding, size, count, padding * access control entries (ACE) */ typedef struct libfwnt_internal_access_control_list libfwnt_internal_access_control_list_t; struct libfwnt_internal_access_control_list { /* The revision number */ uint8_t revision_number; /* The (access control) entries array */ libcdata_array_t *entries_array; }; int libfwnt_access_control_list_initialize( libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_list_free( libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ); int libfwnt_internal_access_control_list_free( libfwnt_internal_access_control_list_t **internal_access_control_list, libcerror_error_t **error ); int libfwnt_access_control_list_copy_from_byte_stream( libfwnt_access_control_list_t *access_control_list, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_list_get_number_of_entries( libfwnt_access_control_list_t *access_control_list, int *number_of_entries, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_list_get_entry_by_index( libfwnt_access_control_list_t *access_control_list, int entry_index, libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_INTERNAL_ACCESS_CONTROL_LIST_H ) */ libesedb-20240420/libfwnt/libfwnt_security_descriptor.c0000644000175000017500000006467014610746245024051 0ustar00lordyestalordyesta/* * Windows NT Security Descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "libfwnt_access_control_list.h" #include "libfwnt_debug.h" #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_security_descriptor.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" /* Creates a security descriptor * Make sure the value security_descriptor is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwnt_security_descriptor_initialize( libfwnt_security_descriptor_t **security_descriptor, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_initialize"; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } if( *security_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security descriptor value already set.", function ); return( -1 ); } internal_security_descriptor = memory_allocate_structure( libfwnt_internal_security_descriptor_t ); if( internal_security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create security descriptor.", function ); goto on_error; } if( memory_set( internal_security_descriptor, 0, sizeof( libfwnt_internal_security_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear security descriptor.", function ); goto on_error; } *security_descriptor = (libfwnt_security_descriptor_t *) internal_security_descriptor; return( 1 ); on_error: if( internal_security_descriptor != NULL ) { memory_free( internal_security_descriptor ); } return( -1 ); } /* Frees a security descriptor * Returns 1 if successful or -1 on error */ int libfwnt_security_descriptor_free( libfwnt_security_descriptor_t **security_descriptor, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_free"; int result = 1; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } if( *security_descriptor != NULL ) { internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) *security_descriptor; *security_descriptor = NULL; if( internal_security_descriptor->owner_sid != NULL ) { if( libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( internal_security_descriptor->owner_sid ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free owner security identifier.", function ); result = -1; } } if( internal_security_descriptor->group_sid != NULL ) { if( libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( internal_security_descriptor->group_sid ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free group security identifier.", function ); result = -1; } } if( internal_security_descriptor->system_acl != NULL ) { if( libfwnt_internal_access_control_list_free( (libfwnt_internal_access_control_list_t ** ) &( internal_security_descriptor->system_acl ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free system ACL.", function ); result = -1; } } if( internal_security_descriptor->discretionary_acl != NULL ) { if( libfwnt_internal_access_control_list_free( (libfwnt_internal_access_control_list_t ** ) &( internal_security_descriptor->discretionary_acl ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free discretionary ACL.", function ); result = -1; } } memory_free( internal_security_descriptor ); } return( result ); } /* Converts a security descriptor stored in a byte stream into a runtime version * Returns 1 if successful or -1 on error */ int libfwnt_security_descriptor_copy_from_byte_stream( libfwnt_security_descriptor_t *security_descriptor, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_copy_from_byte_stream"; uint32_t discretionary_acl_offset = 0; uint32_t group_sid_offset = 0; uint32_t owner_sid_offset = 0; uint32_t system_acl_offset = 0; uint16_t control_flags = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *sid_string = NULL; size_t sid_string_size = 0; int result = 0; #endif if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) security_descriptor; if( internal_security_descriptor->owner_sid != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security descriptor - owner SID value already set.", function ); return( -1 ); } if( internal_security_descriptor->group_sid != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security descriptor - group SID value already set.", function ); return( -1 ); } if( internal_security_descriptor->system_acl != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security descriptor - system ACL value already set.", function ); return( -1 ); } if( internal_security_descriptor->discretionary_acl != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security descriptor - discretionary ACL value already set.", 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 < 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( 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: header data:\n", function ); libcnotify_print_data( byte_stream, 20, 0 ); } #endif internal_security_descriptor->revision_number = byte_stream[ 0 ]; byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 2 ] ), control_flags ); byte_stream_copy_to_uint32_little_endian( &( byte_stream[ 4 ] ), owner_sid_offset ); byte_stream_copy_to_uint32_little_endian( &( byte_stream[ 8 ] ), group_sid_offset ); byte_stream_copy_to_uint32_little_endian( &( byte_stream[ 12 ] ), system_acl_offset ); byte_stream_copy_to_uint32_little_endian( &( byte_stream[ 16 ] ), discretionary_acl_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: revision number\t\t: %" PRIu8 "\n", function, internal_security_descriptor->revision_number ); libcnotify_printf( "%s: padding\t\t\t: 0x%02" PRIx8 "\n", function, byte_stream[ 1 ] ); libcnotify_printf( "%s: control flags\t\t: 0x%04" PRIx16 "\n", function, control_flags ); libfwnt_debug_print_security_descriptor_control_flags( control_flags ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: owner SID offset\t\t: 0x%08" PRIx32 "\n", function, owner_sid_offset ); libcnotify_printf( "%s: group SID offset\t\t: 0x%08" PRIx32 "\n", function, group_sid_offset ); libcnotify_printf( "%s: system ACL offset\t\t: 0x%08" PRIx32 "\n", function, system_acl_offset ); libcnotify_printf( "%s: discretionary ACL offset\t: 0x%08" PRIx32 "\n", function, discretionary_acl_offset ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( owner_sid_offset != 0 ) { if( ( owner_sid_offset < 20 ) || ( (size_t) owner_sid_offset > byte_stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: owner SID offset value out of bounds.", function ); goto on_error; } if( libfwnt_security_identifier_initialize( &( internal_security_descriptor->owner_sid ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create owner security identifier.", function ); goto on_error; } if( internal_security_descriptor->owner_sid == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid security descriptor - missing owner security identifier.", function ); goto on_error; } ( (libfwnt_internal_security_identifier_t *) internal_security_descriptor->owner_sid )->is_managed = 1; if( libfwnt_security_identifier_copy_from_byte_stream( internal_security_descriptor->owner_sid, &( byte_stream[ owner_sid_offset ] ), byte_stream_size - owner_sid_offset, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy owner security identifier from byte stream.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwnt_security_identifier_get_string_size( internal_security_descriptor->owner_sid, &sid_string_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve owner security identifier string size.", function ); goto on_error; } libcnotify_printf( "%s: owner SID\t\t\t: ", function ); if( sid_string_size > 0 ) { sid_string = system_string_allocate( sid_string_size ); if( sid_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create owner security identifier string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( internal_security_descriptor->owner_sid, (uint16_t *) sid_string, sid_string_size, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( internal_security_descriptor->owner_sid, (uint8_t *) sid_string, sid_string_size, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy owner security identifier to string.", function ); goto on_error; } libcnotify_printf( "%" PRIs_SYSTEM "", sid_string ); memory_free( sid_string ); sid_string = NULL; } libcnotify_printf( "\n" ); } #endif } if( group_sid_offset != 0 ) { if( ( group_sid_offset < 20 ) || ( (size_t) group_sid_offset > byte_stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: group security identifier offset value out of bounds.", function ); goto on_error; } if( libfwnt_security_identifier_initialize( &( internal_security_descriptor->group_sid ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create group security identifier.", function ); goto on_error; } if( internal_security_descriptor->group_sid == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid security descriptor - missing group security identifier.", function ); goto on_error; } ( (libfwnt_internal_security_identifier_t *) internal_security_descriptor->group_sid )->is_managed = 1; if( libfwnt_security_identifier_copy_from_byte_stream( internal_security_descriptor->group_sid, &( byte_stream[ group_sid_offset ] ), byte_stream_size - group_sid_offset, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy group security identifier from byte stream.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwnt_security_identifier_get_string_size( internal_security_descriptor->group_sid, &sid_string_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve group security identifier string size.", function ); goto on_error; } libcnotify_printf( "%s: group SID\t\t\t: ", function ); if( sid_string_size > 0 ) { sid_string = system_string_allocate( sid_string_size ); if( sid_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create group security identifier string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( internal_security_descriptor->group_sid, (uint16_t *) sid_string, sid_string_size, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( internal_security_descriptor->group_sid, (uint8_t *) sid_string, sid_string_size, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy group security identifier to string.", function ); goto on_error; } libcnotify_printf( "%" PRIs_SYSTEM "", sid_string ); memory_free( sid_string ); sid_string = NULL; } libcnotify_printf( "\n" ); } #endif } if( system_acl_offset != 0 ) { if( ( system_acl_offset < 20 ) || ( (size_t) system_acl_offset > byte_stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: system ACL offset value out of bounds.", function ); goto on_error; } if( libfwnt_access_control_list_initialize( &( internal_security_descriptor->system_acl ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create system ACL.", function ); goto on_error; } if( libfwnt_access_control_list_copy_from_byte_stream( internal_security_descriptor->system_acl, &( byte_stream[ system_acl_offset ] ), byte_stream_size - system_acl_offset, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy system ACL from byte stream.", function ); goto on_error; } } if( discretionary_acl_offset != 0 ) { if( ( discretionary_acl_offset < 20 ) || ( (size_t) discretionary_acl_offset > byte_stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: discretionary ACL offset value out of bounds.", function ); goto on_error; } if( libfwnt_access_control_list_initialize( &( internal_security_descriptor->discretionary_acl ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create discretionary ACL.", function ); goto on_error; } if( libfwnt_access_control_list_copy_from_byte_stream( internal_security_descriptor->discretionary_acl, &( byte_stream[ discretionary_acl_offset ] ), byte_stream_size - discretionary_acl_offset, LIBFWNT_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy discretionary ACL from byte stream.", function ); goto on_error; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( sid_string != NULL ) { memory_free( sid_string ); } #endif if( internal_security_descriptor->discretionary_acl != NULL ) { libfwnt_internal_access_control_list_free( (libfwnt_internal_access_control_list_t ** ) &( internal_security_descriptor->discretionary_acl ), NULL ); } if( internal_security_descriptor->system_acl != NULL ) { libfwnt_internal_access_control_list_free( (libfwnt_internal_access_control_list_t ** ) &( internal_security_descriptor->system_acl ), NULL ); } if( internal_security_descriptor->group_sid != NULL ) { libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( internal_security_descriptor->group_sid ), NULL ); } if( internal_security_descriptor->owner_sid != NULL ) { libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( internal_security_descriptor->owner_sid ), NULL ); } return( -1 ); } /* Retrieves the owner security identifier (SID) * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_security_descriptor_get_owner( libfwnt_security_descriptor_t *security_descriptor, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_get_owner"; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) security_descriptor; 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 ); } if( internal_security_descriptor->owner_sid == NULL ) { return( 0 ); } *security_identifier = internal_security_descriptor->owner_sid; return( 1 ); } /* Retrieves the group security identifier (SID) * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_security_descriptor_get_group( libfwnt_security_descriptor_t *security_descriptor, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_get_group"; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) security_descriptor; 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 ); } if( internal_security_descriptor->group_sid == NULL ) { return( 0 ); } *security_identifier = internal_security_descriptor->group_sid; return( 1 ); } /* Retrieves the discretionary access control list (ACL) * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_security_descriptor_get_discretionary_acl( libfwnt_security_descriptor_t *security_descriptor, libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_get_discretionary_acl"; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) security_descriptor; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } if( *access_control_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid access control list value already set.", function ); return( -1 ); } if( internal_security_descriptor->discretionary_acl == NULL ) { return( 0 ); } *access_control_list = internal_security_descriptor->discretionary_acl; return( 1 ); } /* Retrieves the system access control list (ACL) * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_security_descriptor_get_system_acl( libfwnt_security_descriptor_t *security_descriptor, libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ) { libfwnt_internal_security_descriptor_t *internal_security_descriptor = NULL; static char *function = "libfwnt_security_descriptor_get_system_acl"; if( security_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security descriptor.", function ); return( -1 ); } internal_security_descriptor = (libfwnt_internal_security_descriptor_t *) security_descriptor; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } if( *access_control_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid access control list value already set.", function ); return( -1 ); } if( internal_security_descriptor->system_acl == NULL ) { return( 0 ); } *access_control_list = internal_security_descriptor->system_acl; return( 1 ); } libesedb-20240420/libfwnt/libfwnt_access_control_list.c0000644000175000017500000003250714610746245023772 0ustar00lordyestalordyesta/* * Windows NT Access Control List (ACL) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfwnt_access_control_entry.h" #include "libfwnt_access_control_list.h" #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_types.h" /* Creates an access control list * Make sure the value access_control_list is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwnt_access_control_list_initialize( libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ) { libfwnt_internal_access_control_list_t *internal_access_control_list = NULL; static char *function = "libfwnt_access_control_list_initialize"; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } if( *access_control_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid access control list value already set.", function ); return( -1 ); } internal_access_control_list = memory_allocate_structure( libfwnt_internal_access_control_list_t ); if( internal_access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create access control list.", function ); goto on_error; } if( memory_set( internal_access_control_list, 0, sizeof( libfwnt_internal_access_control_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear access control list.", function ); goto on_error; } *access_control_list = (libfwnt_access_control_list_t *) internal_access_control_list; return( 1 ); on_error: if( internal_access_control_list != NULL ) { memory_free( internal_access_control_list ); } return( -1 ); } /* Frees an access control list * Returns 1 if successful or -1 on error */ int libfwnt_access_control_list_free( libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ) { static char *function = "libfwnt_access_control_list_free"; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } if( *access_control_list != NULL ) { *access_control_list = NULL; } return( 1 ); } /* Frees an access control list * Returns 1 if successful or -1 on error */ int libfwnt_internal_access_control_list_free( libfwnt_internal_access_control_list_t **internal_access_control_list, libcerror_error_t **error ) { static char *function = "libfwnt_internal_access_control_list_free"; int result = 1; if( internal_access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } if( *internal_access_control_list != NULL ) { if( ( *internal_access_control_list )->entries_array != NULL ) { if( libcdata_array_free( &( ( *internal_access_control_list )->entries_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwnt_internal_access_control_entry_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free entries array.", function ); result = -1; } } memory_free( *internal_access_control_list ); *internal_access_control_list = NULL; } return( result ); } /* Converts an access control list stored in a byte stream into a runtime version * Returns 1 if successful or -1 on error */ int libfwnt_access_control_list_copy_from_byte_stream( libfwnt_access_control_list_t *access_control_list, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; libfwnt_internal_access_control_list_t *internal_access_control_list = NULL; static char *function = "libfwnt_access_control_list_copy_from_byte_stream"; size_t byte_stream_offset = 0; uint16_t entry_index = 0; uint16_t number_of_entries = 0; uint16_t size = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } internal_access_control_list = (libfwnt_internal_access_control_list_t *) access_control_list; if( internal_access_control_list->entries_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid access control list - entries array value already set.", 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 < 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 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: header data:\n", function ); libcnotify_print_data( byte_stream, 8, 0 ); } #endif internal_access_control_list->revision_number = byte_stream[ 0 ]; byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 2 ] ), size ); byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 4 ] ), number_of_entries ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: revision number\t: %" PRIu8 "\n", function, internal_access_control_list->revision_number ); libcnotify_printf( "%s: padding1\t\t: 0x%02" PRIx8 "\n", function, byte_stream[ 1 ] ); libcnotify_printf( "%s: size\t\t\t: %" PRIu16 "\n", function, size ); libcnotify_printf( "%s: number of entries\t: %" PRIu16 "\n", function, number_of_entries ); byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 6 ] ), value_16bit ); libcnotify_printf( "%s: padding2\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "\n" ); } #endif byte_stream_offset = 8; /* TODO check bounds of number_of_entries */ if( libcdata_array_initialize( &( internal_access_control_list->entries_array ), (int) number_of_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; } for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( libfwnt_access_control_entry_initialize( (libfwnt_access_control_entry_t **) &internal_access_control_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create access control entry: %" PRIu16 ".", function, entry_index ); goto on_error; } if( libfwnt_access_control_entry_copy_from_byte_stream( (libfwnt_access_control_entry_t *) internal_access_control_entry, &( byte_stream[ byte_stream_offset ] ), byte_stream_size - byte_stream_offset, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to access control entry: %" PRIu16 " from byte stream.", function, entry_index ); goto on_error; } if( (size_t) internal_access_control_entry->size > byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: access control entry: %" PRIu16 " size value out of bounds.", function, entry_index ); goto on_error; } byte_stream_offset += internal_access_control_entry->size; if( libcdata_array_set_entry_by_index( internal_access_control_list->entries_array, (int) entry_index, (intptr_t *) internal_access_control_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set access control entry: %" PRIu16 ".", function, entry_index ); goto on_error; } internal_access_control_entry = NULL; } return( 1 ); on_error: if( internal_access_control_entry != NULL ) { libfwnt_internal_access_control_entry_free( &internal_access_control_entry, NULL ); } if( internal_access_control_list->entries_array != NULL ) { libcdata_array_free( &( internal_access_control_list->entries_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libfwnt_internal_access_control_entry_free, NULL ); } return( -1 ); } /* Retrieves the number of access control entries * Returns 1 if successful or -1 on error */ int libfwnt_access_control_list_get_number_of_entries( libfwnt_access_control_list_t *access_control_list, int *number_of_entries, libcerror_error_t **error ) { libfwnt_internal_access_control_list_t *internal_access_control_list = NULL; static char *function = "libfwnt_access_control_list_get_number_of_entries"; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } internal_access_control_list = (libfwnt_internal_access_control_list_t *) access_control_list; if( libcdata_array_get_number_of_entries( internal_access_control_list->entries_array, number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of access control entries in array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific access control entry * Returns 1 if successful or -1 on error */ int libfwnt_access_control_list_get_entry_by_index( libfwnt_access_control_list_t *access_control_list, int entry_index, libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ) { libfwnt_internal_access_control_list_t *internal_access_control_list = NULL; static char *function = "libfwnt_access_control_list_get_entry_by_index"; if( access_control_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control list.", function ); return( -1 ); } internal_access_control_list = (libfwnt_internal_access_control_list_t *) access_control_list; if( libcdata_array_get_entry_by_index( internal_access_control_list->entries_array, entry_index, (intptr_t **) access_control_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access control entry: %d from array.", function, entry_index ); return( -1 ); } return( 1 ); } libesedb-20240420/libfwnt/libfwnt_definitions.h0000644000175000017500000000661614610746245022260 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240415 /* The version string */ #define LIBFWNT_VERSION_STRING "20240415" /* The endian definitions */ #define LIBFWNT_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFWNT_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The security identifier (SID) authorities */ 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 }; /* The access control types */ enum LIBFWNT_ACCESS_CONTROL_TYPES { LIBFWNT_ACCESS_ALLOWED = 0x00, LIBFWNT_ACCESS_DENIED = 0x01, LIBFWNT_SYSTEM_AUDIT = 0x02, LIBFWNT_SYSTEM_ALARM = 0x03, LIBFWNT_ACCESS_ALLOWED_COMPOUND = 0x04, LIBFWNT_ACCESS_ALLOWED_OBJECT = 0x05, LIBFWNT_ACCESS_DENIED_OBJECT = 0x06, LIBFWNT_SYSTEM_AUDIT_OBJECT = 0x07, LIBFWNT_SYSTEM_ALARM_OBJECT = 0x08, LIBFWNT_ACCESS_ALLOWED_CALLBACK = 0x09, LIBFWNT_ACCESS_DENIED_CALLBACK = 0x0a, LIBFWNT_ACCESS_ALLOWED_CALLBACK_OBJECT = 0x0b, LIBFWNT_ACCESS_DENIED_CALLBACK_OBJECT = 0x0c, LIBFWNT_SYSTEM_AUDIT_CALLBACK = 0x0d, LIBFWNT_SYSTEM_ALARM_CALLBACK = 0x0e, LIBFWNT_SYSTEM_AUDIT_CALLBACK_OBJECT = 0x0f, LIBFWNT_SYSTEM_ALARM_CALLBACK_OBJECT = 0x10, LIBFWNT_SYSTEM_MANDATORY_LABEL = 0x11 }; #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ /* The security descriptor control flags */ enum LIBFWNT_SECURITY_DESCRIPTOR_CONTROL_FLAGS { LIBFWNT_CONTROL_FLAG_OWNER_DEFAULTED = 0x0001, LIBFWNT_CONTROL_FLAG_GROUP_DEFAULTED = 0x0002, LIBFWNT_CONTROL_FLAG_DACL_PRESENT = 0x0004, LIBFWNT_CONTROL_FLAG_DACL_DEFAULTED = 0x0008, LIBFWNT_CONTROL_FLAG_SACL_PRESENT = 0x0010, LIBFWNT_CONTROL_FLAG_DACL_AUTO_INHERIT_REQ = 0x0100, LIBFWNT_CONTROL_FLAG_SACL_AUTO_INHERIT_REQ = 0x0200, LIBFWNT_CONTROL_FLAG_DACL_AUTO_INHERITED = 0x0400, LIBFWNT_CONTROL_FLAG_SACL_AUTO_INHERITED = 0x0800, LIBFWNT_CONTROL_FLAG_DACL_PROTECTED = 0x1000, LIBFWNT_CONTROL_FLAG_SACL_PROTECTED = 0x2000, LIBFWNT_CONTROL_FLAG_RM_CONTROL_VALID = 0x4000, LIBFWNT_CONTROL_FLAG_SELF_RELATIVE = 0x8000 }; #endif /* !defined( LIBFWNT_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfwnt/libfwnt_huffman_tree.c0000644000175000017500000003147114610746245022400 0ustar00lordyestalordyesta/* * Huffman tree functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_huffman_tree.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" /* Creates a Huffman tree * Make sure the value huffman_tree is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwnt_huffman_tree_initialize( libfwnt_huffman_tree_t **huffman_tree, int number_of_symbols, uint8_t maximum_code_size, libcerror_error_t **error ) { static char *function = "libfwnt_huffman_tree_initialize"; size_t array_size = 0; if( huffman_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Huffman tree.", function ); return( -1 ); } if( *huffman_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid Huffman tree value already set.", function ); return( -1 ); } if( ( number_of_symbols < 0 ) || ( number_of_symbols > 1024 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of symbols value out of bounds.", function ); return( -1 ); } if( maximum_code_size > 32 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid maximum code size value out of bounds.", function ); return( -1 ); } *huffman_tree = memory_allocate_structure( libfwnt_huffman_tree_t ); if( *huffman_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create Huffman tree.", function ); goto on_error; } if( memory_set( *huffman_tree, 0, sizeof( libfwnt_huffman_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear Huffman tree.", function ); memory_free( *huffman_tree ); *huffman_tree = NULL; return( -1 ); } array_size = sizeof( int ) * number_of_symbols; ( *huffman_tree )->symbols = (int *) memory_allocate( array_size ); if( ( *huffman_tree )->symbols == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create symbols.", function ); goto on_error; } if( memory_set( ( *huffman_tree )->symbols, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear symbols.", function ); goto on_error; } array_size = sizeof( int ) * ( maximum_code_size + 1 ); ( *huffman_tree )->code_size_counts = (int *) memory_allocate( array_size ); if( ( *huffman_tree )->code_size_counts == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create code size counts.", function ); goto on_error; } if( memory_set( ( *huffman_tree )->code_size_counts, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear code size counts.", function ); goto on_error; } ( *huffman_tree )->maximum_code_size = maximum_code_size; return( 1 ); on_error: if( *huffman_tree != NULL ) { if( ( *huffman_tree )->code_size_counts != NULL ) { memory_free( ( *huffman_tree )->code_size_counts ); } if( ( *huffman_tree )->symbols != NULL ) { memory_free( ( *huffman_tree )->symbols ); } memory_free( *huffman_tree ); *huffman_tree = NULL; } return( -1 ); } /* Frees a Huffman tree * Returns 1 if successful or -1 on error */ int libfwnt_huffman_tree_free( libfwnt_huffman_tree_t **huffman_tree, libcerror_error_t **error ) { static char *function = "libfwnt_huffman_tree_free"; if( huffman_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Huffman tree.", function ); return( -1 ); } if( *huffman_tree != NULL ) { if( ( *huffman_tree )->code_size_counts != NULL ) { memory_free( ( *huffman_tree )->code_size_counts ); } if( ( *huffman_tree )->symbols != NULL ) { memory_free( ( *huffman_tree )->symbols ); } memory_free( *huffman_tree ); *huffman_tree = NULL; } return( 1 ); } /* Builds the Huffman tree * Returns 1 on success, 0 if the tree is empty or -1 on error */ int libfwnt_huffman_tree_build( libfwnt_huffman_tree_t *huffman_tree, const uint8_t *code_sizes_array, int number_of_code_sizes, libcerror_error_t **error ) { int *symbol_offsets = NULL; static char *function = "libfwnt_huffman_tree_build"; size_t array_size = 0; uint8_t bit_index = 0; uint8_t code_size = 0; int code_offset = 0; int left_value = 0; int symbol = 0; if( huffman_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Huffman tree.", function ); return( -1 ); } if( code_sizes_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid code sizes array.", function ); return( -1 ); } if( number_of_code_sizes < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of code sizes value out of bounds.", function ); return( -1 ); } /* Determine the code size frequencies */ array_size = sizeof( int ) * ( huffman_tree->maximum_code_size + 1 ); if( memory_set( huffman_tree->code_size_counts, 0, array_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear code size counts.", function ); goto on_error; } for( symbol = 0; symbol < number_of_code_sizes; symbol++ ) { code_size = code_sizes_array[ symbol ]; if( code_size > huffman_tree->maximum_code_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid symbol: %d code size: %" PRIu8 " value out of bounds.", function, symbol, code_size ); goto on_error; } huffman_tree->code_size_counts[ code_size ] += 1; } /* The tree has no codes */ if( huffman_tree->code_size_counts[ 0 ] == number_of_code_sizes ) { return( 0 ); } /* Check if the set of code sizes is incomplete or over-subscribed */ left_value = 1; for( bit_index = 1; bit_index <= huffman_tree->maximum_code_size; bit_index++ ) { left_value <<= 1; left_value -= huffman_tree->code_size_counts[ bit_index ]; if( left_value < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: code sizes are over-subscribed.", function ); goto on_error; } } /* TODO if( left_value > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: code sizes are incomplete.", function ); goto on_error; } */ symbol_offsets = (int *) memory_allocate( array_size ); if( symbol_offsets == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create symbol offsets.", function ); goto on_error; } /* Calculate the offsets to sort the symbols per code size */ symbol_offsets[ 0 ] = 0; symbol_offsets[ 1 ] = 0; for( bit_index = 1; bit_index < huffman_tree->maximum_code_size; bit_index++ ) { symbol_offsets[ bit_index + 1 ] = symbol_offsets[ bit_index ] + huffman_tree->code_size_counts[ bit_index ]; } /* Fill the symbols sorted by code size */ for( symbol = 0; symbol < number_of_code_sizes; symbol++ ) { code_size = code_sizes_array[ symbol ]; if( code_size == 0 ) { continue; } code_offset = symbol_offsets[ code_size ]; if( ( code_offset < 0 ) || ( code_offset > number_of_code_sizes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid symbol: %d code offset: %d value out of bounds.", function, symbol, code_offset ); goto on_error; } symbol_offsets[ code_size ] += 1; huffman_tree->symbols[ code_offset ] = symbol; } memory_free( symbol_offsets ); return( 1 ); on_error: if( symbol_offsets != NULL ) { memory_free( symbol_offsets ); } return( -1 ); } /* Retrieves a symbol based on the Huffman code read from the bit-stream * Returns 1 on success or -1 on error */ int libfwnt_huffman_tree_get_symbol_from_bit_stream( libfwnt_huffman_tree_t *huffman_tree, libfwnt_bit_stream_t *bit_stream, uint32_t *symbol, libcerror_error_t **error ) { static char *function = "libfwnt_huffman_tree_get_symbol_from_bit_stream"; uint32_t safe_symbol = 0; uint32_t value_32bit = 0; uint8_t bit_index = 0; uint8_t number_of_bits = 0; int code_size_count = 0; int first_huffman_code = 0; int first_index = 0; int huffman_code = 0; int result = 0; if( huffman_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Huffman tree.", function ); return( -1 ); } if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit stream.", function ); return( -1 ); } if( symbol == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid symbol.", function ); return( -1 ); } /* Try to fill the bit buffer with the maximum number of bits */ while( bit_stream->bit_buffer_size < huffman_tree->maximum_code_size ) { result = libfwnt_bit_stream_read( bit_stream, huffman_tree->maximum_code_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read bits.", function ); return( -1 ); } else if( result == 0 ) { break; } } if( huffman_tree->maximum_code_size < bit_stream->bit_buffer_size ) { number_of_bits = huffman_tree->maximum_code_size; } else { number_of_bits = bit_stream->bit_buffer_size; } for( bit_index = 1; bit_index <= number_of_bits; bit_index++ ) { /* TODO get maximum_code_size of bits into local bit buffer */ if( libfwnt_bit_stream_get_value( bit_stream, 1, &value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from bit stream.", function ); return( -1 ); } huffman_code <<= 1; huffman_code |= (int) value_32bit; code_size_count = huffman_tree->code_size_counts[ bit_index ]; if( ( huffman_code - code_size_count ) < first_huffman_code ) { safe_symbol = huffman_tree->symbols[ first_index + ( huffman_code - first_huffman_code ) ]; result = 1; break; } first_huffman_code += code_size_count; first_huffman_code <<= 1; first_index += code_size_count; } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid Huffman code: 0x%08" PRIx32 ".", function, huffman_code ); return( -1 ); } *symbol = safe_symbol; return( 1 ); } libesedb-20240420/libfwnt/libfwnt_debug.c0000644000175000017500000002027114610746245021017 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfwnt_debug.h" #include "libfwnt_definitions.h" #include "libfwnt_libcnotify.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Prints the security descriptor control flags */ void libfwnt_debug_print_security_descriptor_control_flags( uint16_t control_flags ) { if( ( control_flags & 0x0001 ) != 0 ) { libcnotify_printf( "\t(SE_OWNER_DEFAULTED)\n" ); } if( ( control_flags & 0x0002 ) != 0 ) { libcnotify_printf( "\t(SE_GROUP_DEFAULTED)\n" ); } if( ( control_flags & 0x0004 ) != 0 ) { libcnotify_printf( "\t(SE_DACL_PRESENT)\n" ); } if( ( control_flags & 0x0008 ) != 0 ) { libcnotify_printf( "\t(SE_DACL_DEFAULTED)\n" ); } if( ( control_flags & 0x0010 ) != 0 ) { libcnotify_printf( "\t(SE_SACL_PRESENT)\n" ); } if( ( control_flags & 0x0020 ) != 0 ) { libcnotify_printf( "\t(Unknown 0x0020)\n" ); } if( ( control_flags & 0x0040 ) != 0 ) { libcnotify_printf( "\t(Unknown 0x0040)\n" ); } if( ( control_flags & 0x0080 ) != 0 ) { libcnotify_printf( "\t(Unknown 0x0080)\n" ); } if( ( control_flags & 0x0100 ) != 0 ) { libcnotify_printf( "\t(SE_DACL_AUTO_INHERIT_REQ)\n" ); } if( ( control_flags & 0x0200 ) != 0 ) { libcnotify_printf( "\t(SE_SACL_AUTO_INHERIT_REQ)\n" ); } if( ( control_flags & 0x0400 ) != 0 ) { libcnotify_printf( "\t(SE_DACL_AUTO_INHERITED)\n" ); } if( ( control_flags & 0x0800 ) != 0 ) { libcnotify_printf( "\t(SE_SACL_AUTO_INHERITED)\n" ); } if( ( control_flags & 0x1000 ) != 0 ) { libcnotify_printf( "\t(SE_DACL_PROTECTED)\n" ); } if( ( control_flags & 0x2000 ) != 0 ) { libcnotify_printf( "\t(SE_SACL_PROTECTED)\n" ); } if( ( control_flags & 0x4000 ) != 0 ) { libcnotify_printf( "\t(SE_RM_CONTROL_VALID)\n" ); } if( ( control_flags & 0x8000 ) != 0 ) { libcnotify_printf( "\t(SE_SELF_RELATIVE)\n" ); } } /* Retrieves a string containing the access control entry type */ const char *libfwnt_debug_print_access_control_entry_type( uint8_t entry_type ) { switch( entry_type ) { case LIBFWNT_ACCESS_ALLOWED: return( "Access allowed (ACCESS_ALLOWED_ACE_TYPE)" ); case LIBFWNT_ACCESS_DENIED: return( "Access denied (ACCESS_DENIED_ACE_TYPE)" ); case LIBFWNT_SYSTEM_AUDIT: return( "System-audit (SYSTEM_AUDIT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_ALARM: return( "System-alarm (SYSTEM_ALARM_ACE_TYPE)" ); case LIBFWNT_ACCESS_ALLOWED_COMPOUND: return( "Access allowed (ACCESS_ALLOWED_COMPOUND_ACE_TYPE)" ); case LIBFWNT_ACCESS_ALLOWED_OBJECT: return( "Access allowed (ACCESS_ALLOWED_OBJECT_ACE_TYPE)" ); case LIBFWNT_ACCESS_DENIED_OBJECT: return( "Access denied (ACCESS_DENIED_OBJECT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_AUDIT_OBJECT: return( "System-audit (SYSTEM_AUDIT_OBJECT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_ALARM_OBJECT: return( "System-alarm (SYSTEM_ALARM_OBJECT_ACE_TYPE)" ); case LIBFWNT_ACCESS_ALLOWED_CALLBACK: return( "Access allowed (ACCESS_ALLOWED_CALLBACK_ACE_TYPE)" ); case LIBFWNT_ACCESS_DENIED_CALLBACK: return( "Access denied (ACCESS_DENIED_CALLBACK_ACE_TYPE)" ); case LIBFWNT_ACCESS_ALLOWED_CALLBACK_OBJECT: return( "Access allowed (ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE)" ); case LIBFWNT_ACCESS_DENIED_CALLBACK_OBJECT: return( "Access denied (ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_AUDIT_CALLBACK: return( "System-audit (SYSTEM_AUDIT_CALLBACK_ACE_TYPE)" ); case LIBFWNT_SYSTEM_ALARM_CALLBACK: return( "System-alarm (SYSTEM_ALARM_CALLBACK_ACE_TYPE)" ); case LIBFWNT_SYSTEM_AUDIT_CALLBACK_OBJECT: return( "System-audit (SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_ALARM_CALLBACK_OBJECT: return( "System-alarm (SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE)" ); case LIBFWNT_SYSTEM_MANDATORY_LABEL: return( "Mandatory label (SYSTEM_MANDATORY_LABEL_ACE_TYPE)" ); } return( "UNKNOWN" ); } /* Prints the access control entry flags */ void libfwnt_debug_print_access_control_entry_flags( uint8_t flags ) { if( ( flags & 0x01 ) != 0 ) { libcnotify_printf( "\t(OBJECT_INHERIT_ACE)\n" ); } if( ( flags & 0x02 ) != 0 ) { libcnotify_printf( "\t(CONTAINER_INHERIT_ACE)\n" ); } if( ( flags & 0x04 ) != 0 ) { libcnotify_printf( "\t(NO_PROPAGATE_INHERIT_ACE)\n" ); } if( ( flags & 0x08 ) != 0 ) { libcnotify_printf( "\t(INHERIT_ONLY_ACE)\n" ); } if( ( flags & 0x40 ) != 0 ) { libcnotify_printf( "\t(SUCCESSFUL_ACCESS_ACE_FLAG)\n" ); } if( ( flags & 0x80 ) != 0 ) { libcnotify_printf( "\t(FAILED_ACCESS_ACE_FLAG)\n" ); } } /* Prints the access control entry access mask */ void libfwnt_debug_print_access_control_entry_access_mask( uint32_t access_mask ) { if( ( access_mask & 0x00000001UL ) != 0 ) { libcnotify_printf( "\t(fsdrightReadBody or fsdrightListContents)\n" ); } if( ( access_mask & 0x00000002UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteBody or fsdrightCreateItem)\n" ); } if( ( access_mask & 0x00000004UL ) != 0 ) { libcnotify_printf( "\t(fsdrightAppendMsg or fsdrightCreateContainer)\n" ); } if( ( access_mask & 0x00000008UL ) != 0 ) { libcnotify_printf( "\t(fsdrightReadProperty or fsdrightReadProperty)\n" ); } if( ( access_mask & 0x00000010UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteProperty or fsdrightWriteProperty)\n" ); } if( ( access_mask & 0x00000020UL ) != 0 ) { libcnotify_printf( "\t(fsdrightExecute)\n" ); } if( ( access_mask & 0x00000080UL ) != 0 ) { libcnotify_printf( "\t(fsdrightReadAttributes or fsdrightReadAttributes)\n" ); } if( ( access_mask & 0x00000100UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteAttributes or fsdrightWriteAttributes)\n" ); } if( ( access_mask & 0x00000200UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteOwnProperty or fsdrightWriteOwnProperty)\n" ); } if( ( access_mask & 0x00000400UL ) != 0 ) { libcnotify_printf( "\t(fsdrightDeleteOwnItem or fsdrightDeleteOwnItem)\n" ); } if( ( access_mask & 0x00000800UL ) != 0 ) { libcnotify_printf( "\t(fsdrightViewItem or fsdrightViewItem)\n" ); } if( ( access_mask & 0x00004000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightOwner)\n" ); } if( ( access_mask & 0x00008000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightContact)\n" ); } /* Standard access rights flags */ if( ( access_mask & 0x00010000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightDelete)\n" ); } if( ( access_mask & 0x00020000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightReadControl)\n" ); } if( ( access_mask & 0x00040000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteSD)\n" ); } if( ( access_mask & 0x00080000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightWriteOwner)\n" ); } if( ( access_mask & 0x00100000UL ) != 0 ) { libcnotify_printf( "\t(fsdrightSynchronize)\n" ); } if( ( access_mask & 0x01000000UL ) != 0 ) { libcnotify_printf( "\t(ACCESS_SYSTEM_SECURITY)\n" ); } if( ( access_mask & 0x02000000UL ) != 0 ) { libcnotify_printf( "\t(MAXIMUM_ALLOWED)\n" ); } if( ( access_mask & 0x10000000UL ) != 0 ) { libcnotify_printf( "\t(GENERIC_ALL)\n" ); } if( ( access_mask & 0x20000000UL ) != 0 ) { libcnotify_printf( "\t(GENERIC_EXECUTE)\n" ); } if( ( access_mask & 0x40000000UL ) != 0 ) { libcnotify_printf( "\t(GENERIC_WRITE)\n" ); } if( ( access_mask & 0x80000000UL ) != 0 ) { libcnotify_printf( "\t(GENERIC_READ)\n" ); } } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ libesedb-20240420/libfwnt/libfwnt_lznt1.c0000644000175000017500000003547614610746245021016 0ustar00lordyestalordyesta/* * LZNT1 (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_lznt1.h" /* Decompresses a LZNT1 compressed chunk * Returns 1 on success or -1 on error */ int libfwnt_lznt1_decompress_chunk( const uint8_t *compressed_data, size_t compressed_data_size, size_t *compressed_data_offset, size_t compression_chunk_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libfwnt_lznt1_decompress_chunk"; size_t compression_tuple_index = 0; size_t compression_tuple_threshold = 0; size_t safe_compressed_data_offset = 0; size_t safe_uncompressed_data_size = 0; size_t uncompressed_data_offset = 0; uint16_t compression_tuple = 0; uint16_t compression_tuple_offset_shift = 0; uint16_t compression_tuple_size = 0; uint16_t compression_tuple_size_mask = 0; int16_t compression_tuple_offset = 0; uint8_t compression_flag_bit_index = 0; uint8_t compression_flag_byte = 0; 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( compressed_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data offset.", function ); return( -1 ); } safe_compressed_data_offset = *compressed_data_offset; if( safe_compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data offset value out of bounds.", function ); return( -1 ); } if( compression_chunk_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid compression chunk size value exceeds maximum.", function ); return( -1 ); } if( compression_chunk_size > ( compressed_data_size - safe_compressed_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data size.", function ); return( -1 ); } safe_uncompressed_data_size = *uncompressed_data_size; compression_tuple_threshold = 16; compression_tuple_offset_shift = 12; compression_tuple_size_mask = 0x0fff; while( compression_chunk_size > 0 ) { if( safe_compressed_data_offset >= compressed_data_size ) { break; } compression_flag_byte = compressed_data[ safe_compressed_data_offset ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, safe_compressed_data_offset, safe_compressed_data_offset ); libcnotify_printf( "%s: compression flag byte\t\t\t: 0x%02" PRIx8 "\n", function, compression_flag_byte ); libcnotify_printf( "\n" ); } #endif /* #if defined( HAVE_DEBUG_OUTPUT ) */ safe_compressed_data_offset += 1; compression_chunk_size -= 1; for( compression_flag_bit_index = 0; compression_flag_bit_index < 8; compression_flag_bit_index++ ) { /* Check if the data is compressed (tag bit is set) */ if( ( compression_flag_byte & 0x01 ) != 0 ) { if( safe_compressed_data_offset >= ( compressed_data_size - 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data offset value out of bounds.", function ); return( -1 ); } /* Read the compression ( size, offset ) tuple */ byte_stream_copy_to_uint16_little_endian( &( compressed_data[ safe_compressed_data_offset ] ), compression_tuple ); compression_tuple_offset = ( compression_tuple >> compression_tuple_offset_shift ) + 1; compression_tuple_size = ( compression_tuple & compression_tuple_size_mask ) + 3; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, safe_compressed_data_offset, safe_compressed_data_offset ); libcnotify_printf( "%s: compression tuple\t\t\t: 0x%04" PRIx16 " (shift: %" PRIu16 ", mask: 0x%04" PRIx16 ")\n", function, compression_tuple, compression_tuple_offset_shift, compression_tuple_size_mask ); libcnotify_printf( "%s: compression tuple offset\t\t: %" PRIi16 "\n", function, compression_tuple_offset ); libcnotify_printf( "%s: compression tuple size\t\t\t: %" PRIu16 "\n", function, compression_tuple_size ); libcnotify_printf( "%s: uncompressed data offset\t\t: %" PRIzd "\n", function, uncompressed_data_offset ); libcnotify_printf( "\n" ); } #endif /* #if defined( HAVE_DEBUG_OUTPUT ) */ safe_compressed_data_offset += 2; compression_chunk_size -= 2; /* The compression tuple offset refers to an offset in the uncompressed data */ if( (size_t) compression_tuple_offset > uncompressed_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compression tuple offset value out of bounds.", function ); return( -1 ); } compression_tuple_index = uncompressed_data_offset - compression_tuple_offset; while( compression_tuple_size > 0 ) { if( compression_tuple_index > uncompressed_data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compression tuple index value out of bounds.", function ); return( -1 ); } if( uncompressed_data_offset >= safe_uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data offset value out of bounds.", function ); return( -1 ); } uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ compression_tuple_index++ ]; compression_tuple_size -= 1; } } else { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data offset value out of bounds.", function ); return( -1 ); } if( safe_compressed_data_offset >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compressed data offset value out of bounds.", function ); return( -1 ); } uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ safe_compressed_data_offset++ ]; compression_chunk_size -= 1; } compression_flag_byte >>= 1; if( compression_chunk_size == 0 ) { break; } /* The compression tuple size mask and offset shift * are dependent on the current buffer offset in the uncompressed data */ while( uncompressed_data_offset > compression_tuple_threshold ) { if( compression_tuple_offset_shift == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compression tuple offset shift value out of bounds.", function ); return( -1 ); } compression_tuple_offset_shift -= 1; compression_tuple_size_mask >>= 1; compression_tuple_threshold <<= 1; } } } *compressed_data_offset = safe_compressed_data_offset; *uncompressed_data_size = uncompressed_data_offset; return( 1 ); } /* Decompresses data using LZNT1 compression * Returns 1 on success or -1 on error */ int libfwnt_lznt1_decompress( const 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 = "libfwnt_lznt1_decompress"; size_t compressed_data_offset = 0; size_t safe_uncompressed_data_size = 0; size_t uncompressed_chunk_size = 0; size_t uncompressed_data_offset = 0; uint16_t compression_chunk_header = 0; uint16_t compression_chunk_size = 0; 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 == 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 ); } safe_uncompressed_data_size = *uncompressed_data_size; while( compressed_data_offset < compressed_data_size ) { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { break; } if( ( compressed_data_offset + 1 ) >= compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data size value too small.", function ); return( -1 ); } /* The first 2 bytes contain the compressed chunk header * 0 - 11 compressed chunk size * 12 - 14 signature value * 15 is compressed flag */ byte_stream_copy_to_uint16_little_endian( &( compressed_data[ compressed_data_offset ] ), compression_chunk_header ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n", function, compressed_data_offset, compressed_data_offset ); libcnotify_printf( "%s: compression chunk header\t\t\t: 0x%04" PRIx16 "\n", function, compression_chunk_header ); libcnotify_printf( "%s: compressed chunk size\t\t\t\t: %" PRIu16 "\n", function, ( compression_chunk_header & 0x0fff ) + 1 ); libcnotify_printf( "%s: signature value\t\t\t\t: %" PRIu16 "\n", function, ( compression_chunk_header >> 12 ) & 0x0007 ); libcnotify_printf( "%s: is compressed flag\t\t\t\t: %" PRIu16 "\n", function, compression_chunk_header >> 15 ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ compressed_data_offset += 2; if( compression_chunk_header == 0 ) { break; } compression_chunk_size = ( compression_chunk_header & 0x0fff ) + 1; if( ( compression_chunk_header & 0x8000 ) != 0 ) { /* Adjust the compression chunk size for the iteration */ uncompressed_chunk_size = safe_uncompressed_data_size - uncompressed_data_offset; if( libfwnt_lznt1_decompress_chunk( compressed_data, compressed_data_size, &compressed_data_offset, compression_chunk_size, &( uncompressed_data[ uncompressed_data_offset ] ), &uncompressed_chunk_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to decompress chunk.", function ); return( -1 ); } uncompressed_data_offset += uncompressed_chunk_size; } else { if( compression_chunk_size > ( compressed_data_size - compressed_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: compressed data too small.", function ); return( -1 ); } if( compression_chunk_size > ( safe_uncompressed_data_size - uncompressed_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); return( -1 ); } if( memory_copy( &( uncompressed_data[ uncompressed_data_offset ] ), &( compressed_data[ compressed_data_offset ] ), compression_chunk_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy copy compressed data to uncompressed data.", function ); return( -1 ); } compressed_data_offset += (size_t) compression_chunk_size; uncompressed_data_offset += (size_t) compression_chunk_size; } } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); } libesedb-20240420/libfwnt/libfwnt_notify.h0000644000175000017500000000305214610746245021244 0ustar00lordyestalordyesta/* * Notification functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_NOTIFY_H ) #define _LIBFWNT_NOTIFY_H #include #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWNT ) LIBFWNT_EXTERN \ void libfwnt_notify_set_verbose( int verbose ); LIBFWNT_EXTERN \ int libfwnt_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_notify_stream_close( libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_NOTIFY_H ) */ libesedb-20240420/libfwnt/libfwnt_locale_identifier.c0000644000175000017500000004465314610746245023404 0ustar00lordyestalordyesta/* * Locale identifier (LCID) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfwnt_locale_identifier.h" 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 ); } libesedb-20240420/libfwnt/libfwnt_debug.h0000644000175000017500000000267014610746245021027 0ustar00lordyestalordyesta/* * Debug functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_DEBUG_H ) #define _LIBFWNT_DEBUG_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) void libfwnt_debug_print_security_descriptor_control_flags( uint16_t control_flags ); const char *libfwnt_debug_print_access_control_entry_type( uint8_t entry_type ); void libfwnt_debug_print_access_control_entry_flags( uint8_t flags ); void libfwnt_debug_print_access_control_entry_access_mask( uint32_t access_mask ); #endif /* defined( HAVE_DEBUG_OUTPUT ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_DEBUG_H ) */ libesedb-20240420/libfwnt/libfwnt_libcdata.h0000644000175000017500000000301114610746245021472 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LIBCDATA_H ) #define _LIBFWNT_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBFWNT_LIBCDATA_H ) */ libesedb-20240420/libfwnt/libfwnt_lzx.h0000644000175000017500000000535514610746245020561 0ustar00lordyestalordyesta/* * LZX (un)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LZX_H ) #define _LIBFWNT_LZX_H #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_extern.h" #include "libfwnt_huffman_tree.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The block types */ enum LIBFWNT_LZX_BLOCK_TYPES { LIBFWNT_LZX_BLOCK_TYPE_VERBATIM = 0x01, LIBFWNT_LZX_BLOCK_TYPE_ALIGNED = 0x02, LIBFWNT_LZX_BLOCK_TYPE_UNCOMPRESSED = 0x03 }; int libfwnt_lzx_read_huffman_code_sizes( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, int number_of_code_sizes, libcerror_error_t **error ); int libfwnt_lzx_build_main_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *main_huffman_tre, libcerror_error_t **error ); int libfwnt_lzx_build_lengths_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *lengths_huffman_tre, libcerror_error_t **error ); int libfwnt_lzx_build_aligned_offsets_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *aligned_offsets_huffman_tre, libcerror_error_t **error ); int libfwnt_lzx_decode_huffman( libfwnt_bit_stream_t *bit_stream, uint32_t block_size, libfwnt_huffman_tree_t *main_huffman_tree, libfwnt_huffman_tree_t *lengths_huffman_tree, libfwnt_huffman_tree_t *aligned_offsets_huffman_tree, uint32_t *recent_compression_offsets, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_lzx_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_LZX_H ) */ libesedb-20240420/libfwnt/libfwnt_unused.h0000644000175000017500000000257014610746245021243 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_UNUSED_H ) #define _LIBFWNT_UNUSED_H #include #if !defined( LIBFWNT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFWNT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFWNT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFWNT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFWNT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif /* !defined( _LIBFWNT_UNUSED_H ) */ libesedb-20240420/libfwnt/libfwnt_libcnotify.h0000644000175000017500000000265514610746245022106 0ustar00lordyestalordyesta/* * The libcnotify header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LIBCNOTIFY_H ) #define _LIBFWNT_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 /* defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBFWNT_LIBCNOTIFY_H ) */ libesedb-20240420/libfwnt/libfwnt_access_control_entry.c0000644000175000017500000004677214610746245024171 0ustar00lordyestalordyesta/* * Windows NT Access Control Entry (ACE) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "libfwnt_access_control_entry.h" #include "libfwnt_debug.h" #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" /* Creates an access control entry * Make sure the value access_control_entry is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfwnt_access_control_entry_initialize( libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_initialize"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } if( *access_control_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid access control entry value already set.", function ); return( -1 ); } internal_access_control_entry = memory_allocate_structure( libfwnt_internal_access_control_entry_t ); if( internal_access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create access control entry.", function ); goto on_error; } if( memory_set( internal_access_control_entry, 0, sizeof( libfwnt_internal_access_control_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear access control entry.", function ); goto on_error; } *access_control_entry = (libfwnt_access_control_entry_t *) internal_access_control_entry; return( 1 ); on_error: if( internal_access_control_entry != NULL ) { memory_free( internal_access_control_entry ); } return( -1 ); } /* Frees an access control entry * Returns 1 if successful or -1 on error */ int libfwnt_access_control_entry_free( libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ) { static char *function = "libfwnt_access_control_entry_free"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } if( *access_control_entry != NULL ) { *access_control_entry = NULL; } return( 1 ); } /* Frees an access control entry * Returns 1 if successful or -1 on error */ int libfwnt_internal_access_control_entry_free( libfwnt_internal_access_control_entry_t **internal_access_control_entry, libcerror_error_t **error ) { static char *function = "libfwnt_internal_access_control_entry_free"; int result = 1; if( internal_access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } if( *internal_access_control_entry != NULL ) { if( ( *internal_access_control_entry )->security_identifier != NULL ) { if( libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( ( *internal_access_control_entry )->security_identifier ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free security identifier.", function ); result = -1; } } memory_free( *internal_access_control_entry ); *internal_access_control_entry = NULL; } return( result ); } /* Converts an access control entry stored in a byte stream into a runtime version * Returns 1 if successful or -1 on error */ int libfwnt_access_control_entry_copy_from_byte_stream( libfwnt_access_control_entry_t *access_control_entry, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_copy_from_byte_stream"; size_t access_mask_offset = 0; size_t sid_offset = 0; #if defined( HAVE_DEBUG_OUTPUT ) system_character_t *sid_string = NULL; size_t sid_string_size = 0; int result = 0; #endif if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } internal_access_control_entry = (libfwnt_internal_access_control_entry_t *) access_control_entry; 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 != LIBFWNT_ENDIAN_LITTLE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: header data:\n", function ); libcnotify_print_data( byte_stream, 4, 0 ); } #endif internal_access_control_entry->type = byte_stream[ 0 ]; internal_access_control_entry->flags = byte_stream[ 1 ]; byte_stream_copy_to_uint16_little_endian( &( byte_stream[ 2 ] ), internal_access_control_entry->size ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t: %" PRIu8 " (%s)\n", function, internal_access_control_entry->type, libfwnt_debug_print_access_control_entry_type( internal_access_control_entry->type ) ); libcnotify_printf( "%s: flags\t\t: 0x%02" PRIx8 "\n", function, internal_access_control_entry->flags ); libfwnt_debug_print_access_control_entry_flags( internal_access_control_entry->flags ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: size\t\t: %" PRIu16 "\n", function, internal_access_control_entry->size ); libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( internal_access_control_entry->size < 4 ) || ( (size_t) internal_access_control_entry->size > byte_stream_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: access control entry size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: access control entry data:\n", function ); libcnotify_print_data( &( byte_stream[ 4 ] ), internal_access_control_entry->size - 4, 0 ); } #endif switch( internal_access_control_entry->type ) { /* Basic types */ case LIBFWNT_ACCESS_ALLOWED: case LIBFWNT_ACCESS_DENIED: case LIBFWNT_SYSTEM_AUDIT: case LIBFWNT_SYSTEM_ALARM: case LIBFWNT_ACCESS_ALLOWED_CALLBACK: case LIBFWNT_ACCESS_DENIED_CALLBACK: case LIBFWNT_SYSTEM_AUDIT_CALLBACK: case LIBFWNT_SYSTEM_ALARM_CALLBACK: case LIBFWNT_SYSTEM_MANDATORY_LABEL: access_mask_offset = 4; sid_offset = 8; break; /* Object types */ case LIBFWNT_ACCESS_ALLOWED_OBJECT: case LIBFWNT_ACCESS_DENIED_OBJECT: case LIBFWNT_SYSTEM_AUDIT_OBJECT: case LIBFWNT_SYSTEM_ALARM_OBJECT: case LIBFWNT_ACCESS_ALLOWED_CALLBACK_OBJECT: case LIBFWNT_ACCESS_DENIED_CALLBACK_OBJECT: case LIBFWNT_SYSTEM_AUDIT_CALLBACK_OBJECT: case LIBFWNT_SYSTEM_ALARM_CALLBACK_OBJECT: access_mask_offset = 4; sid_offset = 40; break; /* Unknown types */ case LIBFWNT_ACCESS_ALLOWED_COMPOUND: default: break; } if( access_mask_offset > 0 ) { if( access_mask_offset > (size_t) ( internal_access_control_entry->size - 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: access control mask offset value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( byte_stream[ access_mask_offset ] ), internal_access_control_entry->access_mask ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: access mask\t\t: 0x%08" PRIx32 "\n", function, internal_access_control_entry->access_mask ); libfwnt_debug_print_access_control_entry_access_mask( internal_access_control_entry->access_mask ); libcnotify_printf( "\n" ); } #endif } if( sid_offset > 0 ) { if( sid_offset > internal_access_control_entry->size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: security identifier offset value out of bounds.", function ); goto on_error; } if( libfwnt_security_identifier_initialize( &( internal_access_control_entry->security_identifier ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create security identifier.", function ); goto on_error; } if( internal_access_control_entry->security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid access control entry - missing owner security identifier.", function ); goto on_error; } ( (libfwnt_internal_security_identifier_t *) internal_access_control_entry->security_identifier )->is_managed = 1; if( libfwnt_security_identifier_copy_from_byte_stream( internal_access_control_entry->security_identifier, &( byte_stream[ sid_offset ] ), byte_stream_size - sid_offset, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security identifier from byte stream.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfwnt_security_identifier_get_string_size( internal_access_control_entry->security_identifier, &sid_string_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve security identifier string size.", function ); goto on_error; } libcnotify_printf( "%s: SID\t\t\t: ", function ); if( sid_string_size > 0 ) { sid_string = system_string_allocate( sid_string_size ); if( sid_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create security identifier string.", function ); goto on_error; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( internal_access_control_entry->security_identifier, (uint16_t *) sid_string, sid_string_size, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( internal_access_control_entry->security_identifier, (uint8_t *) sid_string, sid_string_size, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security identifier to string.", function ); goto on_error; } libcnotify_printf( "%" PRIs_SYSTEM "", sid_string ); memory_free( sid_string ); sid_string = NULL; } libcnotify_printf( "\n" ); } #endif /* defined( HAVE_DEBUG_OUTPUT ) */ } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( sid_string != NULL ) { memory_free( sid_string ); } #endif if( internal_access_control_entry->security_identifier != NULL ) { libfwnt_internal_security_identifier_free( (libfwnt_internal_security_identifier_t **) &( internal_access_control_entry->security_identifier ), NULL ); } return( -1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libfwnt_access_control_entry_get_type( libfwnt_access_control_entry_t *access_control_entry, uint8_t *type, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_get_type"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } internal_access_control_entry = (libfwnt_internal_access_control_entry_t *) access_control_entry; if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } *type = internal_access_control_entry->type; return( 1 ); } /* Retrieves the flags * Returns 1 if successful or -1 on error */ int libfwnt_access_control_entry_get_flags( libfwnt_access_control_entry_t *access_control_entry, uint8_t *flags, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_get_flags"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } internal_access_control_entry = (libfwnt_internal_access_control_entry_t *) access_control_entry; if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid flags.", function ); return( -1 ); } *flags = internal_access_control_entry->flags; return( 1 ); } /* Retrieves the access mask * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_access_control_entry_get_access_mask( libfwnt_access_control_entry_t *access_control_entry, uint32_t *access_mask, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_get_access_mask"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } internal_access_control_entry = (libfwnt_internal_access_control_entry_t *) access_control_entry; if( access_mask == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access mask.", function ); return( -1 ); } switch( internal_access_control_entry->type ) { /* Basic types */ case LIBFWNT_ACCESS_ALLOWED: case LIBFWNT_ACCESS_DENIED: case LIBFWNT_SYSTEM_AUDIT: case LIBFWNT_SYSTEM_ALARM: case LIBFWNT_ACCESS_ALLOWED_CALLBACK: case LIBFWNT_ACCESS_DENIED_CALLBACK: case LIBFWNT_SYSTEM_AUDIT_CALLBACK: case LIBFWNT_SYSTEM_ALARM_CALLBACK: case LIBFWNT_SYSTEM_MANDATORY_LABEL: /* Object types */ case LIBFWNT_ACCESS_ALLOWED_OBJECT: case LIBFWNT_ACCESS_DENIED_OBJECT: case LIBFWNT_SYSTEM_AUDIT_OBJECT: case LIBFWNT_SYSTEM_ALARM_OBJECT: case LIBFWNT_ACCESS_ALLOWED_CALLBACK_OBJECT: case LIBFWNT_ACCESS_DENIED_CALLBACK_OBJECT: case LIBFWNT_SYSTEM_AUDIT_CALLBACK_OBJECT: case LIBFWNT_SYSTEM_ALARM_CALLBACK_OBJECT: break; /* Unknown types */ case LIBFWNT_ACCESS_ALLOWED_COMPOUND: default: return( 0 ); } *access_mask = internal_access_control_entry->access_mask; return( 1 ); } /* Retrieves the security identifier * Returns 1 if successful, 0 if not available or -1 on error */ int libfwnt_access_control_entry_get_security_identifier( libfwnt_access_control_entry_t *access_control_entry, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ) { libfwnt_internal_access_control_entry_t *internal_access_control_entry = NULL; static char *function = "libfwnt_access_control_entry_get_security_identifier"; if( access_control_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access control entry.", function ); return( -1 ); } internal_access_control_entry = (libfwnt_internal_access_control_entry_t *) access_control_entry; 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 ); } if( internal_access_control_entry->security_identifier == NULL ) { return( 0 ); } *security_identifier = internal_access_control_entry->security_identifier; return( 1 ); } libesedb-20240420/libfwnt/libfwnt_lzxpress.h0000644000175000017500000000442614610746245021634 0ustar00lordyestalordyesta/* * LZXPRESS (de)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_LZXPRESS_H ) #define _LIBFWNT_LZXPRESS_H #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_extern.h" #include "libfwnt_huffman_tree.h" #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwnt_lzxpress_huffman_code_symbol libfwnt_lzxpress_huffman_code_symbol_t; struct libfwnt_lzxpress_huffman_code_symbol { /* The symbol */ uint16_t symbol; /* The code size */ uint16_t code_size; }; LIBFWNT_EXTERN \ int libfwnt_lzxpress_compress( const uint8_t *uncompressed_data, size_t uncompressed_data_size, uint8_t *compressed_data, size_t *compressed_data_size, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_lzxpress_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); int libfwnt_lzxpress_huffman_decompress_chunk( libfwnt_bit_stream_t *bit_stream, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_lzxpress_huffman_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_LZXPRESS_H ) */ libesedb-20240420/libfwnt/libfwnt_security_descriptor.h0000644000175000017500000000641014610746245024042 0ustar00lordyestalordyesta/* * Windows NT Security Descriptor functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_SECURITY_DESCRIPTOR_H ) #define _LIBFWNT_INTERNAL_SECURITY_DESCRIPTOR_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 Descriptor is formatted as following: * header: revision number, padding, control flags * owner (SID) * group (SID) * discretionary access control list (DACL) * system access control list (SACL) */ typedef struct libfwnt_internal_security_descriptor libfwnt_internal_security_descriptor_t; struct libfwnt_internal_security_descriptor { /* The revision number */ uint8_t revision_number; /* The owner SID */ libfwnt_security_identifier_t *owner_sid; /* The group SID */ libfwnt_security_identifier_t *group_sid; /* The system ACL */ libfwnt_access_control_list_t *system_acl; /* The discretionary ACL */ libfwnt_access_control_list_t *discretionary_acl; }; LIBFWNT_EXTERN \ int libfwnt_security_descriptor_initialize( libfwnt_security_descriptor_t **security_descriptor, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_free( libfwnt_security_descriptor_t **security_descriptor, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_copy_from_byte_stream( libfwnt_security_descriptor_t *security_descriptor, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_get_owner( libfwnt_security_descriptor_t *security_descriptor, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_get_group( libfwnt_security_descriptor_t *security_descriptor, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_get_discretionary_acl( libfwnt_security_descriptor_t *security_descriptor, libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_descriptor_get_system_acl( libfwnt_security_descriptor_t *security_descriptor, libfwnt_access_control_list_t **access_control_list, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_INTERNAL_SECURITY_DESCRIPTOR_H ) */ libesedb-20240420/libfwnt/libfwnt_lzx.c0000644000175000017500000010630414610746245020550 0ustar00lordyestalordyesta/* * LZX (un)compression functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfwnt_bit_stream.h" #include "libfwnt_huffman_tree.h" #include "libfwnt_libcerror.h" #include "libfwnt_libcnotify.h" #include "libfwnt_lzx.h" #if !defined( LIBFWNT_LZX_ATTRIBUTE_FALLTHROUGH ) #if defined( __GNUC__ ) && __GNUC__ >= 7 #define LIBFWNT_LZX_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough)) #else #define LIBFWNT_LZX_ATTRIBUTE_FALLTHROUGH #endif #endif /* Base position - 2 */ const int32_t libfwnt_lzx_compression_offset_base[ 50 ] = { -2, -1, 0, 1, 2, 4, 6, 10, 14, 22, 30, 46, 62, 94, 126, 190, 254, 382, 510, 766, 1022, 1534, 2046, 3070, 4094, 6142, 8190, 12286, 16382, 24574, 32766, 49150, 65534, 98302, 131070, 196606, 262142, 393214, 524286, 655358, 786430, 917502, 1048574, 1179646, 1310718, 1441790, 1572862, 1703934, 1835006, 1966078 }; const uint8_t libfwnt_lzx_number_of_footer_bits[ 50 ] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17 }; /* Reads the Huffman code sizes * Returns 1 on success or -1 on error */ int libfwnt_lzx_read_huffman_code_sizes( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, int number_of_code_sizes, libcerror_error_t **error ) { uint8_t pre_code_size_array[ 20 ]; libfwnt_huffman_tree_t *pre_codes_huffman_tree = NULL; static char *function = "libfwnt_lzx_read_huffman_code_sizes"; uint32_t symbol = 0; uint32_t times_to_repeat = 0; uint32_t value_32bit = 0; int32_t code_size = 0; uint8_t pre_code_index = 0; int code_size_index = 0; if( bit_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid bit-stream.", function ); return( -1 ); } for( pre_code_index = 0; pre_code_index < 20; pre_code_index++ ) { if( libfwnt_bit_stream_get_value( bit_stream, 4, &value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve pre-code: %" PRIu8 " size from bit stream.", function, pre_code_index ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: pre-code: % 2" PRIu8 " value\t\t\t: %" PRIu32 "\n", function, pre_code_index, value_32bit) ; } pre_code_size_array[ pre_code_index ] = (uint8_t) value_32bit; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } if( libfwnt_huffman_tree_initialize( &pre_codes_huffman_tree, 20, 15, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create pre-codes Huffman tree.", function ); goto on_error; } if( libfwnt_huffman_tree_build( pre_codes_huffman_tree, pre_code_size_array, 20, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build pre-codes Huffman tree.", function ); goto on_error; } code_size_index = 0; while( code_size_index < number_of_code_sizes ) { if( libfwnt_huffman_tree_get_symbol_from_bit_stream( pre_codes_huffman_tree, bit_stream, &symbol, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve symbol from pre-codes Huffman tree.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: code size: % 3" PRIu32 " symbol\t\t: %" PRIu32 "\n", function, code_size_index, symbol ); } if( symbol < 17 ) { code_size = code_size_array[ code_size_index ] - symbol; if( code_size < 0 ) { code_size += 17; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: code size: % 3" PRIu32 " value\t\t: %" PRIi32 "\n", function, code_size_index, code_size ); } code_size_array[ code_size_index++ ] = (uint8_t) code_size; continue; } code_size = 0; if( symbol == 17 ) { if( libfwnt_bit_stream_get_value( bit_stream, 4, ×_to_repeat, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve times to repeat from bit stream.", function ); goto on_error; } times_to_repeat += 4; } else if( symbol == 18 ) { if( libfwnt_bit_stream_get_value( bit_stream, 5, ×_to_repeat, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve times to repeat from bit stream.", function ); goto on_error; } times_to_repeat += 20; } else if( symbol == 19 ) { if( libfwnt_bit_stream_get_value( bit_stream, 1, ×_to_repeat, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve times to repeat from bit stream.", function ); goto on_error; } times_to_repeat += 4; if( libfwnt_huffman_tree_get_symbol_from_bit_stream( pre_codes_huffman_tree, bit_stream, &symbol, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve symbol from pre-codes Huffman tree.", function ); goto on_error; } if( symbol > 17 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid code size symbol value out of bounds.", function ); goto on_error; } code_size = code_size_array[ code_size_index ] - symbol; if( code_size < 0 ) { code_size += 17; } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid code size symbol value out of bounds.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: times to repeat\t\t\t: %" PRIu32 "\n", function, times_to_repeat ); } if( times_to_repeat > (uint32_t) ( number_of_code_sizes - code_size_index ) ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: times to repeat value out of bounds.\n", function ); } times_to_repeat = (uint32_t) ( number_of_code_sizes - code_size_index ); } while( times_to_repeat > 0 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: code size: % 3" PRIu32 " value\t\t: %" PRIi32 "\n", function, code_size_index, code_size ); } code_size_array[ code_size_index++ ] = (uint8_t) code_size; times_to_repeat--; } } if( libfwnt_huffman_tree_free( &pre_codes_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free pre-codes Huffman tree.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } return( 1 ); on_error: if( pre_codes_huffman_tree != NULL ) { libfwnt_huffman_tree_free( &pre_codes_huffman_tree, NULL ); } return( -1 ); } /* Reads and builds the literals and match headers Huffman tree * Returns 1 on success or -1 on error */ int libfwnt_lzx_build_main_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *huffman_tree, libcerror_error_t **error ) { static char *function = "libfwnt_lzx_build_main_huffman_tree"; if( libfwnt_lzx_read_huffman_code_sizes( bit_stream, code_size_array, 256, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read literals Huffman code sizes.", function ); return( -1 ); } if( libfwnt_lzx_read_huffman_code_sizes( bit_stream, &( code_size_array[ 256 ] ), 240, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read literals Huffman code sizes.", function ); return( -1 ); } if( libfwnt_huffman_tree_build( huffman_tree, code_size_array, 256 + 240, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build literals and match headers Huffman tree.", function ); return( -1 ); } return( 1 ); } /* Reads and builds the lengths Huffman tree * Returns 1 on success or -1 on error */ int libfwnt_lzx_build_lengths_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *huffman_tree, libcerror_error_t **error ) { static char *function = "libfwnt_lzx_build_lengths_huffman_tree"; if( libfwnt_lzx_read_huffman_code_sizes( bit_stream, code_size_array, 249, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read literals Huffman code sizes.", function ); return( -1 ); } if( libfwnt_huffman_tree_build( huffman_tree, code_size_array, 249, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build lengths Huffman tree.", function ); return( -1 ); } return( 1 ); } /* Reads and builds the aligned offsets Huffman tree * Returns 1 on success or -1 on error */ int libfwnt_lzx_build_aligned_offsets_huffman_tree( libfwnt_bit_stream_t *bit_stream, uint8_t *code_size_array, libfwnt_huffman_tree_t *huffman_tree, libcerror_error_t **error ) { static char *function = "libfwnt_lzx_build_aligned_offsets_huffman_tree"; uint32_t code_size = 0; int code_size_index = 0; for( code_size_index = 0; code_size_index < 8; code_size_index++ ) { if( libfwnt_bit_stream_get_value( bit_stream, 3, &code_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from bit stream.", function ); return( -1 ); } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: code size: % 2d value\t: %" PRIu32 "\n", function, code_size_index, code_size ); } code_size_array[ code_size_index ] = (uint8_t) code_size; } if( libfwnt_huffman_tree_build( huffman_tree, code_size_array, 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build aligned offsets Huffman tree.", function ); return( -1 ); } return( 1 ); } /* Decodes a Huffman compressed block * Returns 1 on success or -1 on error */ int libfwnt_lzx_decode_huffman( libfwnt_bit_stream_t *bit_stream, uint32_t block_size, libfwnt_huffman_tree_t *main_huffman_tree, libfwnt_huffman_tree_t *lengths_huffman_tree, libfwnt_huffman_tree_t *aligned_offsets_huffman_tree, uint32_t *recent_compression_offsets, uint8_t *uncompressed_data, size_t uncompressed_data_size, size_t *uncompressed_data_offset, libcerror_error_t **error ) { static char *function = "libfwnt_lzx_decode_huffman"; size_t data_end_offset = 0; size_t data_offset = 0; uint32_t aligned_offset = 0; uint32_t compression_offset = 0; uint32_t compression_offset_slot = 0; uint32_t compression_size = 0; uint32_t symbol = 0; uint8_t number_of_bits = 0; if( recent_compression_offsets == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid recent compression offsets.", 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 ); } if( uncompressed_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data offset.", function ); return( -1 ); } data_offset = *uncompressed_data_offset; data_end_offset = data_offset + block_size; while( data_offset < data_end_offset ) { if( libfwnt_huffman_tree_get_symbol_from_bit_stream( main_huffman_tree, bit_stream, &symbol, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve symbol from literals and match headers Huffman tree.", function ); return( -1 ); } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: symbol\t\t\t\t\t: %" PRIu32 "\n", function, symbol ); } if( symbol < 256 ) { if( data_offset >= uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid uncompressed data value too small.", function ); return( -1 ); } uncompressed_data[ data_offset++ ] = (uint8_t) symbol; } else { compression_size = symbol % 8; compression_offset_slot = ( symbol - 256 ) / 8; if( compression_size == 7 ) { if( libfwnt_huffman_tree_get_symbol_from_bit_stream( lengths_huffman_tree, bit_stream, &compression_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve symbol from lengths Huffman tree.", function ); return( -1 ); } compression_size += 7; } compression_size += 2; if( compression_offset_slot < 3 ) { compression_offset = recent_compression_offsets[ compression_offset_slot ]; recent_compression_offsets[ compression_offset_slot ] = recent_compression_offsets[ 0 ]; } else { number_of_bits = libfwnt_lzx_number_of_footer_bits[ compression_offset_slot ]; if( ( aligned_offsets_huffman_tree != NULL ) && ( compression_offset_slot >= 8 ) ) { number_of_bits -= 3; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of footer bits\t\t\t: %" PRIu8 "\n", function, number_of_bits ); } if( libfwnt_bit_stream_get_value( bit_stream, number_of_bits, &compression_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve compression offset from bit stream.", function ); return( -1 ); } if( ( aligned_offsets_huffman_tree != NULL ) && ( compression_offset_slot >= 8 ) ) { if( libfwnt_huffman_tree_get_symbol_from_bit_stream( aligned_offsets_huffman_tree, bit_stream, &aligned_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve symbol from literals and match headers Huffman tree.", function ); return( -1 ); } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: aligned offset\t\t\t\t: %" PRIu32 "\n", function, aligned_offset ); } compression_offset <<= 3; compression_offset |= aligned_offset; } compression_offset += libfwnt_lzx_compression_offset_base[ compression_offset_slot ]; recent_compression_offsets[ 2 ] = recent_compression_offsets[ 1 ]; recent_compression_offsets[ 1 ] = recent_compression_offsets[ 0 ]; } recent_compression_offsets[ 0 ] = compression_offset; if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compression size\t\t\t\t: %" PRIu32 "\n", function, compression_size ); libcnotify_printf( "%s: compression offset slot\t\t\t: %" PRIu32 "\n", function, compression_offset_slot ); libcnotify_printf( "%s: compression offset\t\t\t\t: %" PRIu32 "\n", function, compression_offset ); } if( compression_offset > data_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid compression offset value out of bounds.", function ); return( -1 ); } if( ( data_offset + compression_size ) > uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid uncompressed data value too small.", function ); return( -1 ); } while( compression_size > 0 ) { uncompressed_data[ data_offset ] = uncompressed_data[ data_offset - compression_offset ]; data_offset++; compression_size--; } } } *uncompressed_data_offset = data_offset; return( 1 ); } /* Adjusts the 32-bit Intel 80x86 CALL (0xe8) instructions after decompression * Returns 1 on success or -1 on error */ int libfwnt_lzx_decompress_adjust_call_instructions( uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libfwnt_lzx_decompress_adjust_call_instructions"; size_t uncompressed_data_offset = 0; uint32_t address = 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 < 6 ) || ( uncompressed_data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid uncompressed data size value out of bounds.", function ); return( -1 ); } for( uncompressed_data_offset = 0; uncompressed_data_offset < ( uncompressed_data_size - 6 ); uncompressed_data_offset++ ) { if( uncompressed_data[ uncompressed_data_offset ] != 0xe8 ) { continue; } byte_stream_copy_to_uint32_little_endian( &( uncompressed_data[ uncompressed_data_offset + 1 ] ), address ); if( address > (uint32_t) INT32_MAX ) { if( (int32_t) address > ( -1 * (int32_t) uncompressed_data_offset ) ) { address = (uint32_t) ( (int32_t) address + 12000000 ); byte_stream_copy_from_uint32_little_endian( &( uncompressed_data[ uncompressed_data_offset + 1 ] ), address ); } } else { if( address < 12000000 ) { address = (uint32_t) ( (int32_t) address - uncompressed_data_offset ); byte_stream_copy_from_uint32_little_endian( &( uncompressed_data[ uncompressed_data_offset + 1 ] ), address ); } } uncompressed_data_offset += 4; } return( 1 ); } /* Decompresses LZX compressed data * Returns 1 on success or -1 on error */ int libfwnt_lzx_decompress( const uint8_t *compressed_data, size_t compressed_data_size, uint8_t *uncompressed_data, size_t *uncompressed_data_size, libcerror_error_t **error ) { uint8_t aligned_offsets_code_size_array[ 8 ]; uint8_t lengths_code_size_array[ 249 ]; uint8_t main_code_size_array[ 256 + 240 ]; uint32_t recent_compression_offsets[ 3 ] = { 1, 1, 1 }; libfwnt_bit_stream_t *bit_stream = NULL; libfwnt_huffman_tree_t *aligned_offsets_huffman_tree = NULL; libfwnt_huffman_tree_t *lengths_huffman_tree = NULL; libfwnt_huffman_tree_t *main_huffman_tree = NULL; static char *function = "libfwnt_lzx_decompress"; size_t safe_uncompressed_data_size = 0; size_t uncompressed_data_offset = 0; uint32_t block_size = 0; uint32_t block_type = 0; int initialized_aligned_offsets_code_size_array = 0; int initialized_main_and_length_code_size_arrays = 0; 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 == 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( *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 ); } safe_uncompressed_data_size = *uncompressed_data_size; if( libfwnt_bit_stream_initialize( &bit_stream, compressed_data, compressed_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create bit-stream.", function ); goto on_error; } /* TODO find optimized solution to read bit stream from bytes */ while( bit_stream->byte_stream_offset < bit_stream->byte_stream_size ) { if( uncompressed_data_offset >= safe_uncompressed_data_size ) { break; } if( libfwnt_bit_stream_get_value( bit_stream, 3, &block_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from bit stream.", function ); goto on_error; } if( libfwnt_bit_stream_get_value( bit_stream, 1, &block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from bit stream.", function ); goto on_error; } if( block_size != 0 ) { block_size = 32768; } else { if( libfwnt_bit_stream_get_value( bit_stream, 16, &block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value from bit stream.", function ); goto on_error; } /* TODO add extended block size support ? */ } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: block header block type\t\t\t\t: %" PRIu32 " (", function, block_type ); switch( block_type ) { case LIBFWNT_LZX_BLOCK_TYPE_ALIGNED: libcnotify_printf( "Aligned" ); break; case LIBFWNT_LZX_BLOCK_TYPE_VERBATIM: libcnotify_printf( "Verbatim" ); break; case LIBFWNT_LZX_BLOCK_TYPE_UNCOMPRESSED: libcnotify_printf( "Uncompressed" ); break; default: libcnotify_printf( "Invalid" ); break; } libcnotify_printf( ")\n" ); libcnotify_printf( "%s: block header block size\t\t\t\t: %" PRIu32 "\n", function, block_size ); libcnotify_printf( "\n" ); } switch( block_type ) { case LIBFWNT_LZX_BLOCK_TYPE_ALIGNED: if( initialized_aligned_offsets_code_size_array == 0 ) { if( memory_set( aligned_offsets_code_size_array, 0, sizeof( uint8_t ) * 8 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear aligned offsets code size array.", function ); goto on_error; } initialized_aligned_offsets_code_size_array = 1; } if( libfwnt_huffman_tree_initialize( &aligned_offsets_huffman_tree, 256, 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create aligned offsets Huffman tree.", function ); goto on_error; } if( libfwnt_lzx_build_aligned_offsets_huffman_tree( bit_stream, aligned_offsets_code_size_array, aligned_offsets_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build aligned offsets Huffman tree.", function ); goto on_error; } LIBFWNT_LZX_ATTRIBUTE_FALLTHROUGH; case LIBFWNT_LZX_BLOCK_TYPE_VERBATIM: if( initialized_main_and_length_code_size_arrays == 0 ) { if( memory_set( main_code_size_array, 0, sizeof( uint8_t ) * ( 256 + 240 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear main code size array.", function ); goto on_error; } if( memory_set( lengths_code_size_array, 0, sizeof( uint8_t ) * 249 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear lengths code size array.", function ); goto on_error; } initialized_main_and_length_code_size_arrays = 1; } if( libfwnt_huffman_tree_initialize( &main_huffman_tree, 256 + 240, 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create literals and match headers Huffman tree.", function ); goto on_error; } if( libfwnt_lzx_build_main_huffman_tree( bit_stream, main_code_size_array, main_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build literals and match headers Huffman tree.", function ); goto on_error; } if( libfwnt_huffman_tree_initialize( &lengths_huffman_tree, 249, 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create lengths Huffman tree.", function ); goto on_error; } if( libfwnt_lzx_build_lengths_huffman_tree( bit_stream, lengths_code_size_array, lengths_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to build lengths Huffman tree.", function ); goto on_error; } if( libfwnt_lzx_decode_huffman( bit_stream, block_size, main_huffman_tree, lengths_huffman_tree, aligned_offsets_huffman_tree, recent_compression_offsets, uncompressed_data, safe_uncompressed_data_size, &uncompressed_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to decode fixed Huffman encoded bit stream.", function ); goto on_error; } if( aligned_offsets_huffman_tree != NULL ) { if( libfwnt_huffman_tree_free( &aligned_offsets_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free aligned offsets Huffman tree.", function ); goto on_error; } } if( libfwnt_huffman_tree_free( &lengths_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free lengths Huffman tree.", function ); goto on_error; } if( libfwnt_huffman_tree_free( &main_huffman_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free literals and match headers Huffman tree.", function ); goto on_error; } break; case LIBFWNT_LZX_BLOCK_TYPE_UNCOMPRESSED: /* TODO align byte stream */ if( ( bit_stream->byte_stream_size - bit_stream->byte_stream_offset ) < 12 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid compressed data value too small.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( &( compressed_data[ bit_stream->byte_stream_offset ] ), recent_compression_offsets[ 0 ] ); bit_stream->byte_stream_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ bit_stream->byte_stream_offset ] ), recent_compression_offsets[ 1 ] ); bit_stream->byte_stream_offset += 4; byte_stream_copy_to_uint32_little_endian( &( compressed_data[ bit_stream->byte_stream_offset ] ), recent_compression_offsets[ 2 ] ); bit_stream->byte_stream_offset += 4; if( recent_compression_offsets[ 0 ] == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported R0 value.", function ); goto on_error; } if( recent_compression_offsets[ 1 ] == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported R1 value.", function ); goto on_error; } if( recent_compression_offsets[ 2 ] == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported R2 value.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: R0 value\t\t\t\t\t: 0x%08" PRIx32 "\n", function, recent_compression_offsets[ 0 ] ); libcnotify_printf( "%s: R1 value\t\t\t\t\t: 0x%08" PRIx32 "\n", function, recent_compression_offsets[ 1 ] ); libcnotify_printf( "%s: R2 value\t\t\t\t\t: 0x%08" PRIx32 "\n", function, recent_compression_offsets[ 2 ] ); libcnotify_printf( "\n" ); } if( (size_t) block_size > ( bit_stream->byte_stream_size - bit_stream->byte_stream_offset ) ) { block_size = (uint32_t) ( bit_stream->byte_stream_size - bit_stream->byte_stream_offset ); } if( (size_t) block_size > ( safe_uncompressed_data_size - uncompressed_data_offset ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid uncompressed data value too small.", function ); goto on_error; } if( memory_copy( &( uncompressed_data[ uncompressed_data_offset ] ), &( compressed_data[ bit_stream->byte_stream_offset ] ), (size_t) block_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to initialize lz buffer.", function ); goto on_error; } bit_stream->byte_stream_offset += block_size; uncompressed_data_offset += block_size; /* Flush the bit-stream buffer */ bit_stream->bit_buffer = 0; bit_stream->bit_buffer_size = 0; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported block type.", function ); goto on_error; } } if( libfwnt_bit_stream_free( &bit_stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free bit-stream.", function ); goto on_error; } if( libfwnt_lzx_decompress_adjust_call_instructions( uncompressed_data, uncompressed_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to adjust call instructions.", function ); goto on_error; } *uncompressed_data_size = uncompressed_data_offset; return( 1 ); on_error: if( lengths_huffman_tree != NULL ) { libfwnt_huffman_tree_free( &lengths_huffman_tree, NULL ); } if( main_huffman_tree != NULL ) { libfwnt_huffman_tree_free( &main_huffman_tree, NULL ); } if( aligned_offsets_huffman_tree != NULL ) { libfwnt_huffman_tree_free( &aligned_offsets_huffman_tree, NULL ); } if( bit_stream != NULL ) { libfwnt_bit_stream_free( &bit_stream, NULL ); } return( -1 ); } libesedb-20240420/libfwnt/Makefile.in0000644000175000017500000010466314610746266020120 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_access_control_entry.c \ libfwnt_access_control_entry.h libfwnt_access_control_list.c \ libfwnt_access_control_list.h libfwnt_bit_stream.c \ libfwnt_bit_stream.h libfwnt_debug.c libfwnt_debug.h \ libfwnt_definitions.h libfwnt_extern.h libfwnt_error.c \ libfwnt_error.h libfwnt_huffman_tree.c libfwnt_huffman_tree.h \ libfwnt_libcerror.h libfwnt_libcdata.h libfwnt_libcnotify.h \ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ libfwnt_lznt1.c libfwnt_lznt1.h libfwnt_lzx.c libfwnt_lzx.h \ libfwnt_lzxpress.c libfwnt_lzxpress.h libfwnt_notify.c \ libfwnt_notify.h libfwnt_security_descriptor.c \ libfwnt_security_descriptor.h libfwnt_security_identifier.c \ libfwnt_security_identifier.h libfwnt_support.c \ libfwnt_support.h libfwnt_types.h libfwnt_unused.h @HAVE_LOCAL_LIBFWNT_TRUE@am_libfwnt_la_OBJECTS = \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_entry.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_list.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_bit_stream.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_debug.lo libfwnt_error.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_huffman_tree.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_locale_identifier.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lznt1.lo libfwnt_lzx.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lzxpress.lo libfwnt_notify.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_security_descriptor.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_security_identifier.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_support.lo libfwnt_la_OBJECTS = $(am_libfwnt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFWNT_TRUE@am_libfwnt_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfwnt_access_control_entry.Plo \ ./$(DEPDIR)/libfwnt_access_control_list.Plo \ ./$(DEPDIR)/libfwnt_bit_stream.Plo \ ./$(DEPDIR)/libfwnt_debug.Plo ./$(DEPDIR)/libfwnt_error.Plo \ ./$(DEPDIR)/libfwnt_huffman_tree.Plo \ ./$(DEPDIR)/libfwnt_locale_identifier.Plo \ ./$(DEPDIR)/libfwnt_lznt1.Plo ./$(DEPDIR)/libfwnt_lzx.Plo \ ./$(DEPDIR)/libfwnt_lzxpress.Plo \ ./$(DEPDIR)/libfwnt_notify.Plo \ ./$(DEPDIR)/libfwnt_security_descriptor.Plo \ ./$(DEPDIR)/libfwnt_security_identifier.Plo \ ./$(DEPDIR)/libfwnt_support.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfwnt_la_SOURCES) DIST_SOURCES = $(am__libfwnt_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFWNT_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCDATA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBFWNT_TRUE@noinst_LTLIBRARIES = libfwnt.la @HAVE_LOCAL_LIBFWNT_TRUE@libfwnt_la_SOURCES = \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_entry.c libfwnt_access_control_entry.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_list.c libfwnt_access_control_list.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_bit_stream.c libfwnt_bit_stream.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_debug.c libfwnt_debug.h \ @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_huffman_tree.c libfwnt_huffman_tree.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcerror.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcdata.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcnotify.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lznt1.c libfwnt_lznt1.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lzx.c libfwnt_lzx.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lzxpress.c libfwnt_lzxpress.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_notify.c libfwnt_notify.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_security_descriptor.c libfwnt_security_descriptor.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 \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_unused.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfwnt.la: $(libfwnt_la_OBJECTS) $(libfwnt_la_DEPENDENCIES) $(EXTRA_libfwnt_la_DEPENDENCIES) $(AM_V_CCLD)$(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_access_control_entry.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_access_control_list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_bit_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_huffman_tree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_locale_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_lznt1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_lzx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_lzxpress.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_notify.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_security_descriptor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_security_identifier.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_support.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfwnt_access_control_entry.Plo -rm -f ./$(DEPDIR)/libfwnt_access_control_list.Plo -rm -f ./$(DEPDIR)/libfwnt_bit_stream.Plo -rm -f ./$(DEPDIR)/libfwnt_debug.Plo -rm -f ./$(DEPDIR)/libfwnt_error.Plo -rm -f ./$(DEPDIR)/libfwnt_huffman_tree.Plo -rm -f ./$(DEPDIR)/libfwnt_locale_identifier.Plo -rm -f ./$(DEPDIR)/libfwnt_lznt1.Plo -rm -f ./$(DEPDIR)/libfwnt_lzx.Plo -rm -f ./$(DEPDIR)/libfwnt_lzxpress.Plo -rm -f ./$(DEPDIR)/libfwnt_notify.Plo -rm -f ./$(DEPDIR)/libfwnt_security_descriptor.Plo -rm -f ./$(DEPDIR)/libfwnt_security_identifier.Plo -rm -f ./$(DEPDIR)/libfwnt_support.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfwnt_access_control_entry.Plo -rm -f ./$(DEPDIR)/libfwnt_access_control_list.Plo -rm -f ./$(DEPDIR)/libfwnt_bit_stream.Plo -rm -f ./$(DEPDIR)/libfwnt_debug.Plo -rm -f ./$(DEPDIR)/libfwnt_error.Plo -rm -f ./$(DEPDIR)/libfwnt_huffman_tree.Plo -rm -f ./$(DEPDIR)/libfwnt_locale_identifier.Plo -rm -f ./$(DEPDIR)/libfwnt_lznt1.Plo -rm -f ./$(DEPDIR)/libfwnt_lzx.Plo -rm -f ./$(DEPDIR)/libfwnt_lzxpress.Plo -rm -f ./$(DEPDIR)/libfwnt_notify.Plo -rm -f ./$(DEPDIR)/libfwnt_security_descriptor.Plo -rm -f ./$(DEPDIR)/libfwnt_security_identifier.Plo -rm -f ./$(DEPDIR)/libfwnt_support.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfwnt/libfwnt_bit_stream.h0000644000175000017500000000376714610746245022102 0ustar00lordyestalordyesta/* * Bit-stream functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_BIT_STREAM_H ) #define _LIBFWNT_BIT_STREAM_H #include #include #include "libfwnt_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfwnt_bit_stream libfwnt_bit_stream_t; struct libfwnt_bit_stream { /* The byte stream */ const uint8_t *byte_stream; /* The byte stream size */ size_t byte_stream_size; /* The byte stream offset */ size_t byte_stream_offset; /* The bit buffer */ uint32_t bit_buffer; /* The number of bits in the bit buffer */ uint8_t bit_buffer_size; }; int libfwnt_bit_stream_initialize( libfwnt_bit_stream_t **bit_stream, const uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); int libfwnt_bit_stream_free( libfwnt_bit_stream_t **bit_stream, libcerror_error_t **error ); int libfwnt_bit_stream_read( libfwnt_bit_stream_t *bit_stream, uint8_t number_of_bits, libcerror_error_t **error ); int libfwnt_bit_stream_get_value( libfwnt_bit_stream_t *bit_stream, uint8_t number_of_bits, uint32_t *value_32bit, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_BIT_STREAM_H ) */ libesedb-20240420/libfwnt/libfwnt_types.h0000644000175000017500000000356414610746245021110 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfwnt_access_control_entry {} libfwnt_access_control_entry_t; typedef struct libfwnt_access_control_list {} libfwnt_access_control_list_t; typedef struct libfwnt_security_descriptor {} libfwnt_security_descriptor_t; typedef struct libfwnt_security_identifier {} libfwnt_security_identifier_t; #else typedef intptr_t libfwnt_access_control_entry_t; typedef intptr_t libfwnt_access_control_list_t; typedef intptr_t libfwnt_security_descriptor_t; typedef intptr_t libfwnt_security_identifier_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFWNT_INTERNAL_TYPES_H ) */ libesedb-20240420/libfwnt/libfwnt_support.c0000644000175000017500000000215114610746245021442 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfwnt/libfwnt_access_control_entry.h0000644000175000017500000000621114610746245024156 0ustar00lordyestalordyesta/* * Windows NT Access Contol Entry (ACE) functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_ACCESS_CONTROL_ENTRY_H ) #define _LIBFWNT_INTERNAL_ACCESS_CONTROL_ENTRY_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" #if defined( __cplusplus ) extern "C" { #endif /* The Windows NT Access Control Entry is formatted as following: * header: type, flags, size * data */ typedef struct libfwnt_internal_access_control_entry libfwnt_internal_access_control_entry_t; struct libfwnt_internal_access_control_entry { /* The size */ uint16_t size; /* The type */ uint8_t type; /* The flags */ uint8_t flags; /* The access mask */ uint32_t access_mask; /* The security identifier */ libfwnt_security_identifier_t *security_identifier; }; int libfwnt_access_control_entry_initialize( libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_entry_free( libfwnt_access_control_entry_t **access_control_entry, libcerror_error_t **error ); int libfwnt_internal_access_control_entry_free( libfwnt_internal_access_control_entry_t **internal_access_control_entry, libcerror_error_t **error ); int libfwnt_access_control_entry_copy_from_byte_stream( libfwnt_access_control_entry_t *access_control_entry, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_entry_get_type( libfwnt_access_control_entry_t *access_control_entry, uint8_t *type, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_entry_get_flags( libfwnt_access_control_entry_t *access_control_entry, uint8_t *flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_entry_get_access_mask( libfwnt_access_control_entry_t *access_control_entry, uint32_t *access_mask, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_access_control_entry_get_security_identifier( libfwnt_access_control_entry_t *access_control_entry, libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFWNT_INTERNAL_ACCESS_CONTROL_ENTRY_H ) */ libesedb-20240420/libcsplit/0000755000175000017500000000000014610746413016353 5ustar00lordyestalordyestalibesedb-20240420/libcsplit/libcsplit_narrow_string.c0000644000175000017500000001375514610746232023474 0ustar00lordyestalordyesta/* * Narrow character string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 * Make sure the value split_string is referencing, is set to NULL * 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; char *string_start = 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 initialize split string.", function ); goto on_error; } /* Do not bother with strings that do not need splitting */ 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, &string_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( string_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing string 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_start = string_start; string_end = &( string_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 == string_start ) { segment_start++; } else { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libcsplit_narrow_split_string_free( split_string, NULL ); } return( -1 ); } libesedb-20240420/libcsplit/libcsplit_definitions.h0000644000175000017500000000252014610746232023102 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libcsplit version string */ #define LIBCSPLIT_VERSION_STRING "20240414" #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif libesedb-20240420/libcsplit/libcsplit_types.h0000644000175000017500000000321714610746232021737 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_TYPES_H ) #define _LIBCSPLIT_INTERNAL_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 /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif /* !defined( _LIBCSPLIT_INTERNAL_TYPES_H ) */ libesedb-20240420/libcsplit/libcsplit_wide_split_string.c0000644000175000017500000003317014610746232024320 0ustar00lordyestalordyesta/* * Split wide string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libcsplit_libcerror.h" #include "libcsplit_wide_split_string.h" #include "libcsplit_types.h" #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Creates a split string * Make sure the value split_string is referencing, is set to NULL * 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 = 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 a split string * 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 ) */ libesedb-20240420/libcsplit/libcsplit_support.h0000644000175000017500000000232614610746232022307 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCSPLIT_SUPPORT_H ) #define _LIBCSPLIT_SUPPORT_H #include #include #include "libcsplit_extern.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 /* !defined( _LIBCSPLIT_SUPPORT_H ) */ libesedb-20240420/libcsplit/Makefile.am0000644000175000017500000000156014610746232020410 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCSPLIT AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ noinst_LTLIBRARIES = libcsplit.la libcsplit_la_SOURCES = \ libcsplit_definitions.h \ libcsplit_error.c libcsplit_error.h \ libcsplit_extern.h \ libcsplit_narrow_split_string.c libcsplit_narrow_split_string.h \ libcsplit_narrow_string.c libcsplit_narrow_string.h \ libcsplit_libcerror.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 DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) libesedb-20240420/libcsplit/libcsplit_libcerror.h0000644000175000017500000000264114610746232022556 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCSPLIT_LIBCERROR_H ) */ libesedb-20240420/libcsplit/libcsplit_wide_string.c0000644000175000017500000001407614610746232023111 0ustar00lordyestalordyesta/* * Wide character string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 * Make sure the value split_string is referencing, is set to NULL * 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; wchar_t *string_start = 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 initialize split string.", function ); goto on_error; } /* Do not bother with strings that do not need splitting */ 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, &string_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( string_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing string 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_start = string_start; string_end = &( string_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 == string_start ) { segment_start++; } else { 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 ) */ libesedb-20240420/libcsplit/libcsplit_unused.h0000644000175000017500000000261014610746232022072 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCSPLIT_UNUSED_H ) #define _LIBCSPLIT_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 /* !defined( _LIBCSPLIT_UNUSED_H ) */ libesedb-20240420/libcsplit/libcsplit_wide_split_string.h0000644000175000017500000000555014610746232024326 0ustar00lordyestalordyesta/* * Split wide string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBCSPLIT_EXTERN \ int libcsplit_wide_split_string_free( libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ 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_EXTERN \ 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_EXTERN \ 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_EXTERN \ 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 /* !defined( _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H ) */ libesedb-20240420/libcsplit/libcsplit_error.c0000644000175000017500000000555414610746232021725 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libcsplit_error_sprint( libcsplit_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libcsplit_error_backtrace_sprint( libcsplit_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ libesedb-20240420/libcsplit/libcsplit_narrow_split_string.c0000644000175000017500000003313014610746232024674 0ustar00lordyestalordyesta/* * Split narrow string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libcsplit_libcerror.h" #include "libcsplit_narrow_split_string.h" #include "libcsplit_types.h" /* Creates a split string * Make sure the value split_string is referencing, is set to NULL * 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 = 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 a split string * 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 ); } libesedb-20240420/libcsplit/libcsplit_extern.h0000644000175000017500000000257214610746232022103 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCSPLIT_EXTERN_VARIABLE extern #else #define LIBCSPLIT_EXTERN_VARIABLE LIBCSPLIT_EXTERN #endif #else #define LIBCSPLIT_EXTERN /* extern */ #define LIBCSPLIT_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif /* !defined( _LIBCSPLIT_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcsplit/libcsplit_error.h0000644000175000017500000000343214610746232021723 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCSPLIT_INTERNAL_ERROR_H ) */ libesedb-20240420/libcsplit/libcsplit_support.c0000644000175000017500000000220614610746232022277 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libcsplit_definitions.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 ) */ libesedb-20240420/libcsplit/libcsplit_wide_string.h0000644000175000017500000000267714610746232023122 0ustar00lordyestalordyesta/* * Wide character string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCSPLIT_WIDE_STRING_H ) */ libesedb-20240420/libcsplit/Makefile.in0000644000175000017500000007650514610746265020442 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_error.c libcsplit_error.h libcsplit_extern.h \ libcsplit_narrow_split_string.c \ libcsplit_narrow_split_string.h libcsplit_narrow_string.c \ libcsplit_narrow_string.h libcsplit_libcerror.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) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCSPLIT_TRUE@am_libcsplit_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcsplit_error.Plo \ ./$(DEPDIR)/libcsplit_narrow_split_string.Plo \ ./$(DEPDIR)/libcsplit_narrow_string.Plo \ ./$(DEPDIR)/libcsplit_support.Plo \ ./$(DEPDIR)/libcsplit_wide_split_string.Plo \ ./$(DEPDIR)/libcsplit_wide_string.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcsplit_la_SOURCES) DIST_SOURCES = $(am__libcsplit_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ @LIBCERROR_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_error.c libcsplit_error.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_extern.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_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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcsplit.la: $(libcsplit_la_OBJECTS) $(libcsplit_la_DEPENDENCIES) $(EXTRA_libcsplit_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_split_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_split_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_string.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcsplit_error.Plo -rm -f ./$(DEPDIR)/libcsplit_narrow_split_string.Plo -rm -f ./$(DEPDIR)/libcsplit_narrow_string.Plo -rm -f ./$(DEPDIR)/libcsplit_support.Plo -rm -f ./$(DEPDIR)/libcsplit_wide_split_string.Plo -rm -f ./$(DEPDIR)/libcsplit_wide_string.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcsplit_error.Plo -rm -f ./$(DEPDIR)/libcsplit_narrow_split_string.Plo -rm -f ./$(DEPDIR)/libcsplit_narrow_string.Plo -rm -f ./$(DEPDIR)/libcsplit_support.Plo -rm -f ./$(DEPDIR)/libcsplit_wide_split_string.Plo -rm -f ./$(DEPDIR)/libcsplit_wide_string.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libcsplit/libcsplit_narrow_split_string.h0000644000175000017500000000544114610746232024705 0ustar00lordyestalordyesta/* * Split narrow string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H ) */ libesedb-20240420/libcsplit/libcsplit_narrow_string.h0000644000175000017500000000255214610746232023472 0ustar00lordyestalordyesta/* * Narrow character string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCSPLIT_NARROW_STRING_H ) */ libesedb-20240420/po/0000755000175000017500000000000014610746415015006 5ustar00lordyestalordyestalibesedb-20240420/po/remove-potcdate.sin0000644000175000017500000000132014533041722020604 0ustar00lordyestalordyesta# Sed script that removes the POT-Creation-Date line in the header entry # from a POT file. # # Copyright (C) 2002 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 any warranty. # # 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 } libesedb-20240420/po/POTFILES.in0000644000175000017500000000007314533041722016554 0ustar00lordyestalordyesta# List of source files which contain translatable strings. libesedb-20240420/po/Makefile.in.in0000644000175000017500000004616314533041722017463 0ustar00lordyestalordyesta# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-2000 Ulrich Drepper # Copyright (C) 2000-2020 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 any warranty. # # Origin: gettext-0.21 GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ 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@ # When building gettext-tools, we prefer to use the built programs # rather than installed programs. However, we can't do that when we # are cross compiling. CROSS_COMPILING = @CROSS_COMPILING@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot POFILESDEPS_yes = $(POFILESDEPS_) POFILESDEPS_no = POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) DISTFILESDEPS_ = update-po DISTFILESDEPS_yes = $(DISTFILESDEPS_) DISTFILESDEPS_no = DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) # Makevars gets inserted here. (Don't remove this line!) all: all-@USE_NLS@ .SUFFIXES: .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. # The GNU Coding Standards say in # : # "GNU distributions usually contain some files which are not source files # ... . Since these files normally appear in the source directory, they # should always appear in the source directory, not in the build directory. # So Makefile rules to update them should put the updated files in the # source directory." # Therefore we put these files in the source directory, not the build directory. # During .po -> .gmo conversion, take into account the most recent changes to # the .pot file. This eliminates the need to update the .po files when the # .pot file has changed, which would be troublesome if the .po files are put # under version control. $(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ cd $(srcdir) && \ rm -f $${lang}.gmo && \ $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ mv t-$${lang}.gmo $${lang}.gmo && \ rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all-yes: $(srcdir)/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, $(srcdir)/stamp-po is a nop (i.e. a phony target). # $(srcdir)/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 from a version control system, and the $(DOMAIN).pot # file is not under version control, "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. $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch $(srcdir)/stamp-po" && \ echo timestamp > $(srcdir)/stamp-poT && \ mv $(srcdir)/stamp-poT $(srcdir)/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. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ else \ LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ else \ package_gnu=no; \ fi; \ }; \ if test "$$package_gnu" = "yes"; then \ package_prefix='GNU '; \ else \ package_prefix=''; \ 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: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ rm -f $(DOMAIN).1po \ || exit 1; \ fi; \ 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): $(POFILESDEPS) @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(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) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ 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 @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: @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: install-dvi install-ps install-pdf install-html: mostlyclean: rm -f remove-potcdate.sed rm -f $(srcdir)/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 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 $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(srcdir)/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"; \ else \ case $(XGETTEXT) in \ :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ esac; \ 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" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; 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) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. 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: libesedb-20240420/po/quot.sed0000644000175000017500000000023114533041722016460 0ustar00lordyestalordyestas/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g libesedb-20240420/po/en@quot.header0000644000175000017500000000226414533041722017570 0ustar00lordyestalordyesta# 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 # https://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. # libesedb-20240420/po/en@boldquot.header0000644000175000017500000000247214533041722020432 0ustar00lordyestalordyesta# 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 # https://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. # libesedb-20240420/po/boldquot.sed0000644000175000017500000000033114533041722017322 0ustar00lordyestalordyestas/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g libesedb-20240420/po/insert-header.sin0000644000175000017500000000161214533041722020244 0ustar00lordyestalordyesta# Sed script that inserts the file called HEADER before the header entry. # # Copyright (C) 2001 Free Software Foundation, Inc. # Written by Bruno Haible , 2001. # This file is free software; the Free Software Foundation gives # unlimited permission to use, copy, distribute, and modify it. # # 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 } libesedb-20240420/po/ChangeLog0000644000175000017500000000006214533041722016547 0ustar00lordyestalordyesta2016-11-04 gettextize libesedb-20240420/po/Makevars0000644000175000017500000000347614610746302016507 0ustar00lordyestalordyesta# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = libesedb # 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 = # Additional make targets. sources splint: libesedb-20240420/po/Makevars.in0000644000175000017500000000347414533041722017110 0ustar00lordyestalordyesta# 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 = # Additional make targets. sources splint: libesedb-20240420/po/Rules-quot0000644000175000017500000000453314533041722017007 0ustar00lordyestalordyesta# Special Makefile rules for English message catalogs with quotation marks. # # Copyright (C) 2001-2017 Free Software Foundation, Inc. # This file, Rules-quot, and its auxiliary files (listed under # DISTFILES.common.extra1) are free software; the Free Software Foundation # gives unlimited permission to use, copy, distribute, and modify them. 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-tools" && test "$(CROSS_COMPILING)" != "yes"; 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) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ ;; \ *) \ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ ;; \ esac } 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 libesedb-20240420/libuna/0000755000175000017500000000000014610746413015640 5ustar00lordyestalordyestalibesedb-20240420/libuna/libuna_codepage_windows_1251.c0000644000175000017500000002115314610746251023331 0ustar00lordyestalordyesta/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1251.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1251 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1251_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_1251_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1251 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1251_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_1251_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = 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_value = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0490: byte_stream_value = 0xa5; break; case 0x0491: byte_stream_value = 0xb4; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x88; break; case 0x2116: byte_stream_value = 0xb9; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_utf16_string.c0000644000175000017500000030000414610746251021666 0ustar00lordyestalordyesta/* * UTF-16 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_scsu.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; if( byte_stream_size == 0 ) { return( 1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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; 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 ); } if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } if( ( utf16_string_size >= 1 ) && ( utf16_string[ utf16_string_size - 1 ] == 0 ) ) { utf16_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( ( byte_stream_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > byte_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( byte_stream_index < byte_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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( 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; if( utf7_stream_size == 0 ) { return( 1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } if( ( utf16_string_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > utf7_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf7_stream_index < utf7_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf8_string_size == 0 ) { return( 1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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 ); } if( utf8_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 string value.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } /* 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( 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; if( utf8_stream_size == 0 ) { 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > utf8_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf8_stream_index < utf8_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; int result = 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", 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; if( utf16_stream_size == 0 ) { return( 1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ); } else { result = libuna_unicode_character_size_to_ucs2( unicode_character, utf16_string_size, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; 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 > (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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ); } else { result = libuna_unicode_character_copy_to_ucs2( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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"; libuna_unicode_character_t utf16_stream_unicode_character = 0; libuna_unicode_character_t utf16_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; int read_byte_order = 0; 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 > (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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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( ( utf16_string_size >= 1 ) && ( 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_size >= 2 ) && ( 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 an Unicode character */ if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ); } else { result = libuna_unicode_character_copy_from_ucs2( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ); } if( result != 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > utf16_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf16_stream_index < utf16_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf32_string_size == 0 ) { return( 1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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 ); } if( utf32_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-32 string value.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( utf32_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-32 string value.", function ); return( -1 ); } if( ( utf16_string_size >= 1 ) && ( utf16_string[ utf16_string_size - 1 ] == 0 ) ) { utf16_string_size -= 1; } if( ( utf32_string_size >= 1 ) && ( utf32_string[ utf32_string_size - 1 ] == 0 ) ) { utf32_string_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf32_string_index < utf32_string_size ) ) { /* Convert the UTF-16 character bytes into an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > utf32_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", 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; if( utf32_stream_size == 0 ) { return( 1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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; } } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 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; 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >=4 ) { 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; } } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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( ( utf16_string_size >= 1 ) && ( 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_size >= 4 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf16_unicode_character > utf32_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf32_stream_index < utf32_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* Determines the size of an UTF-16 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf16_string_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf8_string_size_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 0; if( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU 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; if( scsu_stream_size == 0 ) { return( 1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf16_string_size += 1; } return( 1 ); } /* Copies an UTF-16 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_scsu_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_scsu_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_scsu_stream( utf16_string, utf16_string_size, &utf16_string_index, scsu_stream, scsu_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to SCSU stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_scsu_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf16_string_with_index_copy_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 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( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU stream size value exceeds maximum.", function ); return( -1 ); } if( scsu_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing SCSU stream value.", function ); return( -1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } libesedb-20240420/libuna/libuna_base16_stream.c0000644000175000017500000011504514610746251022000 0ustar00lordyestalordyesta/* * Base16 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libuna_base16_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Copies a base16 character from a base16 stream * Returns 1 if successful or -1 on error */ int libuna_base16_character_copy_from_base16_stream( uint32_t *base16_character, const uint8_t *base16_stream, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_character_copy_from_base16_stream"; uint32_t safe_base16_character = 0; if( base16_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 character.", function ); return( -1 ); } if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: safe_base16_character = *base16_stream; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( base16_stream, safe_base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( base16_stream, safe_base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( base16_stream, safe_base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( base16_stream, safe_base16_character ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } if( ( safe_base16_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character.", function ); return( -1 ); } *base16_character = safe_base16_character; return( 1 ); } /* 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 > (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_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( ( 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 ); } /* Ignore trailing whitespace */ if( base16_stream_size > base16_character_size ) { base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character1, &( base16_stream[ base16_stream_index ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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; } base16_stream_index = 0; whitespace_size = 0; while( base16_stream_index < base16_stream_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character1, &( base16_stream[ base16_stream_index ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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 { /* Handle multi-character end-of-line */ if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character2, &( base16_stream[ base16_stream_index + base16_character_size ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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( ( 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 ); } /* Ignore trailing whitespace */ if( base16_stream_size > base16_character_size ) { base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character1, &( base16_stream[ base16_stream_index ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } base16_stream_index = 0; while( base16_stream_index < base16_stream_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character1, &( base16_stream[ base16_stream_index ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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 { /* Handle multi-character end-of-line */ if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { if( libuna_base16_character_copy_from_base16_stream( &base16_character2, &( base16_stream[ base16_stream_index + base16_character_size ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy 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; if( libuna_base16_character_copy_from_base16_stream( &base16_character1, &( base16_stream[ base16_stream_index ] ), base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base16 character at index: %" PRIzd ".", function, base16_stream_index ); 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 safe_base16_stream_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 & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: case LIBUNA_BASE16_VARIANT_CASE_MIXED: case LIBUNA_BASE16_VARIANT_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 ); } /* The base16 stream contains 2 characters for every byte */ safe_base16_stream_size = byte_stream_size * 2; if( character_limit != 0 ) { whitespace_size = safe_base16_stream_size / character_limit; if( ( safe_base16_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } safe_base16_stream_size += whitespace_size; } *base16_stream_size = safe_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 base16_character_size = 0; size_t byte_stream_index = 0; size_t calculated_base16_stream_size = 0; size_t number_of_characters = 0; size_t safe_base16_stream_index = 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 ); } safe_base16_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[ safe_base16_stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; } safe_base16_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[ safe_base16_stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; } safe_base16_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[ safe_base16_stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; } safe_base16_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[ safe_base16_stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ safe_base16_stream_index ] ), base16_character ); break; } safe_base16_stream_index += base16_character_size; } } *base16_stream_index = safe_base16_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_utf8_stream.h0000644000175000017500000000566114610746251021614 0ustar00lordyestalordyesta/* * UTF-8 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UTF8_STREAM_H ) #define _LIBUNA_UTF8_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_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 /* !defined( _LIBUNA_UTF8_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_2.h0000644000175000017500000000303714610746251022705 0ustar00lordyestalordyesta/* * ISO 8859-2 codepage (Central European) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) #define _LIBUNA_CODEPAGE_ISO_8859_2_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ 128 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ 72 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_932.c0000644000175000017500000105703714610746251023271 0ustar00lordyestalordyesta/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_932.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup tables for the 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 tables for the 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 Windows 932 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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 an Unicode character from a byte stream * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character < 0xe0 ) ) { safe_unicode_character = 0xff61 + byte_stream_character - 0xa1; } else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { safe_byte_stream_index += 1; additional_character = byte_stream[ safe_byte_stream_index ]; if( byte_stream_character == 0x81 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xad ) ) { additional_character -= 0x40; safe_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; safe_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; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ additional_character ]; } else if( ( additional_character >= 0xda ) && ( additional_character < 0xe9 ) ) { additional_character -= 0xda; safe_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; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ additional_character ]; } else if( additional_character == 0xfc ) { safe_unicode_character = 0x25ef; } } else if( byte_stream_character == 0x82 ) { if( ( additional_character >= 0x4f ) && ( additional_character < 0x59 ) ) { safe_unicode_character = 0xff10 - 0x4f + additional_character; } else if( ( additional_character >= 0x60 ) && ( additional_character < 0x7a ) ) { safe_unicode_character = 0xff21 - 0x60 + additional_character; } else if( ( additional_character >= 0x81 ) && ( additional_character < 0x9b ) ) { safe_unicode_character = 0xff41 - 0x81 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xf2 ) ) { safe_unicode_character = 0x3041 - 0x9f + additional_character; } } else if( byte_stream_character == 0x83 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { safe_unicode_character = 0x30a1 - 0x40 + additional_character; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x97 ) ) { safe_unicode_character = 0x30e0 - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xb0 ) ) { safe_unicode_character = 0x0391 - 0x9f + additional_character; } else if( ( additional_character >= 0xb0 ) && ( additional_character < 0xb7 ) ) { safe_unicode_character = 0x03a3 - 0xb0 + additional_character; } else if( ( additional_character >= 0xbf ) && ( additional_character < 0xd0 ) ) { safe_unicode_character = 0x03b1 - 0xbf + additional_character; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xd7 ) ) { safe_unicode_character = 0x03c3 - 0xd0 + additional_character; } } else if( byte_stream_character == 0x84 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x61 ) ) { additional_character -= 0x40; safe_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; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ additional_character ]; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x92 ) ) { safe_unicode_character = 0x043e - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xbf ) ) { additional_character -= 0x9f; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ additional_character ]; } } else if( byte_stream_character == 0x87 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x54 ) ) { safe_unicode_character = 0x2460 - 0x40 + additional_character; } else if( ( additional_character >= 0x54 ) && ( additional_character < 0x5e ) ) { safe_unicode_character = 0x2160 - 0x54 + additional_character; } else if( ( additional_character >= 0x5f ) && ( additional_character < 0x76 ) ) { additional_character -= 0x5f; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ additional_character ]; } else if( additional_character == 0x7e ) { safe_unicode_character = 0x337b; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x9d ) ) { additional_character -= 0x80; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ additional_character ]; } } else if( byte_stream_character == 0x88 ) { if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ additional_character ]; } } 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: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; } } } else if( byte_stream_character == 0x98 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x73 ) ) { additional_character -= 0x40; safe_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; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ additional_character ]; } } 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: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; } } } 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: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; } } } else if( byte_stream_character == 0xea ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa5 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ additional_character ]; } } 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: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; } } } 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: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ additional_character ]; break; case 0xfb: safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ additional_character ]; break; } } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x4c ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } } } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } /* Copies an Unicode character to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ]; } do { byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; } while( byte_stream_value != 0 ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_dingbats.h0000644000175000017500000000312014610746251023601 0ustar00lordyestalordyesta/* * MacDingbats codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_DINGBATS_H ) #define _LIBUNA_CODEPAGE_MAC_DINGBATS_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_dingbats_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 ); int libuna_codepage_mac_dingbats_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 /* !defined( _LIBUNA_CODEPAGE_MAC_DINGBATS_H ) */ libesedb-20240420/libuna/libuna_utf8_string.c0000644000175000017500000030611214610746251021615 0ustar00lordyestalordyesta/* * UTF-8 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_scsu.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; if( byte_stream_size == 0 ) { return( 1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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; 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 ); } if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } if( ( utf8_string_size >= 1 ) && ( utf8_string[ utf8_string_size - 1 ] == 0 ) ) { utf8_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( ( byte_stream_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > byte_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( byte_stream_index < byte_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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( 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; if( utf7_stream_size == 0 ) { return( 1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } if( ( utf8_string_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf7_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf7_stream_index < utf7_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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_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; if( utf8_stream_size == 0 ) { 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf8_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf8_stream_index < utf8_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf16_string_size == 0 ) { return( 1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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 ); } if( utf16_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-16 string value.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( utf16_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-16 string value.", function ); return( -1 ); } if( ( utf8_string_size >= 1 ) && ( utf8_string[ utf8_string_size - 1 ] == 0 ) ) { utf8_string_size -= 1; } if( ( utf16_string_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf16_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf16_string_index < utf16_string_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; int result = 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", 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; if( utf16_stream_size == 0 ) { return( 1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ); } else { result = libuna_unicode_character_size_to_utf8_rfc2279( unicode_character, utf8_string_size, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; 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 > (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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ); } else { result = libuna_unicode_character_copy_to_utf8_rfc2279( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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"; libuna_unicode_character_t utf16_stream_unicode_character = 0; libuna_unicode_character_t utf8_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; int read_byte_order = 0; 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 > (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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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( ( utf8_string_size >= 1 ) && ( 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_size >= 2 ) && ( 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 an Unicode character */ if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ); } else { result = libuna_unicode_character_copy_from_utf8_rfc2279( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ); } if( result != 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf16_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf16_stream_index < utf16_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf32_string_size == 0 ) { return( 1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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 ); } if( utf32_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-32 string value.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( utf32_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-32 string value.", function ); return( -1 ); } if( ( utf8_string_size >= 1 ) && ( utf8_string[ utf8_string_size - 1 ] == 0 ) ) { utf8_string_size -= 1; } if( ( utf32_string_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf32_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", 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; if( utf32_stream_size == 0 ) { return( 1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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; } } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 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; 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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; } } while( ( utf32_stream_index + 3 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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( ( utf8_string_size >= 1 ) && ( 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_size >= 4 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf8_unicode_character > utf32_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf8_string_index < utf8_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf32_stream_index < utf32_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* Determines the size of an UTF-8 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf8_string_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf8_string_size_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 0; if( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU 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; if( scsu_stream_size == 0 ) { return( 1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf8_string_size += 1; } return( 1 ); } /* Copies an UTF-8 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_scsu_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_scsu_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_scsu_stream( utf8_string, utf8_string_size, &utf8_string_index, scsu_stream, scsu_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to SCSU stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_scsu_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf8_string_with_index_copy_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 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( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU stream size value exceeds maximum.", function ); return( -1 ); } if( scsu_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing SCSU stream value.", function ); return( -1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } libesedb-20240420/libuna/libuna_base64_stream.c0000644000175000017500000022201714610746251022001 0ustar00lordyestalordyesta/* * Base64 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libuna_base64_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" static uint8_t libuna_base64_sixtet_to_character_table[ 64 ] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; static uint8_t libuna_base64url_sixtet_to_character_table[ 64 ] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_' }; /* Copies a base64 character to a base64 sixtet * Returns 1 if successful, 0 if not a valid base64 character or -1 on error */ int libuna_base64_character_copy_to_sixtet( uint32_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_character_copy_to_sixtet"; uint32_t safe_base64_sixtet = 0; 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 ); } if( ( base64_character & 0xffffff00UL ) != 0 ) { return( 0 ); } /* A-Z is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base64_character >= (uint32_t) 'A' ) && ( base64_character <= (uint32_t) 'I' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 'A'; } else if( ( base64_character >= (uint32_t) 'J' ) && ( base64_character <= (uint32_t) 'R' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 'J' + 9; } else if( ( base64_character >= (uint32_t) 'S' ) && ( base64_character <= (uint32_t) 'Z' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 'S' + 18; } /* a-z is not a continous range on an EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( base64_character >= (uint32_t) 'a' ) && ( base64_character <= (uint32_t) 'i' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 'a' + 26; } else if( ( base64_character >= (uint32_t) 'j' ) && ( base64_character <= (uint32_t) 'r' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 'j' + 35; } else if( ( base64_character >= (uint32_t) 's' ) && ( base64_character <= (uint32_t) 'z' ) ) { safe_base64_sixtet = base64_character - (uint32_t) 's' + 44; } else if( ( base64_character >= (uint32_t) '0' ) && ( base64_character <= (uint32_t) '9' ) ) { safe_base64_sixtet = base64_character - (uint32_t) '0' + 52; } else if( base64_character == base64_character_62 ) { safe_base64_sixtet = 62; } else if( base64_character == base64_character_63 ) { safe_base64_sixtet = 63; } else { return( 0 ); } *base64_sixtet = (uint8_t) ( safe_base64_sixtet & 0xff ); 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 */ 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 safe_base64_stream_index = 0; uint32_t base64_character = 0; uint32_t safe_base64_triplet = 0; uint8_t safe_padding_size = 0; uint8_t sixtet1 = 0; uint8_t sixtet2 = 0; uint8_t sixtet3 = 0; uint8_t sixtet4 = 0; int result = 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( 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: case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: case LIBUNA_BASE64_VARIANT_PADDING_INVALID: 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 ); } safe_base64_stream_index = *base64_stream_index; if( ( base64_character_size > base64_stream_size ) || ( safe_base64_stream_index > ( base64_stream_size - base64_character_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small - missing 1st base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ safe_base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; result = libuna_base64_character_copy_to_sixtet( base64_character, &sixtet1, base64_variant, error ); if( result == -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 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base64 character.", function ); return( -1 ); } if( ( base64_character_size > base64_stream_size ) || ( safe_base64_stream_index > ( base64_stream_size - base64_character_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small - missing 2nd base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ safe_base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; result = libuna_base64_character_copy_to_sixtet( base64_character, &sixtet2, base64_variant, error ); if( result == -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 ); } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd base64 character.", function ); return( -1 ); } safe_padding_size = 2; if( ( base64_character_size > base64_stream_size ) || ( safe_base64_stream_index > ( base64_stream_size - base64_character_size ) ) ) { if( ( base64_variant & 0x0f000000UL ) == LIBUNA_BASE64_VARIANT_PADDING_REQUIRED ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small - missing 3rd base64 character.", function ); return( -1 ); } } else { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ safe_base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_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( base64_character == (uint32_t) '=' ) { if( ( base64_variant & 0x0f000000UL ) == LIBUNA_BASE64_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 3rd base64 character.", function ); return( -1 ); } } else { result = libuna_base64_character_copy_to_sixtet( base64_character, &sixtet3, base64_variant, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 3rd sixtet.", function ); return( -1 ); } else if( result == 0 ) { if( ( base64_variant & 0x0f000000UL ) != LIBUNA_BASE64_VARIANT_PADDING_INVALID ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base64 sixtet.", function ); return( -1 ); } } else { safe_padding_size -= 1; } } } if( ( base64_character_size > base64_stream_size ) || ( safe_base64_stream_index > ( base64_stream_size - base64_character_size ) ) ) { if( ( base64_variant & 0x0f000000UL ) == LIBUNA_BASE64_VARIANT_PADDING_REQUIRED ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small - missing 4th base64 character.", function ); return( -1 ); } } else { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ safe_base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_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( base64_character == (uint32_t) '=' ) { if( ( base64_variant & 0x0f000000UL ) == LIBUNA_BASE64_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 4th base64 character.", function ); return( -1 ); } } else { result = libuna_base64_character_copy_to_sixtet( base64_character, &sixtet4, base64_variant, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 4th sixtet.", function ); return( -1 ); } else if( result == 0 ) { if( ( base64_variant & 0x0f000000UL ) != LIBUNA_BASE64_VARIANT_PADDING_INVALID ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base64 sixtet.", function ); return( -1 ); } } else { if( safe_padding_size > 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: non-padding where not supposed to - invalid 4th base64 character.", function ); return( -1 ); } safe_padding_size -= 1; } } } safe_base64_triplet = sixtet1; safe_base64_triplet <<= 6; safe_base64_triplet |= sixtet2; safe_base64_triplet <<= 6; safe_base64_triplet |= sixtet3; safe_base64_triplet <<= 6; safe_base64_triplet |= sixtet4; *base64_triplet = safe_base64_triplet; *base64_stream_index = safe_base64_stream_index; *padding_size = safe_padding_size; return( 1 ); } /* Copies a base64 triplet to a base64 stream * Returns 1 if successful or -1 on error */ 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 safe_base64_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: case LIBUNA_BASE64_VARIANT_PADDING_INVALID: 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 ); } safe_base64_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( ( safe_base64_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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; /* Spread the encoding over 3 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( safe_base64_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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; } /* Spread the encoding over 4 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( ( safe_base64_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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; } *base64_stream_index = safe_base64_stream_index; return( 1 ); } /* Copies a base64 triplet from a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; uint32_t safe_base64_triplet = 0; uint8_t safe_padding_size = 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( 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } safe_byte_stream_index = *byte_stream_index; /* Determine the value of 3 bytes (24 bits) */ safe_base64_triplet = byte_stream[ safe_byte_stream_index++ ]; safe_padding_size = 2; safe_base64_triplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base64_triplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 1; } safe_base64_triplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base64_triplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 1; } *base64_triplet = safe_base64_triplet; *byte_stream_index = safe_byte_stream_index; *padding_size = safe_padding_size; return( 1 ); } /* Copies a base64 triplet to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_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( 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 ); } safe_byte_stream_index = *byte_stream_index; byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( ( base64_triplet >> 16 ) & 0xff ); if( padding_size <= 1 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( ( base64_triplet >> 8 ) & 0xff ); } if( padding_size == 0 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( base64_triplet & 0xff ); } *byte_stream_index = safe_byte_stream_index; 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 safe_byte_stream_size = 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; } 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( ( number_of_characters != 0 ) && ( 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 an 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 an 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; safe_byte_stream_size = base64_stream_size / base64_character_size; if( ( base64_stream_size % base64_character_size ) != 0 ) { safe_byte_stream_size += 1; } safe_byte_stream_size *= 3; /* The padding size contains the number of bytes to correct */ *byte_stream_size = safe_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; 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 calculated_base64_stream_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 */ 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; } } if( character_limit != 0 ) { if( calculated_base64_stream_size > character_limit ) { 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 += 1; } calculated_base64_stream_size *= base64_character_size; *base64_stream_size = calculated_base64_stream_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 safe_base64_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 ); } safe_base64_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; } } if( character_limit != 0 ) { if( calculated_base64_stream_size > character_limit ) { 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 += 1; } 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, &safe_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 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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_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[ safe_base64_stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ safe_base64_stream_index ] ), base64_character ); break; } safe_base64_stream_index += base64_character_size; } } *base64_stream_index = safe_base64_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_error.h0000644000175000017500000000332514610746251020477 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBUNA_INTERNAL_ERROR_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_turkish.h0000644000175000017500000000311214610746251023500 0ustar00lordyestalordyesta/* * MacTurkish codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_TURKISH_H ) #define _LIBUNA_CODEPAGE_MAC_TURKISH_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_turkish_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 ); int libuna_codepage_mac_turkish_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 /* !defined( _LIBUNA_CODEPAGE_MAC_TURKISH_H ) */ libesedb-20240420/libuna/libuna_unicode_character.c0000644000175000017500000046236614610746251023021 0ustar00lordyestalordyesta/* * Unicode character functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_mac_arabic.h" #include "libuna_codepage_mac_celtic.h" #include "libuna_codepage_mac_centraleurroman.h" #include "libuna_codepage_mac_croatian.h" #include "libuna_codepage_mac_cyrillic.h" #include "libuna_codepage_mac_dingbats.h" #include "libuna_codepage_mac_farsi.h" #include "libuna_codepage_mac_gaelic.h" #include "libuna_codepage_mac_greek.h" #include "libuna_codepage_mac_icelandic.h" #include "libuna_codepage_mac_inuit.h" #include "libuna_codepage_mac_roman.h" #include "libuna_codepage_mac_romanian.h" #include "libuna_codepage_mac_russian.h" #include "libuna_codepage_mac_symbol.h" #include "libuna_codepage_mac_thai.h" #include "libuna_codepage_mac_turkish.h" #include "libuna_codepage_mac_ukrainian.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_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_unused.h" /* Valid directly encoded characters: A-Z, a-z, 0-9, '\', '(', ')', ',', '-', '.', '/', ':', '?' * Valid directly encoded whitespace: '\t', '\n', '\r', ' ' * Valid optional directly encoded characters: '!', '"', '#', '$', '%', '&', '*', ';', '<', '=', '>', '@', '[', ']', '^', '_', '`', '{', '|', '}' */ uint8_t libuna_unicode_character_utf7_valid_directly_encoded_character[ 256 ] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* Valid UTF-7 base64 characters: A-Z, a-z, 0-9, '+' and '/' */ uint8_t libuna_unicode_character_utf7_valid_base64_character[ 256 ] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* 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, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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"; size_t safe_byte_stream_character_size = 0; 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 ); } safe_byte_stream_character_size = *byte_stream_character_size; 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_MAC_ARABIC: case LIBUNA_CODEPAGE_MAC_CELTIC: case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: case LIBUNA_CODEPAGE_MAC_CROATIAN: case LIBUNA_CODEPAGE_MAC_CYRILLIC: case LIBUNA_CODEPAGE_MAC_DINGBATS: case LIBUNA_CODEPAGE_MAC_FARSI: case LIBUNA_CODEPAGE_MAC_GAELIC: case LIBUNA_CODEPAGE_MAC_GREEK: case LIBUNA_CODEPAGE_MAC_ICELANDIC: case LIBUNA_CODEPAGE_MAC_INUIT: case LIBUNA_CODEPAGE_MAC_ROMAN: case LIBUNA_CODEPAGE_MAC_ROMANIAN: case LIBUNA_CODEPAGE_MAC_RUSSIAN: case LIBUNA_CODEPAGE_MAC_TURKISH: case LIBUNA_CODEPAGE_MAC_UKRAINIAN: 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: safe_byte_stream_character_size += 1; break; case LIBUNA_CODEPAGE_MAC_SYMBOL: result = libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream( unicode_character, &safe_byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_MAC_THAI: result = libuna_codepage_mac_thai_unicode_character_size_to_byte_stream( unicode_character, &safe_byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_unicode_character_size_to_byte_stream( unicode_character, &safe_byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_unicode_character_size_to_byte_stream( unicode_character, &safe_byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_unicode_character_size_to_byte_stream( unicode_character, &safe_byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_unicode_character_size_to_byte_stream( unicode_character, &safe_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 ); } *byte_stream_character_size = safe_byte_stream_character_size; return( result ); } /* Copies an Unicode character from a byte stream * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ]; switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { safe_unicode_character = 0xfffd; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: safe_unicode_character = byte_stream_character; safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( byte_stream_character < 0xd0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xd0; safe_unicode_character = libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( byte_stream_character < 0xa1 ) { safe_unicode_character = byte_stream_character; } else if( byte_stream_character < 0xdb ) { safe_unicode_character = byte_stream_character + 0x0d60; } else if( byte_stream_character < 0xdf ) { safe_unicode_character = 0xfffd; } else if( byte_stream_character < 0xfc ) { safe_unicode_character = byte_stream_character + 0x0d60; } else { safe_unicode_character = 0xfffd; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( ( byte_stream_character >= 0xa0 ) && ( byte_stream_character < 0xc0 ) ) { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } else { safe_unicode_character = byte_stream_character; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( byte_stream_character < 0xa0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; safe_unicode_character = libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: result = libuna_codepage_koi8_r_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_KOI8_U: result = libuna_codepage_koi8_u_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ARABIC: result = libuna_codepage_mac_arabic_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CELTIC: result = libuna_codepage_mac_celtic_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: result = libuna_codepage_mac_centraleurroman_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CROATIAN: result = libuna_codepage_mac_croatian_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CYRILLIC: result = libuna_codepage_mac_cyrillic_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_DINGBATS: result = libuna_codepage_mac_dingbats_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_FARSI: result = libuna_codepage_mac_farsi_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_GAELIC: result = libuna_codepage_mac_gaelic_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_GREEK: result = libuna_codepage_mac_greek_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ICELANDIC: result = libuna_codepage_mac_icelandic_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_INUIT: result = libuna_codepage_mac_inuit_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ROMAN: result = libuna_codepage_mac_roman_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ROMANIAN: result = libuna_codepage_mac_romanian_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_RUSSIAN: result = libuna_codepage_mac_russian_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_SYMBOL: result = libuna_codepage_mac_symbol_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_THAI: result = libuna_codepage_mac_thai_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_TURKISH: result = libuna_codepage_mac_turkish_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_UKRAINIAN: result = libuna_codepage_mac_ukrainian_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_874: result = libuna_codepage_windows_874_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: result = libuna_codepage_windows_1250_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1251: result = libuna_codepage_windows_1251_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1252: result = libuna_codepage_windows_1252_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1253: result = libuna_codepage_windows_1253_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1254: result = libuna_codepage_windows_1254_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1255: result = libuna_codepage_windows_1255_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1256: result = libuna_codepage_windows_1256_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1257: result = libuna_codepage_windows_1257_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1258: result = libuna_codepage_windows_1258_copy_from_byte_stream( &safe_unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, 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_COPY_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( result ); } /* Copies an Unicode character to a byte stream * Returns 1 if successful, 0 if the Unicode character is valid but not supported since it requires special handling or -1 on error */ 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"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ safe_byte_stream_index ] = 0x1a; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: if( unicode_character < 0x0100 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ safe_byte_stream_index ] = 0x1a; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; } else if( unicode_character == 0x02c7 ) { byte_stream[ safe_byte_stream_index ] = 0xb7; } else { byte_stream[ safe_byte_stream_index ] = 0x1a; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_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[ safe_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[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ unicode_character ]; } else switch( unicode_character ) { case 0x016c: byte_stream[ safe_byte_stream_index ] = 0xdd; break; case 0x016d: byte_stream[ safe_byte_stream_index ] = 0xfd; break; case 0x017b: byte_stream[ safe_byte_stream_index ] = 0xaf; break; case 0x017c: byte_stream[ safe_byte_stream_index ] = 0xbf; break; case 0x02d8: byte_stream[ safe_byte_stream_index ] = 0xa2; break; case 0x02d9: byte_stream[ safe_byte_stream_index ] = 0xff; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0158 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ safe_byte_stream_index ] = 0xb7; break; case 0x02d9: byte_stream[ safe_byte_stream_index ] = 0xff; break; case 0x02db: byte_stream[ safe_byte_stream_index ] = 0xb2; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream[ safe_byte_stream_index ] = libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ safe_byte_stream_index ] = 0xfd; break; case 0x00ad: byte_stream[ safe_byte_stream_index ] = 0xad; break; case 0x2116: byte_stream[ safe_byte_stream_index ] = 0xf0; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0618 ) && ( unicode_character < 0x658 ) ) { unicode_character -= 0x0618; byte_stream[ safe_byte_stream_index ] = libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ unicode_character ]; } else switch( unicode_character ) { case 0x00a4: byte_stream[ safe_byte_stream_index ] = 0xa4; break; case 0x00ad: byte_stream[ safe_byte_stream_index ] = 0xad; break; case 0x060c: byte_stream[ safe_byte_stream_index ] = 0xac; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00b8 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else switch( unicode_character ) { case 0x00bb: byte_stream[ safe_byte_stream_index ] = 0xbb; break; case 0x00bd: byte_stream[ safe_byte_stream_index ] = 0xbd; break; case 0x037a: byte_stream[ safe_byte_stream_index ] = 0xaa; break; case 0x2015: byte_stream[ safe_byte_stream_index ] = 0xaf; break; case 0x2018: byte_stream[ safe_byte_stream_index ] = 0xa1; break; case 0x2019: byte_stream[ safe_byte_stream_index ] = 0xa2; break; case 0x20ac: byte_stream[ safe_byte_stream_index ] = 0xa4; break; case 0x20af: byte_stream[ safe_byte_stream_index ] = 0xa5; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ safe_byte_stream_index ] = 0xaa; break; case 0x00f7: byte_stream[ safe_byte_stream_index ] = 0xba; break; case 0x200e: byte_stream[ safe_byte_stream_index ] = 0xfd; break; case 0x200f: byte_stream[ safe_byte_stream_index ] = 0xfe; break; case 0x2017: byte_stream[ safe_byte_stream_index ] = 0xdf; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( unicode_character < 0x00d0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream[ safe_byte_stream_index ] = libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream[ safe_byte_stream_index ] = 0xd0; break; case 0x011f: byte_stream[ safe_byte_stream_index ] = 0xf0; break; case 0x0130: byte_stream[ safe_byte_stream_index ] = 0xdd; break; case 0x0131: byte_stream[ safe_byte_stream_index ] = 0xfd; break; case 0x015e: byte_stream[ safe_byte_stream_index ] = 0xde; break; case 0x015f: byte_stream[ safe_byte_stream_index ] = 0xfe; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0150 ) ) { unicode_character -= 0x00c0; byte_stream[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ safe_byte_stream_index ] = 0xa7; break; case 0x00ad: byte_stream[ safe_byte_stream_index ] = 0xad; break; case 0x00b0: byte_stream[ safe_byte_stream_index ] = 0xb0; break; case 0x00b7: byte_stream[ safe_byte_stream_index ] = 0xb7; break; case 0x0172: byte_stream[ safe_byte_stream_index ] = 0xd9; break; case 0x0173: byte_stream[ safe_byte_stream_index ] = 0xf9; break; case 0x017d: byte_stream[ safe_byte_stream_index ] = 0xac; break; case 0x017e: byte_stream[ safe_byte_stream_index ] = 0xbc; break; case 0x2015: byte_stream[ safe_byte_stream_index ] = 0xbd; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0e01 ) && ( unicode_character < 0x0e3b ) ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else if( ( unicode_character >= 0x0e3f ) && ( unicode_character < 0x0e5c ) ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else { byte_stream[ safe_byte_stream_index ] = 0x1a; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else { byte_stream[ safe_byte_stream_index ] = 0x1a; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00c0; byte_stream[ safe_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[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ unicode_character ]; } else switch( unicode_character ) { case 0x00a3: byte_stream[ safe_byte_stream_index ] = 0xa3; break; case 0x00a7: byte_stream[ safe_byte_stream_index ] = 0xa7; break; case 0x00a9: byte_stream[ safe_byte_stream_index ] = 0xa9; break; case 0x00ad: byte_stream[ safe_byte_stream_index ] = 0xad; break; case 0x00ae: byte_stream[ safe_byte_stream_index ] = 0xae; break; case 0x00b6: byte_stream[ safe_byte_stream_index ] = 0xb6; break; case 0x010a: byte_stream[ safe_byte_stream_index ] = 0xa4; break; case 0x010b: byte_stream[ safe_byte_stream_index ] = 0xa5; break; case 0x0120: byte_stream[ safe_byte_stream_index ] = 0xb2; break; case 0x0121: byte_stream[ safe_byte_stream_index ] = 0xb3; break; case 0x0178: byte_stream[ safe_byte_stream_index ] = 0xaf; break; case 0x1e02: byte_stream[ safe_byte_stream_index ] = 0xa1; break; case 0x1e03: byte_stream[ safe_byte_stream_index ] = 0xa2; break; case 0x1e0a: byte_stream[ safe_byte_stream_index ] = 0xa6; break; case 0x1e0b: byte_stream[ safe_byte_stream_index ] = 0xab; break; case 0x1e1e: byte_stream[ safe_byte_stream_index ] = 0xb0; break; case 0x1e1f: byte_stream[ safe_byte_stream_index ] = 0xb1; break; case 0x1e40: byte_stream[ safe_byte_stream_index ] = 0xb4; break; case 0x1e41: byte_stream[ safe_byte_stream_index ] = 0xb5; break; case 0x1e56: byte_stream[ safe_byte_stream_index ] = 0xb7; break; case 0x1e57: byte_stream[ safe_byte_stream_index ] = 0xb9; break; case 0x1e60: byte_stream[ safe_byte_stream_index ] = 0xbb; break; case 0x1e61: byte_stream[ safe_byte_stream_index ] = 0xbf; break; case 0x1e6a: byte_stream[ safe_byte_stream_index ] = 0xd7; break; case 0x1e6b: byte_stream[ safe_byte_stream_index ] = 0xf7; break; case 0x1ef2: byte_stream[ safe_byte_stream_index ] = 0xac; break; case 0x1ef3: byte_stream[ safe_byte_stream_index ] = 0xbc; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( unicode_character < 0x00a0 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ safe_byte_stream_index ] = libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( unicode_character < 0x0100 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else switch( unicode_character ) { case 0x0152: byte_stream[ safe_byte_stream_index ] = 0xbc; break; case 0x0153: byte_stream[ safe_byte_stream_index ] = 0xbd; break; case 0x0160: byte_stream[ safe_byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ safe_byte_stream_index ] = 0xa8; break; case 0x0178: byte_stream[ safe_byte_stream_index ] = 0xbe; break; case 0x017d: byte_stream[ safe_byte_stream_index ] = 0xb4; break; case 0x017e: byte_stream[ safe_byte_stream_index ] = 0xb8; break; case 0x20ac: byte_stream[ safe_byte_stream_index ] = 0xa4; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( unicode_character < 0x00a1 ) { byte_stream[ safe_byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a8 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00a8; byte_stream[ safe_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[ safe_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[ safe_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[ safe_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[ safe_byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ safe_byte_stream_index ] = 0xa7; break; case 0x010c: byte_stream[ safe_byte_stream_index ] = 0xb2; break; case 0x010d: byte_stream[ safe_byte_stream_index ] = 0xb9; break; case 0x0110: byte_stream[ safe_byte_stream_index ] = 0xd0; break; case 0x0111: byte_stream[ safe_byte_stream_index ] = 0xf0; break; case 0x0118: byte_stream[ safe_byte_stream_index ] = 0xdd; break; case 0x0119: byte_stream[ safe_byte_stream_index ] = 0xfd; break; case 0x015a: byte_stream[ safe_byte_stream_index ] = 0xd7; break; case 0x015b: byte_stream[ safe_byte_stream_index ] = 0xf7; break; case 0x0160: byte_stream[ safe_byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ safe_byte_stream_index ] = 0xa8; break; case 0x0170: byte_stream[ safe_byte_stream_index ] = 0xd8; break; case 0x0171: byte_stream[ safe_byte_stream_index ] = 0xf8; break; case 0x201d: byte_stream[ safe_byte_stream_index ] = 0xb5; break; case 0x201e: byte_stream[ safe_byte_stream_index ] = 0xa5; break; case 0x20ac: byte_stream[ safe_byte_stream_index ] = 0xa4; break; default: byte_stream[ safe_byte_stream_index ] = 0x1a; break; } safe_byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: result = libuna_codepage_koi8_r_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_KOI8_U: result = libuna_codepage_koi8_u_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ARABIC: result = libuna_codepage_mac_arabic_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CELTIC: result = libuna_codepage_mac_celtic_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN: result = libuna_codepage_mac_centraleurroman_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CROATIAN: result = libuna_codepage_mac_croatian_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_CYRILLIC: result = libuna_codepage_mac_cyrillic_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_DINGBATS: result = libuna_codepage_mac_dingbats_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_FARSI: result = libuna_codepage_mac_farsi_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_GAELIC: result = libuna_codepage_mac_gaelic_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_GREEK: result = libuna_codepage_mac_greek_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ICELANDIC: result = libuna_codepage_mac_icelandic_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_INUIT: result = libuna_codepage_mac_inuit_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ROMAN: result = libuna_codepage_mac_roman_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_ROMANIAN: result = libuna_codepage_mac_romanian_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_RUSSIAN: result = libuna_codepage_mac_russian_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_SYMBOL: result = libuna_codepage_mac_symbol_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_THAI: result = libuna_codepage_mac_thai_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_TURKISH: result = libuna_codepage_mac_turkish_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_MAC_UKRAINIAN: result = libuna_codepage_mac_ukrainian_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_874: result = libuna_codepage_windows_874_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_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, &safe_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, &safe_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, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: result = libuna_codepage_windows_1250_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1251: result = libuna_codepage_windows_1251_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1252: result = libuna_codepage_windows_1252_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1253: result = libuna_codepage_windows_1253_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1254: result = libuna_codepage_windows_1254_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1255: result = libuna_codepage_windows_1255_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1256: result = libuna_codepage_windows_1256_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1257: result = libuna_codepage_windows_1257_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1258: result = libuna_codepage_windows_1258_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &safe_byte_stream_index, 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_COPY_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } *byte_stream_index = safe_byte_stream_index; return( result ); } /* Determines the size of an UCS-2 character from an Unicode character * Adds the size to the UCS-2 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_ucs2( libuna_unicode_character_t unicode_character, size_t *ucs2_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_ucs2"; if( ucs2_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-2 character size.", function ); return( -1 ); } /* Determine if the Unicode character is valid * UCS-2 with surrogate pairs supports upto 0x10ffff characters */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { *ucs2_character_size += 2; } else { *ucs2_character_size += 1; } return( 1 ); } /* Copies an Unicode character from an UCS-2 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_ucs2( libuna_unicode_character_t *unicode_character, const libuna_utf16_character_t *ucs2_string, size_t ucs2_string_size, size_t *ucs2_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_ucs2"; libuna_utf16_character_t ucs2_surrogate = 0; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_ucs2_string_index = 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( ucs2_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-2 string.", function ); return( -1 ); } if( ucs2_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UCS-2 string size value exceeds maximum.", function ); return( -1 ); } if( ucs2_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-2 string index.", function ); return( -1 ); } safe_ucs2_string_index = *ucs2_string_index; if( safe_ucs2_string_index >= ucs2_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UCS-2 string too small.", function ); return( -1 ); } safe_unicode_character = ucs2_string[ safe_ucs2_string_index ]; safe_ucs2_string_index += 1; /* Determine if the UCS-2 character is within the high surrogate range */ if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( safe_ucs2_string_index >= ucs2_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UCS-2 character bytes.", function ); return( -1 ); } ucs2_surrogate = ucs2_string[ safe_ucs2_string_index ]; /* Determine if the UCS-2 character is within the low surrogate range */ if( ( ucs2_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( ucs2_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; safe_unicode_character <<= 10; safe_unicode_character += ucs2_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; safe_unicode_character += 0x010000; safe_ucs2_string_index += 1; } } /* Determine if the Unicode character is valid * UCS-2 with surrogate pairs supports upto 0x10ffff characters */ if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *ucs2_string_index = safe_ucs2_string_index; return( 1 ); } /* Copies an Unicode character into a UCS-2 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_ucs2( libuna_unicode_character_t unicode_character, libuna_utf16_character_t *ucs2_string, size_t ucs2_string_size, size_t *ucs2_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_ucs2"; size_t safe_ucs2_string_index = 0; if( ucs2_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-2 string.", function ); return( -1 ); } if( ucs2_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UCS-2 string size value exceeds maximum.", function ); return( -1 ); } if( ucs2_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-2 string index.", function ); return( -1 ); } safe_ucs2_string_index = *ucs2_string_index; if( safe_ucs2_string_index >= ucs2_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UCS-2 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) unicode_character; } else { if( ( ucs2_string_size < 2 ) || ( safe_ucs2_string_index > ( ucs2_string_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UCS-2 string too small.", function ); return( -1 ); } unicode_character -= 0x010000; ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); ucs2_string[ safe_ucs2_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } *ucs2_string_index = safe_ucs2_string_index; return( 1 ); } /* Determines the size of an UCS-4 character from an Unicode character * Adds the size to the UCS-4 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_ucs4( libuna_unicode_character_t unicode_character, size_t *ucs4_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_ucs4"; LIBUNA_UNREFERENCED_PARAMETER( unicode_character ) if( ucs4_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-4 character size.", function ); return( -1 ); } if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *ucs4_character_size += 1; return( 1 ); } /* Copies an Unicode character from an UCS-4 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_ucs4( libuna_unicode_character_t *unicode_character, const libuna_utf32_character_t *ucs4_string, size_t ucs4_string_size, size_t *ucs4_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_ucs4"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_ucs4_string_index = 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( ucs4_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-4 string.", function ); return( -1 ); } if( ucs4_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UCS-4 string size value exceeds maximum.", function ); return( -1 ); } if( ucs4_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-4 string index.", function ); return( -1 ); } safe_ucs4_string_index = *ucs4_string_index; if( safe_ucs4_string_index >= ucs4_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UCS-4 string too small.", function ); return( -1 ); } safe_unicode_character = ucs4_string[ safe_ucs4_string_index ]; /* Determine if the Unicode character is valid */ if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *ucs4_string_index = safe_ucs4_string_index + 1; return( 1 ); } /* Copies an Unicode character into a UCS-4 string * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_ucs4( libuna_unicode_character_t unicode_character, libuna_utf32_character_t *ucs4_string, size_t ucs4_string_size, size_t *ucs4_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_ucs4"; size_t safe_ucs4_string_index = 0; if( ucs4_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-4 string.", function ); return( -1 ); } if( ucs4_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UCS-4 string size value exceeds maximum.", function ); return( -1 ); } if( ucs4_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UCS-4 string index.", function ); return( -1 ); } safe_ucs4_string_index = *ucs4_string_index; if( safe_ucs4_string_index >= ucs4_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UCS-4 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } ucs4_string[ safe_ucs4_string_index ] = (libuna_utf32_character_t) unicode_character; *ucs4_string_index = safe_ucs4_string_index + 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 */ 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 ) { static char *function = "libuna_unicode_character_size_to_utf7_stream"; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf7_stream_character_size = 0; uint32_t base64_triplet = 0; uint32_t safe_utf7_stream_base64_data = 0; uint8_t base64_encode_character = 0; uint8_t byte_bit_shift = 0; uint8_t current_byte = 0; uint8_t number_of_bytes = 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 ); } safe_utf7_stream_character_size = *utf7_stream_character_size; safe_utf7_stream_base64_data = *utf7_stream_base64_data; /* 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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else if( ( unicode_character >= 256 ) || ( libuna_unicode_character_utf7_valid_directly_encoded_character[ (uint8_t) unicode_character ] == 0 ) ) { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { safe_utf7_stream_base64_data = 0; } safe_utf7_stream_character_size += 1; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { safe_utf7_stream_character_size += 1; } } else { /* Escape the base64 encoded characters with a + */ if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { safe_utf7_stream_character_size += 1; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = safe_utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( safe_utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( safe_utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { if( safe_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 */ safe_utf7_stream_character_size -= number_of_bytes + 1; } if( safe_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 */ safe_utf7_stream_character_size -= 1; } safe_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 ) { safe_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 ) { safe_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 ) { safe_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 ) { safe_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 ) { safe_utf7_stream_character_size += number_of_bytes + 1; } safe_utf7_stream_character_size += 1; } if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { safe_utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; safe_utf7_stream_base64_data |= (uint32_t) current_byte << 28; safe_utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; safe_utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } *utf7_stream_character_size = safe_utf7_stream_character_size; *utf7_stream_base64_data = safe_utf7_stream_base64_data; return( 1 ); } /* Copies an 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 */ 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_unicode_character_t safe_unicode_character = 0; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf7_stream_index = 0; uint32_t base64_triplet = 0; uint32_t safe_utf7_stream_base64_data = 0; uint8_t byte_bit_shift = 0; uint8_t current_byte = 0; uint8_t number_of_bytes = 0; uint8_t padding_size = 0; uint8_t utf7_character_value = 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_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 ); } safe_utf7_stream_index = *utf7_stream_index; safe_utf7_stream_base64_data = *utf7_stream_base64_data; if( safe_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( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { base64_triplet = safe_utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( safe_utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( safe_utf7_stream_base64_data >> 28 ) & 0x03; if( current_byte >= number_of_bytes ) { if( safe_utf7_stream_index >= utf7_stream_size ) { 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 ); } utf7_character_value = utf7_stream[ safe_utf7_stream_index ]; /* Any character not in the modified base64 alphabet terminates the base64 encoded sequence */ if( libuna_unicode_character_utf7_valid_base64_character[ utf7_character_value ] == 0 ) { safe_utf7_stream_base64_data = 0; } } } if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { if( safe_utf7_stream_index >= utf7_stream_size ) { 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 ); } utf7_character_value = utf7_stream[ safe_utf7_stream_index ]; /* Determine if the character is modified base64 encoded * or a + character */ if( utf7_character_value == (uint8_t) '+' ) { if( ( safe_utf7_stream_index + 1 ) >= utf7_stream_size ) { 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 ); } if( utf7_stream[ safe_utf7_stream_index + 1 ] != (uint8_t) '-' ) { safe_utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; safe_utf7_stream_index++; } } /* Allow for the end of string character */ else if( utf7_character_value == 0 ) { } else if( libuna_unicode_character_utf7_valid_directly_encoded_character[ utf7_character_value ] == 0 ) { 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_character_value ); return( -1 ); } } if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { safe_unicode_character = utf7_stream[ safe_utf7_stream_index++ ]; if( ( safe_unicode_character == (libuna_unicode_character_t) '+' ) && ( utf7_stream[ safe_utf7_stream_index ] == (uint8_t) '-' ) ) { safe_utf7_stream_index++; } } 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 - 1, &safe_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( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { byte_bit_shift = 16 - ( current_byte * 8 ); safe_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 - 1, &safe_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 ); safe_unicode_character += ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL; current_byte += 1; if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_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 - 1, &safe_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 - 1, &safe_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 ) ) { safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; safe_unicode_character <<= 10; safe_unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; safe_unicode_character += 0x010000; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported low surrogate UTF-16 character.", function ); return( -1 ); } } if( safe_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[ safe_utf7_stream_index ] == (uint8_t) '-' ) ) { safe_utf7_stream_base64_data = 0; safe_utf7_stream_index++; } } if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { safe_utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; safe_utf7_stream_base64_data |= (uint32_t) current_byte << 28; safe_utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; safe_utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } *unicode_character = safe_unicode_character; *utf7_stream_index = safe_utf7_stream_index; *utf7_stream_base64_data = safe_utf7_stream_base64_data; return( 1 ); } /* Copies an 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 */ 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; size_t safe_utf7_stream_index = 0; uint32_t base64_triplet = 0; uint32_t safe_utf7_stream_base64_data = 0; uint8_t base64_encode_character = 0; uint8_t byte_bit_shift = 0; uint8_t current_byte = 0; uint8_t number_of_bytes = 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 ); } safe_utf7_stream_index = *utf7_stream_index; safe_utf7_stream_base64_data = *utf7_stream_base64_data; /* 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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* A-Z is not a continous range on an 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 an 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'; } /* The + character must be escaped */ else if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else if( ( unicode_character >= 256 ) || ( libuna_unicode_character_utf7_valid_directly_encoded_character[ (uint8_t) unicode_character ] == 0 ) ) { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { safe_utf7_stream_base64_data = 0; } if( safe_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[ safe_utf7_stream_index++ ] = (uint8_t) unicode_character; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { if( safe_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[ safe_utf7_stream_index++ ] = (uint8_t) '-'; } } else { /* Escape the base64 encoded chracters with a + */ if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { if( safe_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[ safe_utf7_stream_index++ ] = (uint8_t) '+'; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = safe_utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( safe_utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( safe_utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { /* Correct the index for the last partial base64 stream */ safe_utf7_stream_index -= number_of_bytes + 1; } /* Correct the index for the base64 stream termination character */ safe_utf7_stream_index -= 1; } safe_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, &safe_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, &safe_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, &safe_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, &safe_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, &safe_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( safe_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[ safe_utf7_stream_index++ ] = (uint8_t) '-'; } if( ( safe_utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { safe_utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; safe_utf7_stream_base64_data |= (uint32_t) current_byte << 28; safe_utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; safe_utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } *utf7_stream_index = safe_utf7_stream_index; *utf7_stream_base64_data = safe_utf7_stream_base64_data; return( 1 ); } /* Determines the size of an UTF-8 character from an Unicode character * This function supports upto U+10FFFF (4 byte UTF-8 characters) * Adds the size to the UTF-8 character size value * Returns 1 if successful or -1 on error */ 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"; size_t safe_utf8_character_size = 0; 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 ); } /* 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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes * while its predecessor RFC 2279 allowed up to 6 bytes */ if( unicode_character < 0x00000080UL ) { safe_utf8_character_size += 1; } else if( unicode_character < 0x00000800UL ) { safe_utf8_character_size += 2; } else if( unicode_character < 0x00010000UL ) { safe_utf8_character_size += 3; } else { safe_utf8_character_size += 4; } *utf8_character_size += safe_utf8_character_size; return( 1 ); } /* Copies an Unicode character from an UTF-8 string * This function supports upto U+10FFFF (4 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_utf8_string_index = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t byte_value4 = 0; uint8_t utf8_character_additional_bytes = 0; int result = 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 ); } safe_utf8_string_index = *utf8_string_index; if( safe_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 */ byte_value1 = utf8_string[ safe_utf8_string_index ]; /* Determine the UTF-8 character and make sure it is valid * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes * while its predecessor RFC 2279 allowed up to 6 bytes */ if( byte_value1 > 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, byte_value1 ); return( -1 ); } if( byte_value1 < 0xc0 ) { utf8_character_additional_bytes = 0; } else if( byte_value1 < 0xe0 ) { utf8_character_additional_bytes = 1; } else if( byte_value1 < 0xf0 ) { utf8_character_additional_bytes = 2; } else { utf8_character_additional_bytes = 3; } if( ( ( (size_t) utf8_character_additional_bytes + 1 ) > utf8_string_size ) || ( safe_utf8_string_index > ( utf8_string_size - ( utf8_character_additional_bytes + 1 ) ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 character bytes.", function ); return( -1 ); } safe_unicode_character = byte_value1; if( utf8_character_additional_bytes == 0 ) { if( byte_value1 >= 0x80 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, byte_value1 ); return( -1 ); } } if( utf8_character_additional_bytes >= 1 ) { byte_value2 = utf8_string[ safe_utf8_string_index + 1 ]; if( ( byte_value2 < 0x80 ) || ( byte_value2 > 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, byte_value2 ); return( -1 ); } result = 1; switch( byte_value1 ) { case 0xe0: if( ( byte_value2 < 0xa0 ) || ( byte_value2 > 0xbf ) ) { result = 0; } break; case 0xed: if( ( byte_value2 < 0x80 ) || ( byte_value2 > 0x9f ) ) { result = 0; } break; case 0xf0: if( ( byte_value2 < 0x90 ) || ( byte_value2 > 0xbf ) ) { result = 0; } break; case 0xf4: if( ( byte_value2 < 0x80 ) || ( byte_value2 > 0xbf ) ) { result = 0; } break; default: break; } if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st and 2nd UTF-8 character byte pair: 0x%02" PRIx8 " 0x%02" PRIx8 ".", function, byte_value1, byte_value2 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value2; if( utf8_character_additional_bytes == 1 ) { safe_unicode_character -= 0x03080; } } if( utf8_character_additional_bytes >= 2 ) { byte_value3 = utf8_string[ safe_utf8_string_index + 2 ]; if( ( byte_value3 < 0x80 ) || ( byte_value3 > 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, byte_value3 ); return( -1 ); } result = 1; switch( byte_value2 ) { case 0xe0: if( ( byte_value2 < 0xa0 ) || ( byte_value2 > 0xbf ) ) { result = 0; } break; case 0xed: if( ( byte_value2 < 0x80 ) || ( byte_value2 > 0x9f ) ) { result = 0; } break; default: break; } if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd and 3rd UTF-8 character byte pair: 0x%02" PRIx8 " 0x%02" PRIx8 ".", function, byte_value2, byte_value3 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value3; if( utf8_character_additional_bytes == 2 ) { safe_unicode_character -= 0x0e2080; } } if( utf8_character_additional_bytes >= 3 ) { byte_value4 = utf8_string[ safe_utf8_string_index + 3 ]; if( ( byte_value4 < 0x80 ) || ( byte_value4 > 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, byte_value4 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value4; if( utf8_character_additional_bytes == 3 ) { safe_unicode_character -= 0x03c82080; } } /* Determine if the Unicode character is valid */ if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; return( 1 ); } /* Copies an Unicode character into a UTF-8 string * This function supports upto U+10FFFF (4 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ 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"; size_t safe_utf8_string_index = 0; size_t utf8_character_iterator = 0; uint8_t utf8_character_additional_bytes = 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 ); } safe_utf8_string_index = *utf8_string_index; if( safe_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_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* 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 { utf8_character_additional_bytes = 3; utf8_first_character_mark = 0x0f0; } /* Convert Unicode character into UTF-8 character bytes */ if( ( utf8_character_additional_bytes > utf8_string_size ) || ( safe_utf8_string_index >= ( utf8_string_size - utf8_character_additional_bytes ) ) ) { 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 = safe_utf8_string_index + utf8_character_additional_bytes; utf8_character_iterator > safe_utf8_string_index; utf8_character_iterator-- ) { utf8_string[ utf8_character_iterator ] = (libuna_utf8_character_t) ( ( unicode_character & 0x0bf ) | 0x080 ); unicode_character >>= 6; } utf8_string[ safe_utf8_string_index ] = (libuna_utf8_character_t) ( unicode_character | utf8_first_character_mark ); *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; return( 1 ); } /* Determines the size of an UTF-8 character from an Unicode character * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) * Adds the size to the UTF-8 character size value * Returns 1 if successful or -1 on error */ int libuna_unicode_character_size_to_utf8_rfc2279( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf8_rfc2279"; size_t safe_utf8_character_size = 0; 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 > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes * while its predecessor RFC 2279 allowed up to 6 bytes */ if( unicode_character < 0x00000080UL ) { safe_utf8_character_size += 1; } else if( unicode_character < 0x00000800UL ) { safe_utf8_character_size += 2; } else if( unicode_character < 0x00010000UL ) { safe_utf8_character_size += 3; } else if( unicode_character < 0x00200000UL ) { safe_utf8_character_size += 4; } else if( unicode_character < 0x04000000UL ) { safe_utf8_character_size += 5; } else { safe_utf8_character_size += 6; } *utf8_character_size += safe_utf8_character_size; return( 1 ); } /* Copies an Unicode character from an UTF-8 string * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_from_utf8_rfc2279( 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_rfc2279"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_utf8_string_index = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t byte_value4 = 0; uint8_t byte_value5 = 0; uint8_t byte_value6 = 0; 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 ); } safe_utf8_string_index = *utf8_string_index; if( safe_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 */ byte_value1 = utf8_string[ safe_utf8_string_index ]; /* Determine the UTF-8 character and make sure it is valid * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes * while its predecessor RFC 2279 allowed up to 6 bytes */ if( byte_value1 > 0xfd ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, byte_value1 ); return( -1 ); } if( byte_value1 < 0xc0 ) { utf8_character_additional_bytes = 0; } else if( byte_value1 < 0xe0 ) { utf8_character_additional_bytes = 1; } else if( byte_value1 < 0xf0 ) { utf8_character_additional_bytes = 2; } else if( byte_value1 < 0xf8 ) { utf8_character_additional_bytes = 3; } else if( byte_value1 < 0xfc ) { utf8_character_additional_bytes = 4; } else { utf8_character_additional_bytes = 5; } if( ( ( (size_t) utf8_character_additional_bytes + 1 ) > utf8_string_size ) || ( safe_utf8_string_index > ( utf8_string_size - ( utf8_character_additional_bytes + 1 ) ) ) ) { 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 * RFC 3629 limits the UTF-8 character to consist of a maximum of 4 bytes * while its predecessor RFC 2279 allowed up to 6 bytes */ safe_unicode_character = byte_value1; if( utf8_character_additional_bytes == 0 ) { if( byte_value1 >= 0x80 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, byte_value1 ); return( -1 ); } } if( utf8_character_additional_bytes >= 1 ) { byte_value2 = utf8_string[ safe_utf8_string_index + 1 ]; if( ( byte_value2 < 0x80 ) || ( byte_value2 > 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, byte_value2 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value2; if( utf8_character_additional_bytes == 1 ) { safe_unicode_character -= 0x03080; } } if( utf8_character_additional_bytes >= 2 ) { byte_value3 = utf8_string[ safe_utf8_string_index + 2 ]; if( ( byte_value3 < 0x80 ) || ( byte_value3 > 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, byte_value3 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value3; if( utf8_character_additional_bytes == 2 ) { safe_unicode_character -= 0x0e2080; } } if( utf8_character_additional_bytes >= 3 ) { byte_value4 = utf8_string[ safe_utf8_string_index + 3 ]; if( ( byte_value4 < 0x80 ) || ( byte_value4 > 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, byte_value4 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value4; if( utf8_character_additional_bytes == 3 ) { safe_unicode_character -= 0x03c82080; } } if( utf8_character_additional_bytes >= 4 ) { byte_value5 = utf8_string[ safe_utf8_string_index + 4 ]; if( ( byte_value5 < 0x80 ) || ( byte_value5 > 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, byte_value5 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value5; if( utf8_character_additional_bytes == 4 ) { safe_unicode_character -= 0x0fa082080; } } if( utf8_character_additional_bytes == 5 ) { byte_value6 = utf8_string[ safe_utf8_string_index + 5 ]; if( ( byte_value6 < 0x80 ) || ( byte_value6 > 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, byte_value6 ); return( -1 ); } safe_unicode_character <<= 6; safe_unicode_character += byte_value6; safe_unicode_character -= 0x082082080; } /* Determine if the Unicode character is valid */ if( safe_unicode_character > LIBUNA_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf8_string_index = safe_utf8_string_index + 1 + utf8_character_additional_bytes; return( 1 ); } /* Copies an Unicode character into a UTF-8 string * This function supports upto U+7FFFFFF (6 byte UTF-8 characters) * Returns 1 if successful or -1 on error */ int libuna_unicode_character_copy_to_utf8_rfc2279( 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_rfc2279"; size_t safe_utf8_string_index = 0; size_t utf8_character_iterator = 0; uint8_t utf8_character_additional_bytes = 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 ); } safe_utf8_string_index = *utf8_string_index; if( safe_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_UCS_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } /* 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_character_additional_bytes > utf8_string_size ) || ( safe_utf8_string_index >= ( utf8_string_size - utf8_character_additional_bytes ) ) ) { 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 = safe_utf8_string_index + utf8_character_additional_bytes; utf8_character_iterator > safe_utf8_string_index; utf8_character_iterator-- ) { utf8_string[ utf8_character_iterator ] = (libuna_utf8_character_t) ( ( unicode_character & 0x0bf ) | 0x080 ); unicode_character >>= 6; } utf8_string[ safe_utf8_string_index ] = (libuna_utf8_character_t) ( unicode_character | utf8_first_character_mark ); *utf8_string_index = safe_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 */ 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_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { *utf16_character_size += 2; } else { *utf16_character_size += 1; } return( 1 ); } /* Copies an Unicode character from an UTF-16 string * Returns 1 if successful or -1 on error */ 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_unicode_character_t safe_unicode_character = 0; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf16_string_index = 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 ); } safe_utf16_string_index = *utf16_string_index; if( safe_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 ); } safe_unicode_character = utf16_string[ safe_utf16_string_index ]; safe_utf16_string_index += 1; /* Determine if the UTF-16 character is within the high surrogate range */ if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( safe_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[ safe_utf16_string_index ]; safe_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 ) ) { safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; safe_unicode_character <<= 10; safe_unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; safe_unicode_character += 0x010000; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported low surrogate UTF-16 character.", function ); return( -1 ); } } /* Determine if the Unicode character is valid */ if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf16_string_index = safe_utf16_string_index; return( 1 ); } /* Copies an Unicode character into a UTF-16 string * Returns 1 if successful or -1 on error */ 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"; size_t safe_utf16_string_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( 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 ); } safe_utf16_string_index = *utf16_string_index; if( safe_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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { utf16_string[ safe_utf16_string_index++ ] = (libuna_utf16_character_t) unicode_character; } else { if( ( utf16_string_size < 2 ) || ( safe_utf16_string_index > ( utf16_string_size - 2 ) ) ) { 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[ safe_utf16_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); utf16_string[ safe_utf16_string_index++ ] = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } *utf16_string_index = safe_utf16_string_index; return( 1 ); } /* Copies an Unicode character from an UTF-16 stream * Returns 1 if successful or -1 on error */ 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_unicode_character_t safe_unicode_character = 0; libuna_utf16_character_t utf16_surrogate = 0; size_t safe_utf16_stream_index = 0; int byte_order_without_flags = 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 ); } byte_order_without_flags = byte_order & 0xff; if( ( byte_order_without_flags != LIBUNA_ENDIAN_BIG ) && ( byte_order_without_flags != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } safe_utf16_stream_index = *utf16_stream_index; if( ( utf16_stream_size < 2 ) || ( safe_utf16_stream_index > ( utf16_stream_size - 2 ) ) ) { 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_without_flags == LIBUNA_ENDIAN_BIG ) { safe_unicode_character = utf16_stream[ safe_utf16_stream_index ]; safe_unicode_character <<= 8; safe_unicode_character += utf16_stream[ safe_utf16_stream_index + 1 ]; } else if( byte_order_without_flags == LIBUNA_ENDIAN_LITTLE ) { safe_unicode_character = utf16_stream[ safe_utf16_stream_index + 1 ]; safe_unicode_character <<= 8; safe_unicode_character += utf16_stream[ safe_utf16_stream_index ]; } safe_utf16_stream_index += 2; /* Determine if the Unicode character is valid */ if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported UTF-16 character.", function ); return( -1 ); } } /* Determine if the UTF-16 character is within the high surrogate range */ if( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( safe_utf16_stream_index > ( utf16_stream_size - 2 ) ) { if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UTF-16 character bytes.", function ); return( -1 ); } } else { if( byte_order_without_flags == LIBUNA_ENDIAN_BIG ) { utf16_surrogate = utf16_stream[ safe_utf16_stream_index ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ safe_utf16_stream_index + 1 ]; } else if( byte_order_without_flags == LIBUNA_ENDIAN_LITTLE ) { utf16_surrogate = utf16_stream[ safe_utf16_stream_index + 1 ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ safe_utf16_stream_index ]; } /* 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 ) ) { safe_unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; safe_unicode_character <<= 10; safe_unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START; safe_unicode_character += 0x010000; safe_utf16_stream_index += 2; } else if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported low surrogate UTF-16 character.", function ); return( -1 ); } } } if( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf16_stream_index = safe_utf16_stream_index; return( 1 ); } /* Copies an Unicode character to an UTF-16 stream * Returns 1 if successful or -1 on error */ 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; size_t safe_utf16_stream_index = 0; int byte_order_without_flags = 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 ); } byte_order_without_flags = byte_order & 0xff; if( ( byte_order_without_flags != LIBUNA_ENDIAN_BIG ) && ( byte_order_without_flags != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } safe_utf16_stream_index = *utf16_stream_index; /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { if( ( utf16_stream_size < 2 ) || ( safe_utf16_stream_index > ( utf16_stream_size - 2 ) ) ) { 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 ) { utf16_stream[ safe_utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ safe_utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); } safe_utf16_stream_index += 2; } else { if( ( utf16_stream_size < 4 ) || ( safe_utf16_stream_index > ( utf16_stream_size - 4 ) ) ) { 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[ safe_utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ safe_utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } safe_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[ safe_utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ safe_utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ safe_utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } safe_utf16_stream_index += 2; } *utf16_stream_index = safe_utf16_stream_index; 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 */ int libuna_unicode_character_size_to_utf32( libuna_unicode_character_t unicode_character, 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 ); } if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *utf32_character_size += 1; return( 1 ); } /* Copies an Unicode character from an UTF-32 string * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_utf32_string_index = 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( 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 ); } safe_utf32_string_index = *utf32_string_index; if( safe_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 ); } safe_unicode_character = utf32_string[ safe_utf32_string_index ]; /* Determine if the Unicode character is valid */ if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf32_string_index = safe_utf32_string_index + 1; return( 1 ); } /* Copies an Unicode character into a UTF-32 string * Returns 1 if successful or -1 on error */ 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"; size_t safe_utf32_string_index = 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 ); } safe_utf32_string_index = *utf32_string_index; if( safe_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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } utf32_string[ safe_utf32_string_index ] = (libuna_utf32_character_t) unicode_character; *utf32_string_index = safe_utf32_string_index + 1; return( 1 ); } /* Copies an Unicode character from an UTF-32 stream * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0; size_t safe_utf32_stream_index = 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( 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 ); } safe_utf32_stream_index = *utf32_stream_index; if( ( utf32_stream_size < 4 ) || ( safe_utf32_stream_index > ( utf32_stream_size - 4 ) ) ) { 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 ) { safe_unicode_character = utf32_stream[ safe_utf32_stream_index ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index + 1 ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index + 2 ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index + 3 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { safe_unicode_character = utf32_stream[ safe_utf32_stream_index + 3 ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index + 2 ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index + 1 ]; safe_unicode_character <<= 8; safe_unicode_character += utf32_stream[ safe_utf32_stream_index ]; } /* Determine if the Unicode character is valid */ if( ( ( safe_unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( safe_unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( safe_unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } *unicode_character = safe_unicode_character; *utf32_stream_index = safe_utf32_stream_index + 4; return( 1 ); } /* Copies an Unicode character to an UTF-32 stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_utf32_stream_index = 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_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } safe_utf32_stream_index = *utf32_stream_index; if( ( utf32_stream_size < 4 ) || ( safe_utf32_stream_index > ( utf32_stream_size - 4 ) ) ) { 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_UNICODE_CHARACTER_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported Unicode character.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ safe_utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ safe_utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ safe_utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); } *utf32_stream_index = safe_utf32_stream_index + 4; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_gaelic.c0000644000175000017500000002421314610746251023233 0ustar00lordyestalordyesta/* * MacGaelic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_gaelic.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacGaelic codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_gaelic_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, 0x1e02, 0x00b1, 0x2264, 0x2265, 0x1e03, 0x010a, 0x010b, 0x1e0a, 0x1e0b, 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x00e6, 0x00f8, 0x1e41, 0x1e56, 0x1e57, 0x027c, 0x0192, 0x017f, 0x1e60, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x1e61, 0x1e9b, 0x00ff, 0x0178, 0x1e6a, 0x20ac, 0x2039, 0x203a, 0x0176, 0x0177, 0x1e6b, 0x00b7, 0x1ef2, 0x1ef3, 0x204a, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x2663, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x00dd, 0x00fd, 0x0174, 0x0175, 0x1e84, 0x1e85, 0x1e80, 0x1e81, 0x1e82, 0x1e83 }; /* Unicode to ASCII character lookup tables for the MacGaelic codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x00a0[ 112 ] = { 0xca, 0x1a, 0xa2, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, 0xac, 0xa9, 0x1a, 0xc7, 0x1a, 0x1a, 0xa8, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0x1a, 0xa6, 0xe1, 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xf6, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0x1a, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xf7, 0x1a, 0xd8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb5, 0xb6, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacGaelic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_gaelic_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_mac_gaelic_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_gaelic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacGaelic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_gaelic_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_mac_gaelic_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0110 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_gaelic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0120: byte_stream_value = 0xbb; break; case 0x0121: byte_stream_value = 0xbc; break; case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0174: byte_stream_value = 0xf8; break; case 0x0175: byte_stream_value = 0xf9; break; case 0x0176: byte_stream_value = 0xde; break; case 0x0177: byte_stream_value = 0xdf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x017f: byte_stream_value = 0xc5; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x027c: byte_stream_value = 0xc3; break; case 0x1e02: byte_stream_value = 0xb0; break; case 0x1e03: byte_stream_value = 0xb4; break; case 0x1e0a: byte_stream_value = 0xb7; break; case 0x1e0b: byte_stream_value = 0xb8; break; case 0x1e1e: byte_stream_value = 0xb9; break; case 0x1e1f: byte_stream_value = 0xba; break; case 0x1e40: byte_stream_value = 0xbd; break; case 0x1e41: byte_stream_value = 0xc0; break; case 0x1e56: byte_stream_value = 0xc1; break; case 0x1e57: byte_stream_value = 0xc2; break; case 0x1e60: byte_stream_value = 0xc6; break; case 0x1e61: byte_stream_value = 0xd6; break; case 0x1e6a: byte_stream_value = 0xda; break; case 0x1e6b: byte_stream_value = 0xe0; break; case 0x1e80: byte_stream_value = 0xfc; break; case 0x1e81: byte_stream_value = 0xfd; break; case 0x1e82: byte_stream_value = 0xfe; break; case 0x1e83: byte_stream_value = 0xff; break; case 0x1e84: byte_stream_value = 0xfa; break; case 0x1e85: byte_stream_value = 0xfb; break; case 0x1e9b: byte_stream_value = 0xd7; break; case 0x1ef2: byte_stream_value = 0xe2; break; case 0x1ef3: byte_stream_value = 0xe3; break; case 0x2039: byte_stream_value = 0xdc; break; case 0x203a: byte_stream_value = 0xdd; break; case 0x204a: byte_stream_value = 0xe4; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x2663: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_arabic.h0000644000175000017500000000310414610746251023231 0ustar00lordyestalordyesta/* * MacArabic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_ARABIC_H ) #define _LIBUNA_CODEPAGE_MAC_ARABIC_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_arabic_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 ); int libuna_codepage_mac_arabic_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 /* !defined( _LIBUNA_CODEPAGE_MAC_ARABIC_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_thai.c0000644000175000017500000002233314610746251022735 0ustar00lordyestalordyesta/* * MacThai codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_thai.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacThai codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_thai_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00ab, 0x00bb, 0x2026, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x201c, 0x201d, 0x0e4d, 0xfffd, 0x2022, 0x0e31, 0x0e47, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x2018, 0x2019, 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, 0x2060, 0x200b, 0x2013, 0x2014, 0x0e3f, 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x2122, 0x0e4f, 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x00ae, 0x00a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; /* Unicode to ASCII character lookup tables for the MacThai codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_thai_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, 0x1a, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x2008[ 32 ] = { 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdd, 0xde, 0x1a, 0x1a, 0x1a, 0x9d, 0x9e, 0x1a, 0x1a, 0x8d, 0x8e, 0x1a, 0x1a, 0x1a, 0x1a, 0x91, 0x1a, 0x1a, 0x1a, 0x82, 0x1a }; /* Determines the size of a MacThai encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_mac_thai_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_mac_thai_unicode_character_size_to_byte_stream"; int result = 0; 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( unicode_character ) { case 0x00000e31UL: case 0x00000e34UL: case 0x00000e35UL: case 0x00000e36UL: case 0x00000e37UL: case 0x00000e47UL: case 0x00000e48UL: case 0x00000e49UL: case 0x00000e4aUL: case 0x00000e4bUL: case 0x00000e4cUL: case 0x00000e4dUL: result = 0; break; default: *byte_stream_character_size += 1; result = 1; break; } return( result ); } /* Copies an Unicode character from a MacThai encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_thai_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_mac_thai_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_thai_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacThai encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_thai_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_mac_thai_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ) || ( unicode_character == 0x00a0 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0e00 ) && ( unicode_character < 0x0e60 ) ) { unicode_character -= 0x0e00; byte_stream_value = libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; } else if( ( unicode_character >= 0x2008 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2008; byte_stream_value = libuna_codepage_mac_thai_unicode_to_byte_stream_base_0x2008[ unicode_character ]; } else switch( unicode_character ) { case 0x00a9: byte_stream_value = 0xfb; break; case 0x00ab: byte_stream_value = 0x80; break; case 0x00ae: byte_stream_value = 0xfa; break; case 0x00bb: byte_stream_value = 0x81; break; case 0x2060: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xee; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_874.h0000644000175000017500000000312214610746251023264 0ustar00lordyestalordyesta/* * Windows 874 codepage (Thai) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) #define _LIBUNA_CODEPAGE_WINDOWS_874_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_874_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 ); int libuna_codepage_windows_874_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_15.h0000644000175000017500000000250214610746251022765 0ustar00lordyestalordyesta/* * ISO 8859-15 codepage (Latin 9) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) #define _LIBUNA_CODEPAGE_ISO_8859_15_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) */ libesedb-20240420/libuna/libuna_utf8_string.h0000644000175000017500000002270214610746251021622 0ustar00lordyestalordyesta/* * UTF-8 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_scsu_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_scsu_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF8_STRING_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_16.c0000644000175000017500000000634014610746251022765 0ustar00lordyestalordyesta/* * ISO 8859-16 codepage (Latin 10) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_windows_1255.c0000644000175000017500000002177314610746251023345 0ustar00lordyestalordyesta/* * Windows 1255 codepage (Hebrew) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1255.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1255 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1255_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_1255_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1255 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1255_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_1255_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = 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_value = 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_value = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream_value = 0xaa; break; case 0x00f7: byte_stream_value = 0xba; break; case 0x0192: byte_stream_value = 0x83; break; case 0x02c6: byte_stream_value = 0x88; break; case 0x02dc: byte_stream_value = 0x98; break; case 0x200e: byte_stream_value = 0xfd; break; case 0x200f: byte_stream_value = 0xfe; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20aa: byte_stream_value = 0xa4; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_utf7_stream.c0000644000175000017500000003651314610746251021606 0ustar00lordyestalordyesta/* * UTF-7 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libuna_definitions.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"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf7_stream_index = 0; size_t utf8_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; size_t utf7_stream_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_string_index = 0; size_t utf7_stream_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } return( 1 ); } libesedb-20240420/libuna/libuna_byte_stream.h0000644000175000017500000000555114610746251021667 0ustar00lordyestalordyesta/* * Byte stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBUNA_BYTE_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_koi8_u.c0000644000175000017500000002340014610746251022362 0ustar00lordyestalordyesta/* * KOI8-U codepage (Ukrainian Cyrillic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_koi8_u.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a KOI8-U encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_koi8_u_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_koi8_u_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a KOI8-U encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_koi8_u_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_koi8_u_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream_value = 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_value = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream_value = 0x9a; break; case 0x00a9: byte_stream_value = 0xbf; break; case 0x00b0: byte_stream_value = 0x9c; break; case 0x00b2: byte_stream_value = 0x9d; break; case 0x00b7: byte_stream_value = 0x9e; break; case 0x00f7: byte_stream_value = 0x9f; break; case 0x0401: byte_stream_value = 0xb3; break; case 0x0404: byte_stream_value = 0xb4; break; case 0x0406: byte_stream_value = 0xb6; break; case 0x0407: byte_stream_value = 0xb7; break; case 0x0451: byte_stream_value = 0xa3; break; case 0x0454: byte_stream_value = 0xa4; break; case 0x0456: byte_stream_value = 0xa6; break; case 0x0457: byte_stream_value = 0xa7; break; case 0x0490: byte_stream_value = 0xbd; break; case 0x0491: byte_stream_value = 0xad; break; case 0x2219: byte_stream_value = 0x95; break; case 0x221a: byte_stream_value = 0x96; break; case 0x2248: byte_stream_value = 0x97; break; case 0x2264: byte_stream_value = 0x98; break; case 0x2265: byte_stream_value = 0x99; break; case 0x2320: byte_stream_value = 0x93; break; case 0x2321: byte_stream_value = 0x9b; break; case 0x2500: byte_stream_value = 0x80; break; case 0x2502: byte_stream_value = 0x81; break; case 0x250c: byte_stream_value = 0x82; break; case 0x2510: byte_stream_value = 0x83; break; case 0x2514: byte_stream_value = 0x84; break; case 0x2518: byte_stream_value = 0x85; break; case 0x251c: byte_stream_value = 0x86; break; case 0x2524: byte_stream_value = 0x87; break; case 0x252c: byte_stream_value = 0x88; break; case 0x2534: byte_stream_value = 0x89; break; case 0x253c: byte_stream_value = 0x8a; break; case 0x2580: byte_stream_value = 0x8b; break; case 0x2584: byte_stream_value = 0x8c; break; case 0x2588: byte_stream_value = 0x8d; break; case 0x258c: byte_stream_value = 0x8e; break; case 0x2590: byte_stream_value = 0x8f; break; case 0x2591: byte_stream_value = 0x90; break; case 0x2592: byte_stream_value = 0x91; break; case 0x2593: byte_stream_value = 0x92; break; case 0x25a0: byte_stream_value = 0x94; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_unused.h0000644000175000017500000000256014610746251020651 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UNUSED_H ) #define _LIBUNA_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 /* !defined( _LIBUNA_UNUSED_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_6.c0000644000175000017500000000475414610746251022713 0ustar00lordyestalordyesta/* * ISO 8859-6 codepage (Arabic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_iso_8859_14.c0000644000175000017500000000540714610746251022766 0ustar00lordyestalordyesta/* * ISO 8859-14 codepage (Celtic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_base64_stream.h0000644000175000017500000000713714610746251022012 0ustar00lordyestalordyesta/* * Base64 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_BASE64_STREAM_H ) #define _LIBUNA_BASE64_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_base64_character_copy_to_sixtet( uint32_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 \ 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 \ 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 \ 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 /* !defined( _LIBUNA_BASE64_STREAM_H ) */ libesedb-20240420/libuna/libuna_error.c0000644000175000017500000000550214610746251020471 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libuna_error_sprint( libuna_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libuna_error_backtrace_sprint( libuna_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ libesedb-20240420/libuna/libuna_codepage_mac_centraleurroman.h0000644000175000017500000000317214610746251025216 0ustar00lordyestalordyesta/* * MacCentralEurRoman codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H ) #define _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_centraleurroman_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 ); int libuna_codepage_mac_centraleurroman_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 /* !defined( _LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_romanian.c0000644000175000017500000002334114610746251023614 0ustar00lordyestalordyesta/* * MacRomanian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_romanian.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacRomanian codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_romanian_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x0102, 0x0218, 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x0103, 0x0219, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0x021a, 0x021b, 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacRomanian codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x00a0[ 104 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0x1a, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0x1a, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0x1a, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8, 0x1a, 0x1a, 0xae, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x2010[ 56 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacRomanian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_romanian_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_mac_romanian_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_romanian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacRomanian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_romanian_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_mac_romanian_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2048 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_romanian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x0218: byte_stream_value = 0xaf; break; case 0x0219: byte_stream_value = 0xbf; break; case 0x021a: byte_stream_value = 0xde; break; case 0x021b: byte_stream_value = 0xdf; break; case 0x02c6: byte_stream_value = 0xf6; break; case 0x02c7: byte_stream_value = 0xff; break; case 0x02d8: byte_stream_value = 0xf9; break; case 0x02d9: byte_stream_value = 0xfa; break; case 0x02da: byte_stream_value = 0xfb; break; case 0x02db: byte_stream_value = 0xfe; break; case 0x02dc: byte_stream_value = 0xf7; break; case 0x02dd: byte_stream_value = 0xfd; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xb9; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0xf8ff: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_6.h0000644000175000017500000000247314610746251022714 0ustar00lordyestalordyesta/* * ISO 8859-6 codepage (Arabic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) #define _LIBUNA_CODEPAGE_ISO_8859_6_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ 64 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_9.c0000644000175000017500000000400514610746251022703 0ustar00lordyestalordyesta/* * ISO 8859-9 codepage (Turkish) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_mac_russian.h0000644000175000017500000000311214610746251023473 0ustar00lordyestalordyesta/* * MacRussian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_RUSSIAN_H ) #define _LIBUNA_CODEPAGE_MAC_RUSSIAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_russian_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 ); int libuna_codepage_mac_russian_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 /* !defined( _LIBUNA_CODEPAGE_MAC_RUSSIAN_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_dingbats.c0000644000175000017500000002362614610746251023611 0ustar00lordyestalordyesta/* * MacDingbats codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_dingbats.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacDingbats codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_dingbats_byte_stream_to_unicode_base_0x20[ 224 ] = { 0x0020, 0x2701, 0x2702, 0x2703, 0x2704, 0x260e, 0x2706, 0x2707, 0x2708, 0x2709, 0x261b, 0x261e, 0x270c, 0x270d, 0x270e, 0x270f, 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715, 0x2716, 0x2717, 0x2718, 0x2719, 0x271a, 0x271b, 0x271c, 0x271d, 0x271e, 0x271f, 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727, 0x2605, 0x2729, 0x272a, 0x272b, 0x272c, 0x272d, 0x272e, 0x272f, 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, 0x2738, 0x2739, 0x273a, 0x273b, 0x273c, 0x273d, 0x273e, 0x273f, 0x2740, 0x2741, 0x2742, 0x2743, 0x2744, 0x2745, 0x2746, 0x2747, 0x2748, 0x2749, 0x274a, 0x274b, 0x25cf, 0x274d, 0x25a0, 0x274f, 0x2750, 0x2751, 0x2752, 0x25b2, 0x25bc, 0x25c6, 0x2756, 0x25d7, 0x2758, 0x2759, 0x275a, 0x275b, 0x275c, 0x275d, 0x275e, 0x007f, 0x2768, 0x2769, 0x276a, 0x276b, 0x276c, 0x276d, 0x276e, 0x276f, 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2663, 0x2666, 0x2665, 0x2660, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x2776, 0x2777, 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787, 0x2788, 0x2789, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2192, 0x2194, 0x2195, 0x2798, 0x2799, 0x279a, 0x279b, 0x279c, 0x279d, 0x279e, 0x279f, 0x27a0, 0x27a1, 0x27a2, 0x27a3, 0x27a4, 0x27a5, 0x27a6, 0x27a7, 0x27a8, 0x27a9, 0x27aa, 0x27ab, 0x27ac, 0x27ad, 0x27ae, 0x27af, 0xfffd, 0x27b1, 0x27b2, 0x27b3, 0x27b4, 0x27b5, 0x27b6, 0x27b7, 0x27b8, 0x27b9, 0x27ba, 0x27bb, 0x27bc, 0x27bd, 0x27be, 0xfffd }; /* Unicode to ASCII character lookup tables for the MacDingbats codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2460[ 16 ] = { 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2700[ 192 ] = { 0x1a, 0x21, 0x22, 0x23, 0x24, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x1a, 0x1a, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x1a, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x1a, 0x6d, 0x1a, 0x6f, 0x70, 0x71, 0x72, 0x1a, 0x1a, 0x1a, 0x76, 0x1a, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x1a, 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 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, 0x1a, 0x1a, 0x1a, 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, 0xfd, 0xfe, 0x1a }; /* Copies an Unicode character from a MacDingbats encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_dingbats_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_mac_dingbats_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x20 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x20; safe_unicode_character = libuna_codepage_mac_dingbats_byte_stream_to_unicode_base_0x20[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacDingbats encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_dingbats_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_mac_dingbats_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 <= 0x0020 ) || ( unicode_character == 0x007f ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x2460 ) && ( unicode_character < 0x2470 ) ) { unicode_character -= 0x2460; byte_stream_value = libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2460[ unicode_character ]; } else if( ( unicode_character >= 0x2700 ) && ( unicode_character < 0x27c0 ) ) { unicode_character -= 0x2700; byte_stream_value = libuna_codepage_mac_dingbats_unicode_to_byte_stream_base_0x2700[ unicode_character ]; } else switch( unicode_character ) { case 0x2192: byte_stream_value = 0xd5; break; case 0x2194: byte_stream_value = 0xd6; break; case 0x2195: byte_stream_value = 0xd7; break; case 0x25a0: byte_stream_value = 0x6e; break; case 0x25b2: byte_stream_value = 0x73; break; case 0x25bc: byte_stream_value = 0x74; break; case 0x25c6: byte_stream_value = 0x75; break; case 0x25cf: byte_stream_value = 0x6c; break; case 0x25d7: byte_stream_value = 0x77; break; case 0x2605: byte_stream_value = 0x48; break; case 0x260e: byte_stream_value = 0x25; break; case 0x261b: byte_stream_value = 0x2a; break; case 0x261e: byte_stream_value = 0x2b; break; case 0x2660: byte_stream_value = 0xab; break; case 0x2663: byte_stream_value = 0xa8; break; case 0x2665: byte_stream_value = 0xaa; break; case 0x2666: byte_stream_value = 0xa9; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_15.c0000644000175000017500000000344714610746251022771 0ustar00lordyestalordyesta/* * ISO 8859-15 codepage (Latin 9) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_windows_936.c0000644000175000017500000151057514610746251023276 0ustar00lordyestalordyesta/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_936.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup tables for the 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 tables for the 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 Windows 936 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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 an Unicode character from a byte stream * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else if( byte_stream_character == 0x80 ) { safe_unicode_character = 0x20ac; } else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { safe_byte_stream_index += 1; additional_character = byte_stream[ safe_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: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; } } } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa3 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xa1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ additional_character ]; break; case 0xa2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ additional_character ]; break; case 0xa3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ additional_character ]; break; } } } 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: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ additional_character ]; break; case 0xa5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ additional_character ]; break; case 0xa6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ additional_character ]; break; } } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0xa0 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0xa0; safe_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; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ additional_character ]; } } else if( byte_stream_character == 0xa8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x98 ) ) { additional_character -= 0x40; safe_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; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ additional_character ]; } } else if( byte_stream_character == 0xa9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x88 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ additional_character ]; } else if( additional_character == 0x88 ) { safe_unicode_character = 0xfe6b; } else if( additional_character == 0x96 ) { safe_unicode_character = 0x3007; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ additional_character ]; } } else if( byte_stream_character == 0xaa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x7371; } } else if( byte_stream_character == 0xab ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x73f7; } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x747a; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x74f2; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x7587; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x7644; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xf7 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; case 0xc6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ additional_character ]; break; case 0xc7: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ additional_character ]; break; case 0xc8: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ additional_character ]; break; case 0xc9: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; } } } else if( byte_stream_character == 0xf8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x9d42; } } else if( byte_stream_character == 0xf9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x9da2; } } else if( byte_stream_character == 0xfa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x9e02; } } else if( byte_stream_character == 0xfb ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x9eaa; } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0x9f31; } } else if( byte_stream_character == 0xfd ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0xf9f1; } } else if( byte_stream_character == 0xfe ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x50 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ additional_character ]; } } } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } /* Copies an Unicode character to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ]; } do { byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; } while( byte_stream_value != 0 ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_croatian.h0000644000175000017500000000312014610746251023606 0ustar00lordyestalordyesta/* * MacCroatian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_CROATIAN_H ) #define _LIBUNA_CODEPAGE_MAC_CROATIAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_croatian_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 ); int libuna_codepage_mac_croatian_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 /* !defined( _LIBUNA_CODEPAGE_MAC_CROATIAN_H ) */ libesedb-20240420/libuna/libuna_scsu.h0000644000175000017500000000235314610746251020323 0ustar00lordyestalordyesta/* * Standard Compression Scheme for Unicode (SCSU) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_SCSU_H ) #define _LIBUNA_SCSU_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint32_t libuna_scsu_static_window_positions[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint32_t libuna_scsu_window_offset_table[ 256 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_SCSU_H ) */ libesedb-20240420/libuna/Makefile.am0000644000175000017500000001014114610746251017671 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBUNA AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_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_mac_arabic.c libuna_codepage_mac_arabic.h \ libuna_codepage_mac_celtic.c libuna_codepage_mac_celtic.h \ libuna_codepage_mac_centraleurroman.c libuna_codepage_mac_centraleurroman.h \ libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ libuna_codepage_mac_icelandic.c libuna_codepage_mac_icelandic.h \ libuna_codepage_mac_inuit.c libuna_codepage_mac_inuit.h \ libuna_codepage_mac_roman.c libuna_codepage_mac_roman.h \ libuna_codepage_mac_romanian.c libuna_codepage_mac_romanian.h \ libuna_codepage_mac_russian.c libuna_codepage_mac_russian.h \ libuna_codepage_mac_symbol.c libuna_codepage_mac_symbol.h \ libuna_codepage_mac_thai.c libuna_codepage_mac_thai.h \ libuna_codepage_mac_turkish.c libuna_codepage_mac_turkish.h \ libuna_codepage_mac_ukrainian.c libuna_codepage_mac_ukrainian.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_libcerror.h \ libuna_scsu.c libuna_scsu.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 DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) libesedb-20240420/libuna/libuna_utf32_stream.c0000644000175000017500000004712114610746251021661 0ustar00lordyestalordyesta/* * UTF-32 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_stream.h" /* Copies an UTF-32 stream byte order mark (BOM) * Returns 1 if successful or -1 on error */ 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 + 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 ); } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf32_stream_size = 0; size_t utf8_string_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( 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 */ safe_utf32_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf32_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_stream_index = 0; size_t utf8_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf32_stream_size = 0; size_t utf16_string_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( 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 */ safe_utf32_stream_size = 1; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf32_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; size_t utf32_stream_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf32_stream_size = 0; size_t utf32_string_index = 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_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 */ safe_utf32_stream_size = 1; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf32_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_stream_index = 0; size_t utf32_string_index = 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 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 string bytes into an 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-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 ); } if( unicode_character == 0 ) { break; } } return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_936.h0000644000175000017500000000344614610746251023274 0ustar00lordyestalordyesta/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_936_H ) #define _LIBUNA_CODEPAGE_WINDOWS_936_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 ); 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 ); 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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_936_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_10.c0000644000175000017500000000623114610746251022756 0ustar00lordyestalordyesta/* * ISO 8859-10 codepage (Nordic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_mac_roman.c0000644000175000017500000002302114610746251023117 0ustar00lordyestalordyesta/* * MacRoman codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_roman.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacRoman codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_roman_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02, 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacRoman codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8 }; const uint8_t libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x2010[ 56 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacRoman encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_roman_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_mac_roman_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_roman_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacRoman encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_roman_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_mac_roman_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2048 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_roman_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x02c6: byte_stream_value = 0xf6; break; case 0x02c7: byte_stream_value = 0xff; break; case 0x02d8: byte_stream_value = 0xf9; break; case 0x02d9: byte_stream_value = 0xfa; break; case 0x02da: byte_stream_value = 0xfb; break; case 0x02db: byte_stream_value = 0xfe; break; case 0x02dc: byte_stream_value = 0xf7; break; case 0x02dd: byte_stream_value = 0xfd; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xb9; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0xf8ff: byte_stream_value = 0xf0; break; case 0xfb01: byte_stream_value = 0xde; break; case 0xfb02: byte_stream_value = 0xdf; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_utf7_stream.h0000644000175000017500000000537014610746251021610 0ustar00lordyestalordyesta/* * UTF-7 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UTF7_STREAM_H ) #define _LIBUNA_UTF7_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_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 /* !defined( _LIBUNA_UTF7_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_3.h0000644000175000017500000000335514610746251022711 0ustar00lordyestalordyesta/* * ISO 8859-3 codepage (Latin 3) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) #define _LIBUNA_CODEPAGE_ISO_8859_3_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_thai.h0000644000175000017500000000337314610746251022745 0ustar00lordyestalordyesta/* * MacThai codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_THAI_H ) #define _LIBUNA_CODEPAGE_MAC_THAI_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_thai_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); int libuna_codepage_mac_thai_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 ); int libuna_codepage_mac_thai_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 /* !defined( _LIBUNA_CODEPAGE_MAC_THAI_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_farsi.h0000644000175000017500000000307614610746251023124 0ustar00lordyestalordyesta/* * MacFarsi codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_FARSI_H ) #define _LIBUNA_CODEPAGE_MAC_FARSI_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_farsi_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 ); int libuna_codepage_mac_farsi_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 /* !defined( _LIBUNA_CODEPAGE_MAC_FARSI_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_ukrainian.c0000644000175000017500000002160014610746251023765 0ustar00lordyestalordyesta/* * MacUkrainian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_ukrainian.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacUkrainian codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_ukrainian_byte_stream_to_unicode_base_0x80[ 128 ] = { 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, 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, 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, 0x00a4 }; /* Unicode to ASCII character lookup tables for the MacUkrainian codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xca, 0x1a, 0x1a, 0xa3, 0xff, 0x1a, 0x1a, 0xa4, 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 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, 0xdf, 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb }; const uint8_t libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacUkrainian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_ukrainian_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_mac_ukrainian_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_ukrainian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacUkrainian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_ukrainian_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_mac_ukrainian_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_ukrainian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00f7: byte_stream_value = 0xd6; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x0490: byte_stream_value = 0xa2; break; case 0x0491: byte_stream_value = 0xb6; break; case 0x2116: byte_stream_value = 0xdc; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_inuit.c0000644000175000017500000002520014610746251023134 0ustar00lordyestalordyesta/* * MacInuit codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_inuit.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacInuit codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_inuit_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x1403, 0x1404, 0x1405, 0x1406, 0x140a, 0x140b, 0x1431, 0x1432, 0x1433, 0x1434, 0x1438, 0x1439, 0x1449, 0x144e, 0x144f, 0x1450, 0x1451, 0x1455, 0x1456, 0x1466, 0x146d, 0x146e, 0x146f, 0x1470, 0x1472, 0x1473, 0x1483, 0x148b, 0x148c, 0x148d, 0x148e, 0x1490, 0x1491, 0x00b0, 0x14a1, 0x14a5, 0x14a6, 0x2022, 0x00b6, 0x14a7, 0x00ae, 0x00a9, 0x2122, 0x14a8, 0x14aa, 0x14ab, 0x14bb, 0x14c2, 0x14c3, 0x14c4, 0x14c5, 0x14c7, 0x14c8, 0x14d0, 0x14ef, 0x14f0, 0x14f1, 0x14f2, 0x14f4, 0x14f5, 0x1505, 0x14d5, 0x14d6, 0x14d7, 0x14d8, 0x14da, 0x14db, 0x14ea, 0x1528, 0x1529, 0x152a, 0x152b, 0x152d, 0x2026, 0x00a0, 0x152e, 0x153e, 0x1555, 0x1556, 0x1557, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x1558, 0x1559, 0x155a, 0x155d, 0x1546, 0x1547, 0x1548, 0x1549, 0x154b, 0x154c, 0x1550, 0x157f, 0x1580, 0x1581, 0x1582, 0x1583, 0x1584, 0x1585, 0x158f, 0x1590, 0x1591, 0x1592, 0x1593, 0x1594, 0x1595, 0x1671, 0x1672, 0x1673, 0x1674, 0x1675, 0x1676, 0x1596, 0x15a0, 0x15a1, 0x15a2, 0x15a3, 0x15a4, 0x15a5, 0x15a6, 0x157c, 0x0141, 0x0142 }; /* Unicode to ASCII character lookup tables for the MacInuit codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1430[ 216 ] = { 0x1a, 0x86, 0x87, 0x88, 0x89, 0x1a, 0x1a, 0x1a, 0x8a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, 0x8d, 0x8e, 0x8f, 0x90, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x93, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x94, 0x95, 0x96, 0x97, 0x1a, 0x98, 0x99, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x9a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x9b, 0x9c, 0x9d, 0x9e, 0x1a, 0x9f, 0xa0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa2, 0x1a, 0x1a, 0x1a, 0xa3, 0xa4, 0xa7, 0xab, 0x1a, 0xac, 0xad, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xae, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xaf, 0xb0, 0xb1, 0xb2, 0x1a, 0xb3, 0xb4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb5, 0x1a, 0x1a, 0x1a, 0x1a, 0xbd, 0xbe, 0xbf, 0xc0, 0x1a, 0xc1, 0xc2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc3, 0x1a, 0x1a, 0x1a, 0x1a, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xba, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xbc, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1528[ 56 ] = { 0xc4, 0xc5, 0xc6, 0xc7, 0x1a, 0xc8, 0xcb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0xdb, 0xdc, 0xdd, 0x1a, 0xde, 0xdf, 0x1a, 0x1a, 0x1a, 0xe0, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xce, 0xcf, 0xd6, 0xd7, 0xd8, 0x1a, 0x1a, 0xd9, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1578[ 48 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xfd, 0x1a, 0x1a, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xf5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a }; const uint8_t libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacInuit encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_inuit_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_mac_inuit_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_inuit_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacInuit encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_inuit_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_mac_inuit_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ) || ( unicode_character == 0x00a9 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x1430 ) && ( unicode_character < 0x1508 ) ) { unicode_character -= 0x1430; byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1430[ unicode_character ]; } else if( ( unicode_character >= 0x1528 ) && ( unicode_character < 0x1560 ) ) { unicode_character -= 0x1528; byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1528[ unicode_character ]; } else if( ( unicode_character >= 0x1578 ) && ( unicode_character < 0x15a8 ) ) { unicode_character -= 0x1578; byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x1578[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_inuit_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream_value = 0xca; break; case 0x00ae: byte_stream_value = 0xa8; break; case 0x00b0: byte_stream_value = 0xa1; break; case 0x00b6: byte_stream_value = 0xa6; break; case 0x0141: byte_stream_value = 0xfe; break; case 0x0142: byte_stream_value = 0xff; break; case 0x1403: byte_stream_value = 0x80; break; case 0x1404: byte_stream_value = 0x81; break; case 0x1405: byte_stream_value = 0x82; break; case 0x1406: byte_stream_value = 0x83; break; case 0x140a: byte_stream_value = 0x84; break; case 0x140b: byte_stream_value = 0x85; break; case 0x1671: byte_stream_value = 0xef; break; case 0x1672: byte_stream_value = 0xf0; break; case 0x1673: byte_stream_value = 0xf1; break; case 0x1674: byte_stream_value = 0xf2; break; case 0x1675: byte_stream_value = 0xf3; break; case 0x1676: byte_stream_value = 0xf4; break; case 0x2122: byte_stream_value = 0xaa; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_932.h0000644000175000017500000000344614610746251023270 0ustar00lordyestalordyesta/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_932_H ) #define _LIBUNA_CODEPAGE_WINDOWS_932_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 ); 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 ); 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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_932_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_874.c0000644000175000017500000001756214610746251023274 0ustar00lordyestalordyesta/* * Windows 874 codepage (Thai) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_874.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 874 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_874_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_874_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 874 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_874_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_874_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ) || ( unicode_character == 0x00a0 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0e00 ) && ( unicode_character < 0x0e60 ) ) { unicode_character -= 0x0e00; byte_stream_value = 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_value = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else switch( unicode_character ) { case 0x2013: byte_stream_value = 0x96; break; case 0x2014: byte_stream_value = 0x97; break; case 0x2022: byte_stream_value = 0x95; break; case 0x2026: byte_stream_value = 0x85; break; case 0x20ac: byte_stream_value = 0x80; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_5.c0000644000175000017500000000526214610746251022705 0ustar00lordyestalordyesta/* * ISO 8859-5 codepage (Cyrillic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_iso_8859_10.h0000644000175000017500000000266014610746251022765 0ustar00lordyestalordyesta/* * ISO 8859-10 codepage (Nordic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) #define _LIBUNA_CODEPAGE_ISO_8859_10_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ 144 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ 16 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) */ libesedb-20240420/libuna/libuna_definitions.h0000644000175000017500000004050114610746251021656 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libuna version string */ #define LIBUNA_VERSION_STRING "20240414" /* The endian definitions */ #define LIBUNA_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBUNA_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The codepage definitions */ enum LIBUNA_CODEPAGES { 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_MAC_ROMAN = 10000, LIBUNA_CODEPAGE_MAC_JAPANESE = 10001, LIBUNA_CODEPAGE_MAC_CHINESETRAD = 10002, LIBUNA_CODEPAGE_MAC_KOREAN = 10003, LIBUNA_CODEPAGE_MAC_ARABIC = 10004, LIBUNA_CODEPAGE_MAC_HEBREW = 10005, LIBUNA_CODEPAGE_MAC_GREEK = 10006, LIBUNA_CODEPAGE_MAC_RUSSIAN = 10007, LIBUNA_CODEPAGE_MAC_CHINESESIMP = 10008, LIBUNA_CODEPAGE_MAC_ROMANIAN = 10010, LIBUNA_CODEPAGE_MAC_UKRAINIAN = 10017, LIBUNA_CODEPAGE_MAC_THAI = 10021, LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN = 10029, LIBUNA_CODEPAGE_MAC_ICELANDIC = 10079, LIBUNA_CODEPAGE_MAC_TURKISH = 10081, LIBUNA_CODEPAGE_MAC_CROATIAN = 10082, LIBUNA_CODEPAGE_MAC_CYRILLIC = 11007, LIBUNA_CODEPAGE_MAC_SYMBOL = 11033, LIBUNA_CODEPAGE_MAC_DINGBATS = 11034, LIBUNA_CODEPAGE_MAC_CELTIC = 11039, LIBUNA_CODEPAGE_MAC_GAELIC = 11040, LIBUNA_CODEPAGE_MAC_FARSI = 11140, LIBUNA_CODEPAGE_MAC_INUIT = 11236, 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_UTF16_LITTLE_ENDIAN = 1200, LIBUNA_CODEPAGE_UTF16_BIG_ENDIAN = 1201, LIBUNA_CODEPAGE_UTF32_LITTLE_ENDIAN = 12000, LIBUNA_CODEPAGE_UTF32_BIG_ENDIAN = 12001, LIBUNA_CODEPAGE_UTF7 = 65000, LIBUNA_CODEPAGE_UTF8 = 65001, LIBUNA_CODEPAGE_SCSU = 65002, 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_MACOS_ROMAN LIBUNA_CODEPAGE_MAC_ROMAN #define LIBUNA_CODEPAGE_MACOS_JAPANESE LIBUNA_CODEPAGE_MAC_JAPANESE #define LIBUNA_CODEPAGE_MACOS_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_MAC_CHINESETRAD #define LIBUNA_CODEPAGE_MACOS_KOREAN LIBUNA_CODEPAGE_MAC_KOREAN #define LIBUNA_CODEPAGE_MACOS_ARABIC LIBUNA_CODEPAGE_MAC_ARABIC #define LIBUNA_CODEPAGE_MACOS_HEBREW LIBUNA_CODEPAGE_MAC_HEBREW #define LIBUNA_CODEPAGE_MACOS_GREEK LIBUNA_CODEPAGE_MAC_GREEK #define LIBUNA_CODEPAGE_MACOS_RUSSIAN LIBUNA_CODEPAGE_MAC_RUSSIAN #define LIBUNA_CODEPAGE_MACOS_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_MAC_CHINESESIMP #define LIBUNA_CODEPAGE_MACOS_ROMANIAN LIBUNA_CODEPAGE_MAC_ROMANIAN #define LIBUNA_CODEPAGE_MACOS_UKRAINIAN LIBUNA_CODEPAGE_MAC_UKRAINIAN #define LIBUNA_CODEPAGE_MACOS_THAI LIBUNA_CODEPAGE_MAC_THAI #define LIBUNA_CODEPAGE_MACOS_CENTRALEURROMAN LIBUNA_CODEPAGE_MAC_CENTRALEURROMAN #define LIBUNA_CODEPAGE_MACOS_ICELANDIC LIBUNA_CODEPAGE_MAC_ICELANDIC #define LIBUNA_CODEPAGE_MACOS_TURKISH LIBUNA_CODEPAGE_MAC_TURKISH #define LIBUNA_CODEPAGE_MACOS_CROATIAN LIBUNA_CODEPAGE_MAC_CROATIAN #define LIBUNA_CODEPAGE_MACOS_CYRILLIC LIBUNA_CODEPAGE_MAC_CYRILLIC #define LIBUNA_CODEPAGE_MACOS_SYMBOL LIBUNA_CODEPAGE_MAC_SYMBOL #define LIBUNA_CODEPAGE_MACOS_CELTIC LIBUNA_CODEPAGE_MAC_CELTIC #define LIBUNA_CODEPAGE_MACOS_GAELIC LIBUNA_CODEPAGE_MAC_GAELIC #define LIBUNA_CODEPAGE_MACOS_FARSI LIBUNA_CODEPAGE_MAC_FARSI #define LIBUNA_CODEPAGE_MACOS_INUIT LIBUNA_CODEPAGE_MAC_INUIT #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 /* The comparison function definitions */ enum LIBUNA_COMPARE_DEFINITIONS { /* The first string is less than the second string */ LIBUNA_COMPARE_LESS, /* The first and second strings are equal */ LIBUNA_COMPARE_EQUAL, /* The first string is greater than the second string */ LIBUNA_COMPARE_GREATER }; /* 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_ENCODING_BYTE_STREAM 0 #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, /* No padding */ LIBUNA_BASE64_VARIANT_PADDING_NONE = 0x01000000UL, /* Padding is optional */ LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL = 0x02000000UL, /* Padding is required */ LIBUNA_BASE64_VARIANT_PADDING_REQUIRED = 0x03000000UL, /* Invalid base64 characters are considered padding */ LIBUNA_BASE64_VARIANT_PADDING_INVALID = 0x04000000UL, 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_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_INVALID #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 }; #define LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE 0x8000 #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #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_UCS_CHARACTER_MAX 0x7fffffffUL #define LIBUNA_ASCII_REPLACEMENT_CHARACTER 0x1a /* UTF-7 definitions */ #define LIBUNA_UTF7_IS_BASE64_ENCODED 0x80000000UL #endif /* !defined( _LIBUNA_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libuna/libuna_url_stream.h0000644000175000017500000000361114610746251021521 0ustar00lordyestalordyesta/* * Percent or URL encoded stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBUNA_URL_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_icelandic.h0000644000175000017500000000312614610746251023727 0ustar00lordyestalordyesta/* * MacIcelandic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_ICELANDIC_H ) #define _LIBUNA_CODEPAGE_MAC_ICELANDIC_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_icelandic_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 ); int libuna_codepage_mac_icelandic_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 /* !defined( _LIBUNA_CODEPAGE_MAC_ICELANDIC_H ) */ libesedb-20240420/libuna/libuna_codepage_koi8_u.h0000644000175000017500000000310214610746251022364 0ustar00lordyestalordyesta/* * KOI8-U codepage (Ukrainian Cyrillic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) #define _LIBUNA_CODEPAGE_KOI8_U_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_koi8_u_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 ); int libuna_codepage_koi8_u_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 /* !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) */ libesedb-20240420/libuna/libuna_utf16_stream.c0000644000175000017500000004661214610746251021667 0ustar00lordyestalordyesta/* * UTF-16 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_stream.h" /* Copies an UTF-16 stream byte order mark (BOM) * Returns 1 if successful or -1 on error */ 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 + 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 ); } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf16_stream_size = 0; size_t utf8_string_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( 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 */ safe_utf16_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf16_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; size_t utf8_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf16_stream_size = 0; size_t utf16_string_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( 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 */ safe_utf16_stream_size = 1; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf16_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; size_t utf16_string_index = 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 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into an 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-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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t safe_utf16_stream_size = 0; size_t utf32_string_index = 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 */ safe_utf16_stream_size += 1; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into an 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, &safe_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 ); } if( unicode_character == 0 ) { break; } } /* Convert the number of characters into bytes */ *utf16_stream_size = safe_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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; size_t utf32_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1253.c0000644000175000017500000002063214610746251023334 0ustar00lordyestalordyesta/* * Windows 1253 codepage (Greek) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1253.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1253 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1253_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_1253_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1253 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1253_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_1253_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = 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_value = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0192: byte_stream_value = 0x83; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_4.h0000644000175000017500000000265114610746251022710 0ustar00lordyestalordyesta/* * ISO 8859-4 codepage (Baltic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) #define _LIBUNA_CODEPAGE_ISO_8859_4_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ 184 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_greek.c0000644000175000017500000002156614610746251023114 0ustar00lordyestalordyesta/* * MacGreek codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_greek.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacGreek codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_greek_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00b9, 0x00b2, 0x00c9, 0x00b3, 0x00d6, 0x00dc, 0x0385, 0x00e0, 0x00e2, 0x00e4, 0x0384, 0x00a8, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00a3, 0x2122, 0x00ee, 0x00ef, 0x2022, 0x00bd, 0x2030, 0x00f4, 0x00f6, 0x00a6, 0x20ac, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x0393, 0x0394, 0x0398, 0x039b, 0x039e, 0x03a0, 0x00df, 0x00ae, 0x00a9, 0x03a3, 0x03aa, 0x00a7, 0x2260, 0x00b0, 0x00b7, 0x0391, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x0392, 0x0395, 0x0396, 0x0397, 0x0399, 0x039a, 0x039c, 0x03a6, 0x03ab, 0x03a8, 0x03a9, 0x03ac, 0x039d, 0x00ac, 0x039f, 0x03a1, 0x2248, 0x03a4, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x03a5, 0x03a7, 0x0386, 0x0388, 0x0153, 0x2013, 0x2015, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x0389, 0x038a, 0x038c, 0x038e, 0x03ad, 0x03ae, 0x03af, 0x03cc, 0x038f, 0x03cd, 0x03b1, 0x03b2, 0x03c8, 0x03b4, 0x03b5, 0x03c6, 0x03b3, 0x03b7, 0x03b9, 0x03be, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf, 0x03c0, 0x03ce, 0x03c1, 0x03c3, 0x03c4, 0x03b8, 0x03c9, 0x03c2, 0x03c7, 0x03c5, 0x03b6, 0x03ca, 0x03cb, 0x0390, 0x03b0, 0x00ad }; /* Unicode to ASCII character lookup tables for the MacGreek codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xca, 0x1a, 0x1a, 0x92, 0x1a, 0xb4, 0x9b, 0xac, 0x8c, 0xa9, 0x1a, 0xc7, 0xc2, 0xff, 0xa8, 0x1a, 0xae, 0xb1, 0x82, 0x84, 0x1a, 0x1a, 0x1a, 0xaf, 0x1a, 0x81, 0x1a, 0xc8, 0x1a, 0x97, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x1a, 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0xa7, 0x88, 0x1a, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x1a, 0x94, 0x95, 0x1a, 0x1a, 0x1a, 0x1a, 0x99, 0x1a, 0x9a, 0xd6, 0x1a, 0x9d, 0x1a, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x0380[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x87, 0xcd, 0x1a, 0xce, 0xd7, 0xd8, 0x1a, 0xd9, 0x1a, 0xda, 0xdf, 0xfd, 0xb0, 0xb5, 0xa1, 0xa2, 0xb6, 0xb7, 0xb8, 0xa3, 0xb9, 0xba, 0xa4, 0xbb, 0xc1, 0xa5, 0xc3, 0xa6, 0xc4, 0x1a, 0xaa, 0xc6, 0xcb, 0xbc, 0xcc, 0xbe, 0xbf, 0xab, 0xbd, 0xc0, 0xdb, 0xdc, 0xdd, 0xfe, 0xe1, 0xe2, 0xe7, 0xe4, 0xe5, 0xfa, 0xe8, 0xf5, 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xea, 0xef, 0xf0, 0xf2, 0xf7, 0xf3, 0xf4, 0xf9, 0xe6, 0xf8, 0xe3, 0xf6, 0xfb, 0xfc, 0xde, 0xe0, 0xf1, 0x1a }; const uint8_t libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x2010[ 40 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0x1a, 0xd1, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, 0xa0, 0x1a, 0x96, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x98, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacGreek encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_greek_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_mac_greek_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_greek_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacGreek encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_greek_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_mac_greek_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x03d0 ) ) { unicode_character -= 0x0380; byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2038 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_greek_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0153: byte_stream_value = 0xcf; break; case 0x20ac: byte_stream_value = 0x9c; break; case 0x2122: byte_stream_value = 0x93; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_libcerror.h0000644000175000017500000000263014610746251021327 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBUNA_LIBCERROR_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_centraleurroman.c0000644000175000017500000002226214610746251025212 0ustar00lordyestalordyesta/* * MacCentralEurRoman codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_centraleurroman.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacCentralEurRoman codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_centraleurroman_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x0100, 0x0101, 0x00c9, 0x0104, 0x00d6, 0x00dc, 0x00e1, 0x0105, 0x010c, 0x00e4, 0x010d, 0x0106, 0x0107, 0x00e9, 0x0179, 0x017a, 0x010e, 0x00ed, 0x010f, 0x0112, 0x0113, 0x0116, 0x00f3, 0x0117, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x011a, 0x011b, 0x00fc, 0x2020, 0x00b0, 0x0118, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x0119, 0x00a8, 0x2260, 0x0123, 0x012e, 0x012f, 0x012a, 0x2264, 0x2265, 0x012b, 0x0136, 0x2202, 0x2211, 0x0142, 0x013b, 0x013c, 0x013d, 0x013e, 0x0139, 0x013a, 0x0145, 0x0146, 0x0143, 0x00ac, 0x221a, 0x0144, 0x0147, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x0148, 0x0150, 0x00d5, 0x0151, 0x014c, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x014d, 0x0154, 0x0155, 0x0158, 0x2039, 0x203a, 0x0159, 0x0156, 0x0157, 0x0160, 0x201a, 0x201e, 0x0161, 0x015a, 0x015b, 0x00c1, 0x0164, 0x0165, 0x00cd, 0x017d, 0x017e, 0x016a, 0x00d3, 0x00d4, 0x016b, 0x016e, 0x00da, 0x016f, 0x0170, 0x0171, 0x0172, 0x0173, 0x00dd, 0x00fd, 0x0137, 0x017b, 0x0141, 0x017c, 0x0122, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacCentralEurRoman codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x00a0[ 224 ] = { 0xca, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, 0xac, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, 0xa1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe7, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x1a, 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0xea, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0x1a, 0x1a, 0xf2, 0x1a, 0x86, 0xf8, 0x1a, 0xa7, 0x1a, 0x87, 0x1a, 0x1a, 0x8a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8e, 0x1a, 0x1a, 0x1a, 0x92, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0x1a, 0x1a, 0x9c, 0x1a, 0x9f, 0xf9, 0x1a, 0x1a, 0x81, 0x82, 0x1a, 0x1a, 0x84, 0x88, 0x8c, 0x8d, 0x1a, 0x1a, 0x1a, 0x1a, 0x89, 0x8b, 0x91, 0x93, 0x1a, 0x1a, 0x94, 0x95, 0x1a, 0x1a, 0x96, 0x98, 0xa2, 0xab, 0x9d, 0x9e, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xfe, 0xae, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb1, 0xb4, 0x1a, 0x1a, 0xaf, 0xb0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb5, 0xfa, 0x1a, 0xbd, 0xbe, 0xb9, 0xba, 0xbb, 0xbc, 0x1a, 0x1a, 0xfc, 0xb8, 0xc1, 0xc4, 0xbf, 0xc0, 0xc5, 0xcb, 0x1a, 0x1a, 0x1a, 0xcf, 0xd8, 0x1a, 0x1a, 0xcc, 0xce, 0x1a, 0x1a, 0xd9, 0xda, 0xdf, 0xe0, 0xdb, 0xde, 0xe5, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xe1, 0xe4, 0x1a, 0x1a, 0xe8, 0xe9, 0x1a, 0x1a, 0x1a, 0x1a, 0xed, 0xf0, 0x1a, 0x1a, 0xf1, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8f, 0x90, 0xfb, 0xfd, 0xeb, 0xec, 0x1a }; const uint8_t libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacCentralEurRoman encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_centraleurroman_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_mac_centraleurroman_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_centraleurroman_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacCentralEurRoman encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_centraleurroman_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_mac_centraleurroman_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_centraleurroman_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream_value = 0xff; break; case 0x2039: byte_stream_value = 0xdc; break; case 0x203a: byte_stream_value = 0xdd; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1254.c0000644000175000017500000002144514610746251023340 0ustar00lordyestalordyesta/* * Windows 1254 codepage (Turkish) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1254.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup tables for the 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 tables for the 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, }; /* Copies an Unicode character from a Windows 1254 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1254_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_1254_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else if( byte_stream_character < 0xa0 ) { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } else if( byte_stream_character < 0xd0 ) { safe_unicode_character = byte_stream_character; } else if( byte_stream_character < 0xe0 ) { byte_stream_character -= 0xd0; safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } else if( byte_stream_character < 0xf0 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0xf0; safe_unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1254 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1254_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_1254_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00d0 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream_value = 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_value = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream_value = 0xd0; break; case 0x011f: byte_stream_value = 0xf0; break; case 0x0130: byte_stream_value = 0xdd; break; case 0x0131: byte_stream_value = 0xfd; break; case 0x0152: byte_stream_value = 0x8c; break; case 0x0153: byte_stream_value = 0x9c; break; case 0x015e: byte_stream_value = 0xde; break; case 0x015f: byte_stream_value = 0xfe; break; case 0x0160: byte_stream_value = 0x8a; break; case 0x0161: byte_stream_value = 0x9a; break; case 0x0178: byte_stream_value = 0x9f; break; case 0x0192: byte_stream_value = 0x83; break; case 0x02c6: byte_stream_value = 0x88; break; case 0x02dc: byte_stream_value = 0x98; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_13.h0000644000175000017500000000265714610746251022776 0ustar00lordyestalordyesta/* * ISO 8859-13 codepage (Baltic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) #define _LIBUNA_CODEPAGE_ISO_8859_13_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ 224 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_7.h0000644000175000017500000000264714610746251022720 0ustar00lordyestalordyesta/* * ISO 8859-7 codepage (Greek) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) #define _LIBUNA_CODEPAGE_ISO_8859_7_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ 24 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ 80 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1255.h0000644000175000017500000000313214610746251023337 0ustar00lordyestalordyesta/* * Windows 1255 codepage (Hebrew) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1255_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1255_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 ); int libuna_codepage_windows_1255_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) */ libesedb-20240420/libuna/libuna_unicode_character.h0000644000175000017500000001750014610746251023010 0ustar00lordyestalordyesta/* * Unicode character functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UNICODE_CHARACTER_H ) #define _LIBUNA_UNICODE_CHARACTER_H #include #include #include "libuna_definitions.h" #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ 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 \ 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 \ 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 \ int libuna_unicode_character_size_to_ucs2( libuna_unicode_character_t unicode_character, size_t *ucs2_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_copy_from_ucs2( libuna_unicode_character_t *unicode_character, const libuna_utf16_character_t *ucs2_string, size_t ucs2_string_size, size_t *ucs2_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_copy_to_ucs2( libuna_unicode_character_t unicode_character, libuna_utf16_character_t *ucs2_string, size_t ucs2_string_size, size_t *ucs2_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_size_to_ucs4( libuna_unicode_character_t unicode_character, size_t *ucs4_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_copy_from_ucs4( libuna_unicode_character_t *unicode_character, const libuna_utf32_character_t *ucs4_string, size_t ucs4_string_size, size_t *ucs4_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_copy_to_ucs4( libuna_unicode_character_t unicode_character, libuna_utf32_character_t *ucs4_string, size_t ucs4_string_size, size_t *ucs4_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 \ 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 \ 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 \ int libuna_unicode_character_size_to_utf8( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 \ 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 \ int libuna_unicode_character_size_to_utf8_rfc2279( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_unicode_character_copy_from_utf8_rfc2279( 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 \ int libuna_unicode_character_copy_to_utf8_rfc2279( 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 \ int libuna_unicode_character_size_to_utf16( libuna_unicode_character_t unicode_character, size_t *utf16_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 \ 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 \ 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 \ 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 \ int libuna_unicode_character_size_to_utf32( libuna_unicode_character_t unicode_character, size_t *utf32_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ 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 \ 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 \ 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 \ 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 /* !defined( _LIBUNA_UNICODE_CHARACTER_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_8.h0000644000175000017500000000265014610746251022713 0ustar00lordyestalordyesta/* * ISO 8859-8 codepage (Hebrew) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) #define _LIBUNA_CODEPAGE_ISO_8859_8_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ 32 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ 32 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_13.c0000644000175000017500000000712014610746251022757 0ustar00lordyestalordyesta/* * ISO 8859-13 codepage (Baltic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_windows_949.h0000644000175000017500000000343214610746251023273 0ustar00lordyestalordyesta/* * Windows 949 codepage (Korean) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_949_H ) #define _LIBUNA_CODEPAGE_WINDOWS_949_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 ); 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 ); 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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_949_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_cyrillic.c0000644000175000017500000002164514610746251023627 0ustar00lordyestalordyesta/* * MacCyrillic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_cyrillic.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacCyrillic codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_cyrillic_byte_stream_to_unicode_base_0x80[ 128 ] = { 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, 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, 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, 0x20ac }; /* Unicode to ASCII character lookup tables for the MacCyrillic codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xca, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 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, 0xdf, 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb }; const uint8_t libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacCyrillic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_cyrillic_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_mac_cyrillic_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_cyrillic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacCyrillic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_cyrillic_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_mac_cyrillic_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_cyrillic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00f7: byte_stream_value = 0xd6; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x0490: byte_stream_value = 0xa2; break; case 0x0491: byte_stream_value = 0xb6; break; case 0x20ac: byte_stream_value = 0xff; break; case 0x2116: byte_stream_value = 0xdc; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_celtic.c0000644000175000017500000002321714610746251023255 0ustar00lordyestalordyesta/* * MacCeltic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_celtic.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacCeltic codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_celtic_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x00ff, 0x0178, 0x2044, 0x20ac, 0x2039, 0x203a, 0x0176, 0x0177, 0x2021, 0x00b7, 0x1ef2, 0x1ef3, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x2663, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x00dd, 0x00fd, 0x0174, 0x0175, 0x1e84, 0x1e85, 0x1e80, 0x1e81, 0x1e82, 0x1e83 }; /* Unicode to ASCII character lookup tables for the MacCeltic codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0x1a, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xf6, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xf7, 0x1a, 0xd8 }; const uint8_t libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x2010[ 56 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0x1a, 0x1a, 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacCeltic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_celtic_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_mac_celtic_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_celtic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacCeltic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_celtic_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_mac_celtic_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2048 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_celtic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0174: byte_stream_value = 0xf8; break; case 0x0175: byte_stream_value = 0xf9; break; case 0x0176: byte_stream_value = 0xde; break; case 0x0177: byte_stream_value = 0xdf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xb9; break; case 0x1e80: byte_stream_value = 0xfc; break; case 0x1e81: byte_stream_value = 0xfd; break; case 0x1e82: byte_stream_value = 0xfe; break; case 0x1e83: byte_stream_value = 0xff; break; case 0x1e84: byte_stream_value = 0xfa; break; case 0x1e85: byte_stream_value = 0xfb; break; case 0x1ef2: byte_stream_value = 0xe2; break; case 0x1ef3: byte_stream_value = 0xe3; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0x2663: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_support.h0000644000175000017500000000232214610746251021056 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBUNA_SUPPORT_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_4.c0000644000175000017500000000675114610746251022710 0ustar00lordyestalordyesta/* * ISO 8859-4 codepage (Baltic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_windows_949.c0000644000175000017500000166263214610746251023304 0ustar00lordyestalordyesta/* * Windows 949 codepage (Korean) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_949.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup tables for the 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 tables for the 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 Windows 949 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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 < 0xfa0c ) ) { 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 an Unicode character from a byte stream * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { safe_byte_stream_index += 1; additional_character = byte_stream[ safe_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: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; case 0xa1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; } } } else if( byte_stream_character == 0xa2 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ additional_character ]; } } else if( ( byte_stream_character >= 0xa3 ) && ( byte_stream_character <= 0xa4 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ additional_character ]; break; case 0xa4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; } } } else if( byte_stream_character == 0xa5 ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ additional_character ]; } } else if( byte_stream_character == 0xa6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ additional_character ]; } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ additional_character ]; } } else if( ( byte_stream_character >= 0xa8 ) && ( byte_stream_character <= 0xa9 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; } } } 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: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; } } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0x40; safe_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; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ additional_character ]; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0xcdc5; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0xce2b; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { safe_unicode_character = 0xce99; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xc5 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x58 ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else if( additional_character >= 0xa0 ) { additional_character -= 0xa0; safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ additional_character ]; } } else if( ( byte_stream_character >= 0xc7 ) && ( byte_stream_character <= 0xc8 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xc7: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ additional_character ]; break; case 0xc8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ additional_character ]; break; } } } else if( ( byte_stream_character >= 0xca ) && ( byte_stream_character <= 0xfd ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xca: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ additional_character ]; break; case 0xcb: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ additional_character ]; break; case 0xcc: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ additional_character ]; break; case 0xcd: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ additional_character ]; break; case 0xce: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ additional_character ]; break; case 0xcf: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ additional_character ]; break; case 0xd0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ additional_character ]; break; case 0xd1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ additional_character ]; break; case 0xd2: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ additional_character ]; break; case 0xd3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ additional_character ]; break; case 0xd4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ additional_character ]; break; case 0xd5: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ additional_character ]; break; case 0xd6: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ additional_character ]; break; case 0xd7: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ additional_character ]; break; case 0xd8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ additional_character ]; break; case 0xd9: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ additional_character ]; break; case 0xda: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ additional_character ]; break; case 0xdb: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ additional_character ]; break; case 0xdc: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ additional_character ]; break; case 0xdd: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ additional_character ]; break; case 0xde: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ additional_character ]; break; case 0xdf: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ additional_character ]; break; case 0xe0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ additional_character ]; break; case 0xe1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ additional_character ]; break; case 0xe2: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ additional_character ]; break; case 0xe3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ additional_character ]; break; case 0xe4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ additional_character ]; break; case 0xe5: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ additional_character ]; break; case 0xe6: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ additional_character ]; break; case 0xe7: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ additional_character ]; break; case 0xe8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ additional_character ]; break; case 0xe9: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ additional_character ]; break; case 0xea: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ additional_character ]; break; case 0xeb: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ additional_character ]; break; case 0xec: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ additional_character ]; break; case 0xed: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ additional_character ]; break; case 0xee: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ additional_character ]; break; case 0xef: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ additional_character ]; break; case 0xf0: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ additional_character ]; break; case 0xf1: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ additional_character ]; break; case 0xf2: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ additional_character ]; break; case 0xf3: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ additional_character ]; break; case 0xf4: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ additional_character ]; break; case 0xf5: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ additional_character ]; break; case 0xf6: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ additional_character ]; break; case 0xf7: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ additional_character ]; break; case 0xf8: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ additional_character ]; break; case 0xf9: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ additional_character ]; break; case 0xfa: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ additional_character ]; break; case 0xfb: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ additional_character ]; break; case 0xfc: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ additional_character ]; break; case 0xfd: safe_unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ additional_character ]; break; } } } } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } /* Copies an Unicode character to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 < 0xfa0c ) ) { 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 ]; } do { byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; } while( byte_stream_value != 0 ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_utf16_stream.h0000644000175000017500000000604214610746251021665 0ustar00lordyestalordyesta/* * UTF-16 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UTF16_STREAM_H ) #define _LIBUNA_UTF16_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_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 /* !defined( _LIBUNA_UTF16_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_symbol.c0000644000175000017500000003330414610746251023315 0ustar00lordyestalordyesta/* * MacSymbol codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_symbol.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacSymbol codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_symbol_byte_stream_to_unicode_base_0x20[ 224 ] = { 0x0020, 0x0021, 0x2200, 0x0023, 0x2203, 0x0025, 0x0026, 0x220d, 0x0028, 0x0029, 0x2217, 0x002b, 0x002c, 0x2212, 0x002e, 0x002f, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, 0x2245, 0x0391, 0x0392, 0x03a7, 0x0394, 0x0395, 0x03a6, 0x0393, 0x0397, 0x0399, 0x03d1, 0x039a, 0x039b, 0x039c, 0x039d, 0x039f, 0x03a0, 0x0398, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03c2, 0x03a9, 0x039e, 0x03a8, 0x0396, 0x005b, 0x2234, 0x005d, 0x22a5, 0x005f, 0xf8e5, 0x03b1, 0x03b2, 0x03c7, 0x03b4, 0x03b5, 0x03c6, 0x03b3, 0x03b7, 0x03b9, 0x03d5, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf, 0x03c0, 0x03b8, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03d6, 0x03c9, 0x03be, 0x03c8, 0x03b6, 0x007b, 0x007c, 0x007d, 0x223c, 0x007f, 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, 0x20ac, 0x03d2, 0x2032, 0x2264, 0x2044, 0x221e, 0x0192, 0x2663, 0x2666, 0x2665, 0x2660, 0x2194, 0x2190, 0x2191, 0x2192, 0x2193, 0x00b0, 0x00b1, 0x2033, 0x2265, 0x00d7, 0x221d, 0x2202, 0x2022, 0x00f7, 0x2260, 0x2261, 0x2248, 0x2026, 0x23d0, 0x23af, 0x21b5, 0x2135, 0x2111, 0x211c, 0x2118, 0x2297, 0x2295, 0x2205, 0x2229, 0x222a, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208, 0x2209, 0x2220, 0x2207, 0x00ae, 0x00a9, 0x2122, 0x220f, 0x221a, 0x22c5, 0x00ac, 0x2227, 0x2228, 0x21d4, 0x21d0, 0x21d1, 0x21d2, 0x21d3, 0x25ca, 0x3008, 0x00ae, 0x00a9, 0x2122, 0x2211, 0x239b, 0x239c, 0x239d, 0x23a1, 0x23a2, 0x23a3, 0x23a7, 0x23a8, 0x23a9, 0x23aa, 0xf8ff, 0x3009, 0x222b, 0x2320, 0x23ae, 0x2321, 0x239e, 0x239f, 0x23a0, 0x23a4, 0x23a5, 0x23a6, 0x23ab, 0x23ac, 0x23ad, 0xfffd }; /* Unicode to ASCII character lookup tables for the MacSymbol codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x0390[ 72 ] = { 0x1a, 0x41, 0x42, 0x47, 0x44, 0x45, 0x5a, 0x48, 0x51, 0x49, 0x4b, 0x4c, 0x4d, 0x4e, 0x58, 0x4f, 0x50, 0x52, 0x1a, 0x53, 0x54, 0x55, 0x46, 0x43, 0x59, 0x57, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x61, 0x62, 0x67, 0x64, 0x65, 0x7a, 0x68, 0x71, 0x69, 0x6b, 0x6c, 0x6d, 0x6e, 0x78, 0x6f, 0x70, 0x72, 0x56, 0x73, 0x74, 0x75, 0x66, 0x63, 0x79, 0x77, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x4a, 0xa1, 0x1a, 0x1a, 0x6a, 0x76, 0x1a }; const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2200[ 80 ] = { 0x22, 0x1a, 0xb6, 0x24, 0x1a, 0xc6, 0x1a, 0xd1, 0xce, 0xcf, 0x1a, 0x1a, 0x1a, 0x27, 0x1a, 0xd5, 0x1a, 0xe5, 0x2d, 0x1a, 0x1a, 0x1a, 0x1a, 0x2a, 0x1a, 0x1a, 0xd6, 0x1a, 0x1a, 0xb5, 0xa5, 0x1a, 0xd0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xda, 0xc7, 0xc8, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x5c, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x7e, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x40, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2280[ 40 ] = { 0x1a, 0x1a, 0xcc, 0xc9, 0xcb, 0x1a, 0xcd, 0xca, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc5, 0x1a, 0xc4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x5e, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2398[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xe6, 0xe7, 0xe8, 0xf6, 0xf7, 0xf8, 0xe9, 0xea, 0xeb, 0xf9, 0xfa, 0xfb, 0xec, 0xed, 0xee, 0xef, 0xfc, 0xfd, 0xfe, 0xf4, 0xbe }; /* Determines the size of a MacSymbol encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ int libuna_codepage_mac_symbol_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_mac_symbol_unicode_character_size_to_byte_stream"; int result = 0; 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( unicode_character ) { case 0x000000aeUL: case 0x000000a9UL: case 0x00002122UL: result = 0; break; default: *byte_stream_character_size += 1; result = 1; break; } return( result ); } /* Copies an Unicode character from a MacSymbol encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_symbol_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_mac_symbol_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x20 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x20; safe_unicode_character = libuna_codepage_mac_symbol_byte_stream_to_unicode_base_0x20[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacSymbol encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_symbol_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_mac_symbol_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 <= 0x0021 ) || ( unicode_character == 0x0023 ) || ( unicode_character == 0x0025 ) || ( unicode_character == 0x0026 ) || ( unicode_character == 0x0028 ) || ( unicode_character == 0x0029 ) || ( unicode_character == 0x002b ) || ( unicode_character == 0x002c ) || ( ( unicode_character >= 0x002e ) && ( unicode_character <= 0x003f ) ) || ( unicode_character == 0x005b ) || ( unicode_character == 0x005d ) || ( unicode_character == 0x005f ) || ( unicode_character == 0x007b ) || ( unicode_character == 0x007c ) || ( unicode_character == 0x007d ) || ( unicode_character == 0x007f ) || ( unicode_character == 0x00b0 ) || ( unicode_character == 0x00b1 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0390 ) && ( unicode_character < 0x03d8 ) ) { unicode_character -= 0x0390; byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x0390[ unicode_character ]; } else if( ( unicode_character >= 0x2200 ) && ( unicode_character < 0x2250 ) ) { unicode_character -= 0x2200; byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2200[ unicode_character ]; } else if( ( unicode_character >= 0x2280 ) && ( unicode_character < 0x22a8 ) ) { unicode_character -= 0x2280; byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2280[ unicode_character ]; } else if( ( unicode_character >= 0x2398 ) && ( unicode_character < 0x23b0 ) ) { unicode_character -= 0x2398; byte_stream_value = libuna_codepage_mac_symbol_unicode_to_byte_stream_base_0x2398[ unicode_character ]; } else switch( unicode_character ) { case 0x00a9: byte_stream_value = 0xd3; break; case 0x00ac: byte_stream_value = 0xd8; break; case 0x00ae: byte_stream_value = 0xd2; break; case 0x00d7: byte_stream_value = 0xb4; break; case 0x00f7: byte_stream_value = 0xb8; break; case 0x0192: byte_stream_value = 0xa6; break; case 0x2022: byte_stream_value = 0xb7; break; case 0x2026: byte_stream_value = 0xbc; break; case 0x2032: byte_stream_value = 0xa2; break; case 0x2033: byte_stream_value = 0xb2; break; case 0x2044: byte_stream_value = 0xa4; break; case 0x20ac: byte_stream_value = 0xa0; break; case 0x2111: byte_stream_value = 0xc1; break; case 0x2118: byte_stream_value = 0xc3; break; case 0x211c: byte_stream_value = 0xc2; break; case 0x2122: byte_stream_value = 0xd4; break; case 0x2135: byte_stream_value = 0xc0; break; case 0x2190: byte_stream_value = 0xac; break; case 0x2191: byte_stream_value = 0xad; break; case 0x2192: byte_stream_value = 0xae; break; case 0x2193: byte_stream_value = 0xaf; break; case 0x2194: byte_stream_value = 0xab; break; case 0x21b5: byte_stream_value = 0xbf; break; case 0x21d0: byte_stream_value = 0xdc; break; case 0x21d1: byte_stream_value = 0xdd; break; case 0x21d2: byte_stream_value = 0xde; break; case 0x21d3: byte_stream_value = 0xdf; break; case 0x21d4: byte_stream_value = 0xdb; break; case 0x2260: byte_stream_value = 0xb9; break; case 0x2261: byte_stream_value = 0xba; break; case 0x2264: byte_stream_value = 0xa3; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x22c5: byte_stream_value = 0xd7; break; case 0x2320: byte_stream_value = 0xf3; break; case 0x2321: byte_stream_value = 0xf5; break; case 0x23d0: byte_stream_value = 0xbd; break; case 0x25ca: byte_stream_value = 0xe0; break; case 0x2660: byte_stream_value = 0xaa; break; case 0x2663: byte_stream_value = 0xa7; break; case 0x2665: byte_stream_value = 0xa9; break; case 0x2666: byte_stream_value = 0xa8; break; case 0x3008: byte_stream_value = 0xe1; break; case 0x3009: byte_stream_value = 0xf1; break; case 0xf8e5: byte_stream_value = 0x60; break; case 0xf8ff: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_roman.h0000644000175000017500000000307614610746251023134 0ustar00lordyestalordyesta/* * MacRoman codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_ROMAN_H ) #define _LIBUNA_CODEPAGE_MAC_ROMAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_roman_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 ); int libuna_codepage_mac_roman_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 /* !defined( _LIBUNA_CODEPAGE_MAC_ROMAN_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1257.c0000644000175000017500000002156414610746251023345 0ustar00lordyestalordyesta/* * Windows 1257 codepage (Baltic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1257.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1257 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1257_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_1257_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1257 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1257_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_1257_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream_value = 0x8e; break; case 0x02d9: byte_stream_value = 0xff; break; case 0x02db: byte_stream_value = 0x9e; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1254.h0000644000175000017500000000313314610746251023337 0ustar00lordyestalordyesta/* * Windows 1254 codepage (Turkish) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1254_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1254_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 ); int libuna_codepage_windows_1254_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_950.c0000644000175000017500000130040614610746251023260 0ustar00lordyestalordyesta/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_950.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup tables for the 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 tables for the 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 Windows 950 encoded byte stream from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful, 0 if the byte stream character is valid but not supported since it requires special handling or -1 on error */ 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 an Unicode character from a byte stream * Returns 1 if successful or -1 on error */ 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"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else if( ( safe_byte_stream_index + 1 ) <= byte_stream_size ) { safe_byte_stream_index += 1; additional_character = byte_stream[ safe_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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; case 0xa2: safe_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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ additional_character ]; break; case 0xa2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ additional_character ]; break; } } } else if( byte_stream_character == 0xa3 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; safe_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; safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ additional_character ]; } else if( additional_character == 0xe1 ) { safe_unicode_character = 0x20ac; } } 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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; case 0xa5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ additional_character ]; break; case 0xa6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ additional_character ]; break; case 0xa7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ additional_character ]; break; case 0xa8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; case 0xaa: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; case 0xac: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ additional_character ]; break; case 0xad: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ additional_character ]; break; case 0xae: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ additional_character ]; break; case 0xaf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ additional_character ]; break; case 0xb0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: safe_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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ additional_character ]; break; case 0xa5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ additional_character ]; break; case 0xa6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ additional_character ]; break; case 0xa7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ additional_character ]; break; case 0xa8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ additional_character ]; break; case 0xa9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ additional_character ]; break; case 0xaa: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ additional_character ]; break; case 0xab: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ additional_character ]; break; case 0xac: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ additional_character ]; break; case 0xad: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ additional_character ]; break; case 0xae: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ additional_character ]; break; case 0xaf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ additional_character ]; break; case 0xb0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ additional_character ]; break; case 0xb1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ additional_character ]; break; case 0xb2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ additional_character ]; break; case 0xb3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ additional_character ]; break; case 0xb4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ additional_character ]; break; case 0xb5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ additional_character ]; break; case 0xb6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ additional_character ]; break; case 0xb7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ additional_character ]; break; case 0xb8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ additional_character ]; break; case 0xb9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ additional_character ]; break; case 0xba: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ additional_character ]; break; case 0xbb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ additional_character ]; break; case 0xbc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ additional_character ]; break; case 0xbd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ additional_character ]; break; case 0xbe: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ additional_character ]; break; case 0xbf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ additional_character ]; break; case 0xc0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ additional_character ]; break; case 0xc1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ additional_character ]; break; case 0xc2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ additional_character ]; break; case 0xc3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ additional_character ]; break; case 0xc4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ additional_character ]; break; case 0xc5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ additional_character ]; break; } } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ additional_character ]; } } 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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; case 0xf8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ additional_character ]; break; case 0xf9: safe_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: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ additional_character ]; break; case 0xca: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ additional_character ]; break; case 0xcb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ additional_character ]; break; case 0xcc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ additional_character ]; break; case 0xcd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ additional_character ]; break; case 0xce: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ additional_character ]; break; case 0xcf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ additional_character ]; break; case 0xd0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ additional_character ]; break; case 0xd1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ additional_character ]; break; case 0xd2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ additional_character ]; break; case 0xd3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ additional_character ]; break; case 0xd4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ additional_character ]; break; case 0xd5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ additional_character ]; break; case 0xd6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ additional_character ]; break; case 0xd7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ additional_character ]; break; case 0xd8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ additional_character ]; break; case 0xd9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ additional_character ]; break; case 0xda: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ additional_character ]; break; case 0xdb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ additional_character ]; break; case 0xdc: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ additional_character ]; break; case 0xdd: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ additional_character ]; break; case 0xde: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ additional_character ]; break; case 0xdf: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ additional_character ]; break; case 0xe0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ additional_character ]; break; case 0xe1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ additional_character ]; break; case 0xe2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ additional_character ]; break; case 0xe3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ additional_character ]; break; case 0xe4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ additional_character ]; break; case 0xe5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ additional_character ]; break; case 0xe6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ additional_character ]; break; case 0xe7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ additional_character ]; break; case 0xe8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ additional_character ]; break; case 0xe9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ additional_character ]; break; case 0xea: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ additional_character ]; break; case 0xeb: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ additional_character ]; break; case 0xec: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ additional_character ]; break; case 0xed: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ additional_character ]; break; case 0xee: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ additional_character ]; break; case 0xef: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ additional_character ]; break; case 0xf0: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ additional_character ]; break; case 0xf1: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ additional_character ]; break; case 0xf2: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ additional_character ]; break; case 0xf3: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ additional_character ]; break; case 0xf4: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ additional_character ]; break; case 0xf5: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ additional_character ]; break; case 0xf6: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ additional_character ]; break; case 0xf7: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ additional_character ]; break; case 0xf8: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ additional_character ]; break; case 0xf9: safe_unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ additional_character ]; break; } } } } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index + 1; return( 1 ); } /* Copies an Unicode character to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 ]; } do { byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; } while( byte_stream_value != 0 ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_extern.h0000644000175000017500000000252314610746251020652 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBUNA_EXTERN_VARIABLE extern #else #define LIBUNA_EXTERN_VARIABLE LIBUNA_EXTERN #endif #else #define LIBUNA_EXTERN /* extern */ #define LIBUNA_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBUNA_INTERNAL_EXTERN_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1256.c0000644000175000017500000002342514610746251023342 0ustar00lordyestalordyesta/* * Windows 1256 codepage (Arabic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1256.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1256 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1256_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_1256_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1256 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1256_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_1256_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = 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_value = 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_value = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream_value = 0xd7; break; case 0x0152: byte_stream_value = 0x8c; break; case 0x0153: byte_stream_value = 0x9c; break; case 0x0192: byte_stream_value = 0x83; break; case 0x02c6: byte_stream_value = 0x88; break; case 0x060c: byte_stream_value = 0xa1; break; case 0x0679: byte_stream_value = 0x8a; break; case 0x067e: byte_stream_value = 0x81; break; case 0x0686: byte_stream_value = 0x8d; break; case 0x0688: byte_stream_value = 0x8f; break; case 0x0691: byte_stream_value = 0x9a; break; case 0x0698: byte_stream_value = 0x8e; break; case 0x06a9: byte_stream_value = 0x98; break; case 0x06af: byte_stream_value = 0x90; break; case 0x06ba: byte_stream_value = 0x9f; break; case 0x06be: byte_stream_value = 0xaa; break; case 0x06c1: byte_stream_value = 0xc0; break; case 0x06d2: byte_stream_value = 0xff; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_types.h0000644000175000017500000000276114610746251020515 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBUNA_INTERNAL_TYPES_H ) */ libesedb-20240420/libuna/libuna_base32_stream.h0000644000175000017500000000717014610746251022002 0ustar00lordyestalordyesta/* * Base32 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_BASE32_STREAM_H ) #define _LIBUNA_BASE32_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 \ 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 \ 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 \ 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 \ 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 /* !defined( _LIBUNA_BASE32_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1253.h0000644000175000017500000000313114610746251023334 0ustar00lordyestalordyesta/* * Windows 1253 codepage (Greek) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1253_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1253_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 ); int libuna_codepage_windows_1253_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_16.h0000644000175000017500000000336714610746251023000 0ustar00lordyestalordyesta/* * ISO 8859-16 codepage (Latin 10) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) #define _LIBUNA_CODEPAGE_ISO_8859_16_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) */ libesedb-20240420/libuna/libuna_utf8_stream.c0000644000175000017500000004314314610746251021604 0ustar00lordyestalordyesta/* * UTF-8 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libuna_definitions.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 */ 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 + 3 ) > 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"; libuna_unicode_character_t unicode_character = 0; size_t utf8_string_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( 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( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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-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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf8_stream_index = 0; size_t utf8_string_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 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into an 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-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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_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( 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_string_index = 0; 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( 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_string_index = 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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"; libuna_unicode_character_t unicode_character = 0; size_t utf32_string_index = 0; 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( 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 an 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 ); } if( unicode_character == 0 ) { break; } } return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1250.h0000644000175000017500000000314414610746251023335 0ustar00lordyestalordyesta/* * Windows 1250 codepage (Central European) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1250_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1250_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 ); int libuna_codepage_windows_1250_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_2.c0000644000175000017500000000703214610746251022677 0ustar00lordyestalordyesta/* * ISO 8859-2 codepage (Central European) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_support.c0000644000175000017500000000216414610746251021055 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) */ libesedb-20240420/libuna/libuna_codepage_koi8_r.c0000644000175000017500000002250614610746251022365 0ustar00lordyestalordyesta/* * KOI8-R codepage (Russian Cyrillic) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_koi8_r.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a KOI8-R encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_koi8_r_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_koi8_r_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a KOI8-R encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_koi8_r_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_koi8_r_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream_value = 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_value = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream_value = 0x9a; break; case 0x00a9: byte_stream_value = 0xbf; break; case 0x00b0: byte_stream_value = 0x9c; break; case 0x00b2: byte_stream_value = 0x9d; break; case 0x00b7: byte_stream_value = 0x9e; break; case 0x00f7: byte_stream_value = 0x9f; break; case 0x0401: byte_stream_value = 0xb3; break; case 0x0451: byte_stream_value = 0xa3; break; case 0x2219: byte_stream_value = 0x95; break; case 0x221a: byte_stream_value = 0x96; break; case 0x2248: byte_stream_value = 0x97; break; case 0x2264: byte_stream_value = 0x98; break; case 0x2265: byte_stream_value = 0x99; break; case 0x2320: byte_stream_value = 0x93; break; case 0x2321: byte_stream_value = 0x9b; break; case 0x2500: byte_stream_value = 0x80; break; case 0x2502: byte_stream_value = 0x81; break; case 0x250c: byte_stream_value = 0x82; break; case 0x2510: byte_stream_value = 0x83; break; case 0x2514: byte_stream_value = 0x84; break; case 0x2518: byte_stream_value = 0x85; break; case 0x251c: byte_stream_value = 0x86; break; case 0x2524: byte_stream_value = 0x87; break; case 0x252c: byte_stream_value = 0x88; break; case 0x2534: byte_stream_value = 0x89; break; case 0x253c: byte_stream_value = 0x8a; break; case 0x2580: byte_stream_value = 0x8b; break; case 0x2584: byte_stream_value = 0x8c; break; case 0x2588: byte_stream_value = 0x8d; break; case 0x258c: byte_stream_value = 0x8e; break; case 0x2590: byte_stream_value = 0x8f; break; case 0x2591: byte_stream_value = 0x90; break; case 0x2592: byte_stream_value = 0x91; break; case 0x2593: byte_stream_value = 0x92; break; case 0x25a0: byte_stream_value = 0x94; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_5.h0000644000175000017500000000247514610746251022715 0ustar00lordyestalordyesta/* * ISO 8859-5 codepage (Cyrillic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) #define _LIBUNA_CODEPAGE_ISO_8859_5_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ 96 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) */ libesedb-20240420/libuna/libuna_utf16_string.h0000644000175000017500000002267014610746251021705 0ustar00lordyestalordyesta/* * UTF-16 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_scsu_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_scsu_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF16_STRING_H ) */ libesedb-20240420/libuna/libuna_utf32_string.c0000644000175000017500000027061614610746251021703 0ustar00lordyestalordyesta/* * UTF-32 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_scsu.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; if( byte_stream_size == 0 ) { return( 1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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; 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 ); } if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing byte stream value.", function ); return( -1 ); } if( ( utf32_string_size >= 1 ) && ( utf32_string[ utf32_string_size - 1 ] == 0 ) ) { utf32_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( ( byte_stream_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf32_unicode_character > byte_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( byte_stream_index < byte_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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( 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; if( utf7_stream_size == 0 ) { return( 1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-7 stream value.", function ); return( -1 ); } if( ( utf32_string_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf32_unicode_character > utf7_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf7_stream_index < utf7_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf8_string_size == 0 ) { return( 1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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 ); } if( utf8_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 string value.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } /* 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( 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; if( utf8_stream_size == 0 ) { 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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; 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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; } } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-8 stream value.", 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_size >= 1 ) && ( 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_size >= 1 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf32_unicode_character > utf8_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf8_stream_index < utf8_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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; if( utf16_string_size == 0 ) { return( 1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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 ); } if( utf16_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing UTF-16 string value.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into an 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 ); } if( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } /* 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; int result = 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", 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; if( utf16_stream_size == 0 ) { return( 1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ); } else { result = libuna_unicode_character_size_to_ucs4( unicode_character, utf32_string_size, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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"; libuna_unicode_character_t unicode_character = 0; size_t utf16_stream_index = 0; int read_byte_order = 0; int 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( 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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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; } } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into an 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( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ); } else { result = libuna_unicode_character_copy_to_ucs4( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ); } if( result != 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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"; libuna_unicode_character_t utf16_stream_unicode_character = 0; libuna_unicode_character_t utf32_unicode_character = 0; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; int read_byte_order = 0; int 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( 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 == 0 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream value.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( utf16_stream_size >= 2 ) { 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( ( utf32_string_size >= 1 ) && ( 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_size >= 2 ) && ( 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 an Unicode character */ if( ( byte_order & LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE ) == 0 ) { result = libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ); } else { result = libuna_unicode_character_copy_from_ucs4( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ); } if( result != 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf32_unicode_character > utf16_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf16_stream_index < utf16_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* 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 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", 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; if( utf32_stream_size == 0 ) { return( 1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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; } } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 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; 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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; } } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into an 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( unicode_character == 0 ) { break; } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful 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 == 0 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream value.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( utf32_stream_size >= 4 ) { 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( ( utf32_string_size >= 1 ) && ( 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_size >= 4 ) && ( 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 an 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 an 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( LIBUNA_COMPARE_LESS ); } else if( utf32_unicode_character > utf32_stream_unicode_character ) { return( LIBUNA_COMPARE_GREATER ); } } /* Check if both strings were entirely processed */ if( utf32_string_index < utf32_string_size ) { return( LIBUNA_COMPARE_GREATER ); } else if( utf32_stream_index < utf32_stream_size ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } /* Determines the size of an UTF-32 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf32_string_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf8_string_size_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 0; if( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU 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; if( scsu_stream_size == 0 ) { return( 1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 0 ) { *utf32_string_size += 1; } return( 1 ); } /* Copies an UTF-32 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_scsu_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_scsu_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_scsu_stream( utf32_string, utf32_string_size, &utf32_string_index, scsu_stream, scsu_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to SCSU stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from a Standard Compression Scheme for Unicode (SCSU) stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_scsu_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ) { uint32_t scsu_dynamic_window_positions[ 8 ] = { 0x0080, 0x00c0, 0x0400, 0x0600, 0x0900, 0x3040, 0x30a0, 0xff00 }; static char *function = "libuna_utf32_string_with_index_copy_from_scsu_stream"; libuna_unicode_character_t unicode_character = 0; size_t scsu_stream_index = 0; uint32_t scsu_window_position = 0; uint8_t byte_value1 = 0; uint8_t byte_value2 = 0; uint8_t byte_value3 = 0; uint8_t dynamic_window_position_index = 0; uint8_t in_unicode_mode = 0; uint8_t unicode_character_set = 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( scsu_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SCSU stream.", function ); return( -1 ); } if( scsu_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid SCSU stream size value exceeds maximum.", function ); return( -1 ); } if( scsu_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: missing SCSU stream value.", function ); return( -1 ); } while( scsu_stream_index < scsu_stream_size ) { unicode_character_set = 0; if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value1 = scsu_stream[ scsu_stream_index++ ]; if( in_unicode_mode != 0 ) { if( ( byte_value1 <= 0xdf ) || ( byte_value1 >= 0xf3 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value1; unicode_character <<= 8; unicode_character |= byte_value2; unicode_character_set = 1; } /* UCn tags */ else if( ( byte_value1 >= 0xe0 ) && ( byte_value1 <= 0xe7 ) ) { dynamic_window_position_index = byte_value1 - 0xe0; in_unicode_mode = 0; } /* UDn tags */ else if( ( byte_value1 >= 0xe8 ) && ( byte_value1 <= 0xef ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0xe8; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } /* UQU tag */ else if( byte_value1 == 0xf0 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* UDX tag */ else if( byte_value1 == 0xf1 ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; in_unicode_mode = 0; } } else { if( ( byte_value1 == 0x00 ) || ( byte_value1 == 0x09 ) || ( byte_value1 == 0x0a ) || ( byte_value1 == 0x0c ) || ( byte_value1 == 0x0d ) || ( ( byte_value1 >= 0x20 ) && ( byte_value1 <= 0x7f ) ) ) { unicode_character = byte_value1; unicode_character_set = 1; } /* SQn tags */ else if( ( byte_value1 >= 0x01 ) && ( byte_value1 <= 0x08 ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; if( byte_value2 < 0x80 ) { unicode_character += libuna_scsu_static_window_positions[ byte_value1 - 0x01 ]; } else { unicode_character -= 0x80; unicode_character += scsu_dynamic_window_positions[ byte_value1 - 0x01 ]; } unicode_character_set = 1; } /* SDX tag */ else if( byte_value1 == 0x0b ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value2 >> 5; scsu_window_position = byte_value2 & 0x1f; scsu_window_position <<= 8; scsu_window_position |= byte_value3; scsu_window_position <<= 7; scsu_window_position += 0x00010000UL; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } /* SQU tag */ else if( byte_value1 == 0x0e ) { if( ( scsu_stream_size < 2 ) || ( scsu_stream_index > ( scsu_stream_size - 2 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; byte_value3 = scsu_stream[ scsu_stream_index++ ]; unicode_character = byte_value2; unicode_character <<= 8; unicode_character |= byte_value3; unicode_character_set = 1; } /* SCU tag */ else if( byte_value1 == 0x0f ) { in_unicode_mode = 1; } /* SCn tags */ else if( ( byte_value1 >= 0x10 ) && ( byte_value1 <= 0x17 ) ) { dynamic_window_position_index = byte_value1 - 0x10; } /* SDn tags */ else if( ( byte_value1 >= 0x18 ) && ( byte_value1 <= 0x1f ) ) { if( scsu_stream_index >= scsu_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: SCSU stream too small.", function ); return( -1 ); } byte_value2 = scsu_stream[ scsu_stream_index++ ]; dynamic_window_position_index = byte_value1 - 0x18; scsu_window_position = libuna_scsu_window_offset_table[ byte_value2 ]; scsu_dynamic_window_positions[ dynamic_window_position_index ] = scsu_window_position; } else if( byte_value1 >= 0x80 ) { unicode_character = byte_value1 - 0x80; unicode_character += scsu_dynamic_window_positions[ dynamic_window_position_index ]; unicode_character_set = 1; } } if( unicode_character_set != 0 ) { /* 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( unicode_character == 0 ) { break; } } } /* Check if the string is terminated with an end-of-string character */ if( unicode_character != 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 ); } libesedb-20240420/libuna/libuna_codepage_mac_icelandic.c0000644000175000017500000002267014610746251023727 0ustar00lordyestalordyesta/* * MacIcelandic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_icelandic.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacIcelandic codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_icelandic_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x00dd, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x00ff, 0x0178, 0x2044, 0x20ac, 0x00d0, 0x00f0, 0x00de, 0x00fe, 0x00fd, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacIcelandic codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0xdc, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xa0, 0xde, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0xdd, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xe0, 0xdf, 0xd8 }; const uint8_t libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x2010[ 40 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacIcelandic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_icelandic_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_mac_icelandic_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_icelandic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacIcelandic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_icelandic_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_mac_icelandic_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2038 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_icelandic_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x02c6: byte_stream_value = 0xf6; break; case 0x02c7: byte_stream_value = 0xff; break; case 0x02d8: byte_stream_value = 0xf9; break; case 0x02d9: byte_stream_value = 0xfa; break; case 0x02da: byte_stream_value = 0xfb; break; case 0x02db: byte_stream_value = 0xfe; break; case 0x02dc: byte_stream_value = 0xf7; break; case 0x02dd: byte_stream_value = 0xfd; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xb9; break; case 0x2044: byte_stream_value = 0xda; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0xf8ff: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1256.h0000644000175000017500000000313214610746251023340 0ustar00lordyestalordyesta/* * Windows 1256 codepage (Arabic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1256_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1256_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 ); int libuna_codepage_windows_1256_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) */ libesedb-20240420/libuna/libuna_utf32_string.h0000644000175000017500000002246614610746251021706 0ustar00lordyestalordyesta/* * UTF-32 string functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_scsu_stream( const uint8_t *scsu_stream, size_t scsu_stream_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_scsu_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_scsu_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *scsu_stream, size_t scsu_stream_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_UTF32_STRING_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_romanian.h0000644000175000017500000000312014610746251023612 0ustar00lordyestalordyesta/* * MacRomanian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_ROMANIAN_H ) #define _LIBUNA_CODEPAGE_MAC_ROMANIAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_romanian_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 ); int libuna_codepage_mac_romanian_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 /* !defined( _LIBUNA_CODEPAGE_MAC_ROMANIAN_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_8.c0000644000175000017500000000510514610746251022704 0ustar00lordyestalordyesta/* * ISO 8859-8 codepage (Hebrew) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_koi8_r.h0000644000175000017500000000310014610746251022357 0ustar00lordyestalordyesta/* * KOI8-R codepage (Russian Cyrillic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) #define _LIBUNA_CODEPAGE_KOI8_R_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_koi8_r_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 ); int libuna_codepage_koi8_r_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 /* !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_cyrillic.h0000644000175000017500000000312014610746251023620 0ustar00lordyestalordyesta/* * MacCyrillic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_CYRILLIC_H ) #define _LIBUNA_CODEPAGE_MAC_CYRILLIC_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_cyrillic_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 ); int libuna_codepage_mac_cyrillic_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 /* !defined( _LIBUNA_CODEPAGE_MAC_CYRILLIC_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_arabic.c0000644000175000017500000002422514610746251023233 0ustar00lordyestalordyesta/* * MacArabic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_arabic.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacArabic codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_arabic_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00a0, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x06ba, 0x00ab, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x2026, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00bb, 0x00f4, 0x00f6, 0x00f7, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066a, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x060c, 0x002d, 0x002e, 0x002f, 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0x003a, 0x061b, 0x003c, 0x003d, 0x003e, 0x061f, 0x274a, 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, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652, 0x067e, 0x0679, 0x0686, 0x06d5, 0x06a4, 0x06af, 0x0688, 0x0691, 0x007b, 0x007c, 0x007d, 0x0698, 0x06d2 }; /* Unicode to ASCII character lookup tables for the MacArabic codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0020[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0x25, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0x2c, 0xad, 0xae, 0xaf, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xba, 0x3b, 0xbc, 0xbd, 0xbe, 0x3f }; const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0x81, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x98, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x82, 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x84, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0x1a, 0x88, 0x87, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x1a, 0x97, 0x99, 0x1a, 0x9a, 0x9b, 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0608[ 184 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 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, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xa5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf5, 0x1a, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacArabic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_arabic_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_mac_arabic_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_arabic_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacArabic encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_arabic_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_mac_arabic_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 < 0x0020 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0020 ) && ( unicode_character < 0x0040 ) ) { unicode_character -= 0x0020; byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0020[ unicode_character ]; } else if( ( unicode_character >= 0x0040 ) && ( unicode_character < 0x005b ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0060 ) && ( unicode_character < 0x007b ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x007e ) && ( unicode_character < 0x0080 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0608 ) && ( unicode_character < 0x06c0 ) ) { unicode_character -= 0x0608; byte_stream_value = libuna_codepage_mac_arabic_unicode_to_byte_stream_base_0x0608[ unicode_character ]; } else switch( unicode_character ) { case 0x005b: byte_stream_value = 0xdb; break; case 0x005c: byte_stream_value = 0xdc; break; case 0x005d: byte_stream_value = 0xdd; break; case 0x005e: byte_stream_value = 0xde; break; case 0x005f: byte_stream_value = 0xdf; break; case 0x007b: byte_stream_value = 0xfb; break; case 0x007c: byte_stream_value = 0xfc; break; case 0x007d: byte_stream_value = 0xfd; break; case 0x06d2: byte_stream_value = 0xff; break; case 0x06d5: byte_stream_value = 0xf6; break; case 0x2026: byte_stream_value = 0x93; break; case 0x274a: byte_stream_value = 0xc0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_croatian.c0000644000175000017500000002306014610746251023606 0ustar00lordyestalordyesta/* * MacCroatian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_croatian.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacCroatian codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_croatian_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x0160, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x017d, 0x00d8, 0x221e, 0x00b1, 0x2264, 0x2265, 0x2206, 0x00b5, 0x2202, 0x2211, 0x220f, 0x0161, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x017e, 0x00f8, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x0106, 0x00ab, 0x010c, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x0110, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0xf8ff, 0x00a9, 0x2044, 0x20ac, 0x2039, 0x203a, 0x00c6, 0x00bb, 0x2013, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x0107, 0x00c1, 0x010d, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x0111, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x03c0, 0x00cb, 0x02da, 0x00b8, 0x00ca, 0x00e6, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacCroatian codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x00a0[ 120 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0x1a, 0x1a, 0xa4, 0xac, 0xd9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0x1a, 0xbc, 0xdf, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xde, 0x82, 0xe9, 0x83, 0xfd, 0xfa, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xfe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x2010[ 56 ] = { 0x1a, 0x1a, 0x1a, 0xe0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xda, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacCroatian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_croatian_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_mac_croatian_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_croatian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacCroatian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_croatian_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_mac_croatian_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0118 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2048 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_croatian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0131: byte_stream_value = 0xf5; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x0160: byte_stream_value = 0xa9; break; case 0x0161: byte_stream_value = 0xb9; break; case 0x017d: byte_stream_value = 0xae; break; case 0x017e: byte_stream_value = 0xbe; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x02c6: byte_stream_value = 0xf6; break; case 0x02c7: byte_stream_value = 0xff; break; case 0x02da: byte_stream_value = 0xfb; break; case 0x02dc: byte_stream_value = 0xf7; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xf9; break; case 0x20ac: byte_stream_value = 0xdb; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xb4; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0xf8ff: byte_stream_value = 0xd8; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_iso_8859_9.h0000644000175000017500000000247414610746251022720 0ustar00lordyestalordyesta/* * ISO 8859-9 codepage (Turkish) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) #define _LIBUNA_CODEPAGE_ISO_8859_9_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ 48 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ 48 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_greek.h0000644000175000017500000000307614610746251023115 0ustar00lordyestalordyesta/* * MacGreek codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_GREEK_H ) #define _LIBUNA_CODEPAGE_MAC_GREEK_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_greek_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 ); int libuna_codepage_mac_greek_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 /* !defined( _LIBUNA_CODEPAGE_MAC_GREEK_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1258.h0000644000175000017500000000313614610746251023346 0ustar00lordyestalordyesta/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1258_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1258_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 ); int libuna_codepage_windows_1258_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_7.c0000644000175000017500000000547114610746251022711 0ustar00lordyestalordyesta/* * ISO 8859-7 codepage (Greek) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/Makefile.in0000644000175000017500000016046514610746266017727 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_mac_arabic.c \ libuna_codepage_mac_arabic.h libuna_codepage_mac_celtic.c \ libuna_codepage_mac_celtic.h \ libuna_codepage_mac_centraleurroman.c \ libuna_codepage_mac_centraleurroman.h \ libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ libuna_codepage_mac_icelandic.c \ libuna_codepage_mac_icelandic.h libuna_codepage_mac_inuit.c \ libuna_codepage_mac_inuit.h libuna_codepage_mac_roman.c \ libuna_codepage_mac_roman.h libuna_codepage_mac_romanian.c \ libuna_codepage_mac_romanian.h libuna_codepage_mac_russian.c \ libuna_codepage_mac_russian.h libuna_codepage_mac_symbol.c \ libuna_codepage_mac_symbol.h libuna_codepage_mac_thai.c \ libuna_codepage_mac_thai.h libuna_codepage_mac_turkish.c \ libuna_codepage_mac_turkish.h libuna_codepage_mac_ukrainian.c \ libuna_codepage_mac_ukrainian.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_libcerror.h libuna_scsu.c libuna_scsu.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_mac_arabic.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_celtic.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_centraleurroman.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_croatian.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_cyrillic.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_dingbats.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_farsi.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_gaelic.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_greek.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_icelandic.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_inuit.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_roman.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_romanian.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_russian.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_symbol.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_thai.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_turkish.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_ukrainian.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_scsu.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ 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) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBUNA_TRUE@am_libuna_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libuna_base16_stream.Plo \ ./$(DEPDIR)/libuna_base32_stream.Plo \ ./$(DEPDIR)/libuna_base64_stream.Plo \ ./$(DEPDIR)/libuna_byte_stream.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo \ ./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo \ ./$(DEPDIR)/libuna_codepage_koi8_r.Plo \ ./$(DEPDIR)/libuna_codepage_koi8_u.Plo \ ./$(DEPDIR)/libuna_codepage_mac_arabic.Plo \ ./$(DEPDIR)/libuna_codepage_mac_celtic.Plo \ ./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo \ ./$(DEPDIR)/libuna_codepage_mac_croatian.Plo \ ./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo \ ./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo \ ./$(DEPDIR)/libuna_codepage_mac_farsi.Plo \ ./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo \ ./$(DEPDIR)/libuna_codepage_mac_greek.Plo \ ./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo \ ./$(DEPDIR)/libuna_codepage_mac_inuit.Plo \ ./$(DEPDIR)/libuna_codepage_mac_roman.Plo \ ./$(DEPDIR)/libuna_codepage_mac_romanian.Plo \ ./$(DEPDIR)/libuna_codepage_mac_russian.Plo \ ./$(DEPDIR)/libuna_codepage_mac_symbol.Plo \ ./$(DEPDIR)/libuna_codepage_mac_thai.Plo \ ./$(DEPDIR)/libuna_codepage_mac_turkish.Plo \ ./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1250.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1251.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1252.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1253.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1254.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1255.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1256.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1257.Plo \ ./$(DEPDIR)/libuna_codepage_windows_1258.Plo \ ./$(DEPDIR)/libuna_codepage_windows_874.Plo \ ./$(DEPDIR)/libuna_codepage_windows_932.Plo \ ./$(DEPDIR)/libuna_codepage_windows_936.Plo \ ./$(DEPDIR)/libuna_codepage_windows_949.Plo \ ./$(DEPDIR)/libuna_codepage_windows_950.Plo \ ./$(DEPDIR)/libuna_error.Plo ./$(DEPDIR)/libuna_scsu.Plo \ ./$(DEPDIR)/libuna_support.Plo \ ./$(DEPDIR)/libuna_unicode_character.Plo \ ./$(DEPDIR)/libuna_url_stream.Plo \ ./$(DEPDIR)/libuna_utf16_stream.Plo \ ./$(DEPDIR)/libuna_utf16_string.Plo \ ./$(DEPDIR)/libuna_utf32_stream.Plo \ ./$(DEPDIR)/libuna_utf32_string.Plo \ ./$(DEPDIR)/libuna_utf7_stream.Plo \ ./$(DEPDIR)/libuna_utf8_stream.Plo \ ./$(DEPDIR)/libuna_utf8_string.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libuna_la_SOURCES) DIST_SOURCES = $(am__libuna_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBUNA_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBUNA_TRUE@ @LIBCERROR_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_mac_arabic.c libuna_codepage_mac_arabic.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_celtic.c libuna_codepage_mac_celtic.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_centraleurroman.c libuna_codepage_mac_centraleurroman.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_croatian.c libuna_codepage_mac_croatian.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_cyrillic.c libuna_codepage_mac_cyrillic.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_dingbats.c libuna_codepage_mac_dingbats.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_farsi.c libuna_codepage_mac_farsi.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_gaelic.c libuna_codepage_mac_gaelic.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_greek.c libuna_codepage_mac_greek.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_icelandic.c libuna_codepage_mac_icelandic.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_inuit.c libuna_codepage_mac_inuit.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_roman.c libuna_codepage_mac_roman.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_romanian.c libuna_codepage_mac_romanian.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_russian.c libuna_codepage_mac_russian.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_symbol.c libuna_codepage_mac_symbol.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_thai.c libuna_codepage_mac_thai.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_turkish.c libuna_codepage_mac_turkish.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_mac_ukrainian.c libuna_codepage_mac_ukrainian.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_libcerror.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_scsu.c libuna_scsu.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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libuna.la: $(libuna_la_OBJECTS) $(libuna_la_DEPENDENCIES) $(EXTRA_libuna_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base32_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base64_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_byte_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_r.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_u.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_arabic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_celtic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_croatian.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_farsi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_greek.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_inuit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_roman.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_romanian.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_russian.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_symbol.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_thai.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_turkish.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1250.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1251.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1252.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1253.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1254.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1255.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1256.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1257.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1258.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_874.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_932.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_936.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_949.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_950.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_scsu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_unicode_character.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_url_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf7_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_string.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libuna_base16_stream.Plo -rm -f ./$(DEPDIR)/libuna_base32_stream.Plo -rm -f ./$(DEPDIR)/libuna_base64_stream.Plo -rm -f ./$(DEPDIR)/libuna_byte_stream.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_r.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_u.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_arabic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_celtic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_croatian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_farsi.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_greek.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_inuit.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_roman.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_romanian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_russian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_symbol.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_thai.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_turkish.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1250.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1251.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1252.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1253.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1254.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1255.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1256.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1257.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1258.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_874.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_932.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_936.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_949.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_950.Plo -rm -f ./$(DEPDIR)/libuna_error.Plo -rm -f ./$(DEPDIR)/libuna_scsu.Plo -rm -f ./$(DEPDIR)/libuna_support.Plo -rm -f ./$(DEPDIR)/libuna_unicode_character.Plo -rm -f ./$(DEPDIR)/libuna_url_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf16_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf16_string.Plo -rm -f ./$(DEPDIR)/libuna_utf32_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf32_string.Plo -rm -f ./$(DEPDIR)/libuna_utf7_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf8_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf8_string.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libuna_base16_stream.Plo -rm -f ./$(DEPDIR)/libuna_base32_stream.Plo -rm -f ./$(DEPDIR)/libuna_base64_stream.Plo -rm -f ./$(DEPDIR)/libuna_byte_stream.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo -rm -f ./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_r.Plo -rm -f ./$(DEPDIR)/libuna_codepage_koi8_u.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_arabic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_celtic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_centraleurroman.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_croatian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_cyrillic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_dingbats.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_farsi.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_gaelic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_greek.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_icelandic.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_inuit.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_roman.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_romanian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_russian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_symbol.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_thai.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_turkish.Plo -rm -f ./$(DEPDIR)/libuna_codepage_mac_ukrainian.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1250.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1251.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1252.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1253.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1254.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1255.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1256.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1257.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_1258.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_874.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_932.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_936.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_949.Plo -rm -f ./$(DEPDIR)/libuna_codepage_windows_950.Plo -rm -f ./$(DEPDIR)/libuna_error.Plo -rm -f ./$(DEPDIR)/libuna_scsu.Plo -rm -f ./$(DEPDIR)/libuna_support.Plo -rm -f ./$(DEPDIR)/libuna_unicode_character.Plo -rm -f ./$(DEPDIR)/libuna_url_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf16_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf16_string.Plo -rm -f ./$(DEPDIR)/libuna_utf32_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf32_string.Plo -rm -f ./$(DEPDIR)/libuna_utf7_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf8_stream.Plo -rm -f ./$(DEPDIR)/libuna_utf8_string.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libuna/libuna_codepage_iso_8859_3.c0000644000175000017500000000640714610746251022705 0ustar00lordyestalordyesta/* * ISO 8859-3 codepage (Latin 3) function * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 }; libesedb-20240420/libuna/libuna_codepage_windows_1250.c0000644000175000017500000002306014610746251023327 0ustar00lordyestalordyesta/* * Windows 1250 codepage (Central European) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1250.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1250 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1250_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_1250_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1250 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1250_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_1250_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream_value = 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_value = 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_value = 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_value = 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_value = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream_value = 0xa1; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_scsu.c0000644000175000017500000000615514610746251020322 0ustar00lordyestalordyesta/* * Standard Compression Scheme for Unicode (SCSU) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_scsu.h" const uint32_t libuna_scsu_static_window_positions[ 8 ] = { 0x0000, 0x0080, 0x0100, 0x0300, 0x2000, 0x2080, 0x2100, 0x3000 }; const uint32_t libuna_scsu_window_offset_table[ 256 ] = { 0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b00, 0x0b80, 0x0c00, 0x0c80, 0x0d00, 0x0d80, 0x0e00, 0x0e80, 0x0f00, 0x0f80, 0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380, 0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780, 0x1800, 0x1880, 0x1900, 0x1980, 0x1a00, 0x1a80, 0x1b00, 0x1b80, 0x1c00, 0x1c80, 0x1d00, 0x1d80, 0x1e00, 0x1e80, 0x1f00, 0x1f80, 0x2000, 0x2080, 0x2100, 0x2180, 0x2200, 0x2280, 0x2300, 0x2380, 0x2400, 0x2480, 0x2500, 0x2580, 0x2600, 0x2680, 0x2700, 0x2780, 0x2800, 0x2880, 0x2900, 0x2980, 0x2a00, 0x2a80, 0x2b00, 0x2b80, 0x2c00, 0x2c80, 0x2d00, 0x2d80, 0x2e00, 0x2e80, 0x2f00, 0x2f80, 0x3000, 0x3080, 0x3100, 0x3180, 0x3200, 0x3280, 0x3300, 0x3380, 0xe000, 0xe080, 0xe100, 0xe180, 0xe200, 0xe280, 0xe300, 0xe380, 0xe400, 0xe480, 0xe500, 0xe580, 0xe600, 0xe680, 0xe700, 0xe780, 0xe800, 0xe880, 0xe900, 0xe980, 0xea00, 0xea80, 0xeb00, 0xeb80, 0xec00, 0xec80, 0xed00, 0xed80, 0xee00, 0xee80, 0xef00, 0xef80, 0xf000, 0xf080, 0xf100, 0xf180, 0xf200, 0xf280, 0xf300, 0xf380, 0xf400, 0xf480, 0xf500, 0xf580, 0xf600, 0xf680, 0xf700, 0xf780, 0xf800, 0xf880, 0xf900, 0xf980, 0xfa00, 0xfa80, 0xfb00, 0xfb80, 0xfc00, 0xfc80, 0xfd00, 0xfd80, 0xfe00, 0xfe80, 0xff00, 0xff80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00c0, 0x0250, 0x0370, 0x0530, 0x3040, 0x30a0, 0xff60 }; libesedb-20240420/libuna/libuna_codepage_windows_1252.c0000644000175000017500000001602514610746251023334 0ustar00lordyestalordyesta/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1252.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1252 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1252_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_1252_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( ( byte_stream_character < 0x80 ) || ( byte_stream_character >= 0xa0 ) ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1252 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1252_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_1252_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0152: byte_stream_value = 0x8c; break; case 0x0153: byte_stream_value = 0x9c; break; case 0x0160: byte_stream_value = 0x8a; break; case 0x0161: byte_stream_value = 0x9a; break; case 0x0178: byte_stream_value = 0x9f; break; case 0x017d: byte_stream_value = 0x8e; break; case 0x017e: byte_stream_value = 0x9e; break; case 0x0192: byte_stream_value = 0x83; break; case 0x02c6: byte_stream_value = 0x88; break; case 0x02dc: byte_stream_value = 0x98; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_turkish.c0000644000175000017500000002316414610746251023504 0ustar00lordyestalordyesta/* * MacTurkish codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_turkish.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacTurkish codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_turkish_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x03a9, 0x00e6, 0x00f8, 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, 0x00ff, 0x0178, 0x011e, 0x011f, 0x0130, 0x0131, 0x015e, 0x015f, 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0xf8ff, 0x00d2, 0x00da, 0x00db, 0x00d9, 0xf8a0, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 }; /* Unicode to ASCII character lookup tables for the MacTurkish codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xca, 0xc1, 0xa2, 0xa3, 0x1a, 0xb4, 0x1a, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x1a, 0xa8, 0xf8, 0xa1, 0xb1, 0x1a, 0x1a, 0xab, 0xb5, 0xa6, 0xe1, 0xfc, 0x1a, 0xbc, 0xc8, 0x1a, 0x1a, 0x1a, 0xc0, 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, 0x1a, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x1a, 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x1a, 0x1a, 0xa7, 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0xd8 }; const uint8_t libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x2010[ 40 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xe2, 0x1a, 0xd2, 0xd3, 0xe3, 0x1a, 0xa0, 0xe0, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacTurkish encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_turkish_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_mac_turkish_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_turkish_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacTurkish encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_turkish_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_mac_turkish_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2038 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_turkish_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream_value = 0xda; break; case 0x011f: byte_stream_value = 0xdb; break; case 0x0130: byte_stream_value = 0xdc; break; case 0x0131: byte_stream_value = 0xdd; break; case 0x0152: byte_stream_value = 0xce; break; case 0x0153: byte_stream_value = 0xcf; break; case 0x015e: byte_stream_value = 0xde; break; case 0x015f: byte_stream_value = 0xdf; break; case 0x0178: byte_stream_value = 0xd9; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x02c6: byte_stream_value = 0xf6; break; case 0x02c7: byte_stream_value = 0xff; break; case 0x02d8: byte_stream_value = 0xf9; break; case 0x02d9: byte_stream_value = 0xfa; break; case 0x02da: byte_stream_value = 0xfb; break; case 0x02db: byte_stream_value = 0xfe; break; case 0x02dc: byte_stream_value = 0xf7; break; case 0x02dd: byte_stream_value = 0xfd; break; case 0x03a9: byte_stream_value = 0xbd; break; case 0x03c0: byte_stream_value = 0xb9; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x220f: byte_stream_value = 0xb8; break; case 0x2211: byte_stream_value = 0xb7; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x222b: byte_stream_value = 0xba; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; case 0x25ca: byte_stream_value = 0xd7; break; case 0xf8a0: byte_stream_value = 0xf5; break; case 0xf8ff: byte_stream_value = 0xf0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_ukrainian.h0000644000175000017500000000312614610746251023775 0ustar00lordyestalordyesta/* * MacUkrainian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H ) #define _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_ukrainian_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 ); int libuna_codepage_mac_ukrainian_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 /* !defined( _LIBUNA_CODEPAGE_MAC_UKRAINIAN_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_russian.c0000644000175000017500000002144514610746251023477 0ustar00lordyestalordyesta/* * MacRussian codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_russian.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacRussian codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_russian_byte_stream_to_unicode_base_0x80[ 128 ] = { 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, 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x2202, 0x0408, 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, 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, 0x00a4 }; /* Unicode to ASCII character lookup tables for the MacRussian codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xca, 0x1a, 0xa2, 0xa3, 0xff, 0x1a, 0x1a, 0xa4, 0x1a, 0xa9, 0x1a, 0xc7, 0xc2, 0x1a, 0xa8, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xa6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x1a, 0xd8, 0xda, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 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, 0xdf, 0x1a, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0x1a, 0xd9, 0xdb }; const uint8_t libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0xd0, 0xd1, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0x1a, 0x1a, 0xd2, 0xd3, 0xd7, 0x1a, 0xa0, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0xc9, 0x1a }; /* Copies an Unicode character from a MacRussian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_russian_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_mac_russian_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_russian_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacRussian encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_russian_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_mac_russian_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream_value = libuna_codepage_mac_russian_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00f7: byte_stream_value = 0xd6; break; case 0x0192: byte_stream_value = 0xc4; break; case 0x2116: byte_stream_value = 0xdc; break; case 0x2122: byte_stream_value = 0xaa; break; case 0x2202: byte_stream_value = 0xb6; break; case 0x2206: byte_stream_value = 0xc6; break; case 0x221a: byte_stream_value = 0xc3; break; case 0x221e: byte_stream_value = 0xb0; break; case 0x2248: byte_stream_value = 0xc5; break; case 0x2260: byte_stream_value = 0xad; break; case 0x2264: byte_stream_value = 0xb2; break; case 0x2265: byte_stream_value = 0xb3; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_1258.c0000644000175000017500000002163414610746251023344 0ustar00lordyestalordyesta/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_windows_1258.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the 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 tables for the 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 }; /* Copies an Unicode character from a Windows 1258 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1258_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_1258_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a Windows 1258 encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_windows_1258_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_1258_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00c0; byte_stream_value = 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_value = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0110: byte_stream_value = 0xd0; break; case 0x0111: byte_stream_value = 0xf0; break; case 0x0152: byte_stream_value = 0x8c; break; case 0x0153: byte_stream_value = 0x9c; break; case 0x0178: byte_stream_value = 0x9f; break; case 0x0192: byte_stream_value = 0x83; break; case 0x01a0: byte_stream_value = 0xd5; break; case 0x01a1: byte_stream_value = 0xf5; break; case 0x01af: byte_stream_value = 0xdd; break; case 0x01b0: byte_stream_value = 0xfd; break; case 0x02c6: byte_stream_value = 0x88; break; case 0x02dc: byte_stream_value = 0x98; break; case 0x0300: byte_stream_value = 0xcc; break; case 0x0301: byte_stream_value = 0xec; break; case 0x0303: byte_stream_value = 0xde; break; case 0x0309: byte_stream_value = 0xd2; break; case 0x0323: byte_stream_value = 0xf2; break; case 0x2030: byte_stream_value = 0x89; break; case 0x2039: byte_stream_value = 0x8b; break; case 0x203a: byte_stream_value = 0x9b; break; case 0x20ab: byte_stream_value = 0xfe; break; case 0x20ac: byte_stream_value = 0x80; break; case 0x2122: byte_stream_value = 0x99; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_celtic.h0000644000175000017500000000310414610746251023253 0ustar00lordyestalordyesta/* * MacCeltic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_CELTIC_H ) #define _LIBUNA_CODEPAGE_MAC_CELTIC_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_celtic_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 ); int libuna_codepage_mac_celtic_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 /* !defined( _LIBUNA_CODEPAGE_MAC_CELTIC_H ) */ libesedb-20240420/libuna/libuna_byte_stream.c0000644000175000017500000003617514610746251021670 0ustar00lordyestalordyesta/* * Byte stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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 an 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 ); } if( unicode_character == 0 ) { break; } } 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 an 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 ); } if( unicode_character == 0 ) { break; } } return( 1 ); } libesedb-20240420/libuna/libuna_codepage_mac_gaelic.h0000644000175000017500000000310414610746251023234 0ustar00lordyestalordyesta/* * MacGaelic codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_GAELIC_H ) #define _LIBUNA_CODEPAGE_MAC_GAELIC_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_gaelic_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 ); int libuna_codepage_mac_gaelic_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 /* !defined( _LIBUNA_CODEPAGE_MAC_GAELIC_H ) */ libesedb-20240420/libuna/libuna_utf32_stream.h0000644000175000017500000000604214610746251021663 0ustar00lordyestalordyesta/* * UTF-32 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_UTF32_STREAM_H ) #define _LIBUNA_UTF32_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_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 /* !defined( _LIBUNA_UTF32_STREAM_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_symbol.h0000644000175000017500000000341114610746251023316 0ustar00lordyestalordyesta/* * MacSymbol codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_SYMBOL_H ) #define _LIBUNA_CODEPAGE_MAC_SYMBOL_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_symbol_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); int libuna_codepage_mac_symbol_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 ); int libuna_codepage_mac_symbol_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 /* !defined( _LIBUNA_CODEPAGE_MAC_SYMBOL_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1257.h0000644000175000017500000000313214610746251023341 0ustar00lordyestalordyesta/* * Windows 1257 codepage (Baltic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1257_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1257_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 ); int libuna_codepage_windows_1257_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_inuit.h0000644000175000017500000000307614610746251023150 0ustar00lordyestalordyesta/* * MacInuit codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_MAC_INUIT_H ) #define _LIBUNA_CODEPAGE_MAC_INUIT_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_mac_inuit_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 ); int libuna_codepage_mac_inuit_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 /* !defined( _LIBUNA_CODEPAGE_MAC_INUIT_H ) */ libesedb-20240420/libuna/libuna_codepage_mac_farsi.c0000644000175000017500000002537214610746251023122 0ustar00lordyestalordyesta/* * MacFarsi codepage functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libuna_codepage_mac_farsi.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for the MacFarsi codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_mac_farsi_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x00c4, 0x00a0, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x06ba, 0x00ab, 0x00e7, 0x00e9, 0x00e8, 0x00ea, 0x00eb, 0x00ed, 0x2026, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00bb, 0x00f4, 0x00f6, 0x00f7, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066a, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x060c, 0x002d, 0x002e, 0x002f, 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, 0x06f8, 0x06f9, 0x003a, 0x061b, 0x003c, 0x003d, 0x003e, 0x061f, 0x274a, 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, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652, 0x067e, 0x0679, 0x0686, 0x06d5, 0x06a4, 0x06af, 0x0688, 0x0691, 0x007b, 0x007c, 0x007d, 0x0698, 0x06d2 }; /* Unicode to ASCII character lookup tables for the MacFarsi codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0020[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0x25, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0x2c, 0xad, 0xae, 0xaf, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xba, 0x3b, 0xbc, 0xbd, 0xbe, 0x3f }; const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0x81, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8c, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x98, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x80, 0x1a, 0x1a, 0x82, 0x1a, 0x83, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x84, 0x1a, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x86, 0x1a, 0x1a, 0x1a, 0x88, 0x87, 0x89, 0x1a, 0x8a, 0x1a, 0x1a, 0x8d, 0x8f, 0x8e, 0x90, 0x91, 0x1a, 0x92, 0x94, 0x95, 0x1a, 0x96, 0x1a, 0x97, 0x99, 0x1a, 0x9a, 0x9b, 0x1a, 0x9d, 0x9c, 0x9e, 0x9f, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0608[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 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 }; const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0668[ 88 ] = { 0x1a, 0x1a, 0xa5, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf5, 0x1a, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x06f0[ 16 ] = { 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; /* Copies an Unicode character from a MacFarsi encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_farsi_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_mac_farsi_copy_from_byte_stream"; libuna_unicode_character_t safe_unicode_character = 0xfffd; size_t safe_byte_stream_index = 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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[ safe_byte_stream_index++ ]; if( byte_stream_character < 0x80 ) { safe_unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; safe_unicode_character = libuna_codepage_mac_farsi_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *unicode_character = safe_unicode_character; *byte_stream_index = safe_byte_stream_index; return( 1 ); } /* Copies an Unicode character to a MacFarsi encoded byte stream * Returns 1 if successful or -1 on error */ int libuna_codepage_mac_farsi_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_mac_farsi_copy_to_byte_stream"; size_t safe_byte_stream_index = 0; 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 ); } safe_byte_stream_index = *byte_stream_index; if( safe_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 < 0x0020 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0020 ) && ( unicode_character < 0x0040 ) ) { unicode_character -= 0x0020; byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0020[ unicode_character ]; } else if( ( unicode_character >= 0x0040 ) && ( unicode_character < 0x005b ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0060 ) && ( unicode_character < 0x007b ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x007e ) && ( unicode_character < 0x0080 ) ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0608 ) && ( unicode_character < 0x0658 ) ) { unicode_character -= 0x0608; byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0608[ unicode_character ]; } else if( ( unicode_character >= 0x0668 ) && ( unicode_character < 0x06c0 ) ) { unicode_character -= 0x0668; byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x0668[ unicode_character ]; } else if( ( unicode_character >= 0x06f0 ) && ( unicode_character < 0x0700 ) ) { unicode_character -= 0x06f0; byte_stream_value = libuna_codepage_mac_farsi_unicode_to_byte_stream_base_0x06f0[ unicode_character ]; } else switch( unicode_character ) { case 0x005b: byte_stream_value = 0xdb; break; case 0x005c: byte_stream_value = 0xdc; break; case 0x005d: byte_stream_value = 0xdd; break; case 0x005e: byte_stream_value = 0xde; break; case 0x005f: byte_stream_value = 0xdf; break; case 0x007b: byte_stream_value = 0xfb; break; case 0x007c: byte_stream_value = 0xfc; break; case 0x007d: byte_stream_value = 0xfd; break; case 0x06d2: byte_stream_value = 0xff; break; case 0x06d5: byte_stream_value = 0xf6; break; case 0x2026: byte_stream_value = 0x93; break; case 0x274a: byte_stream_value = 0xc0; break; default: byte_stream_value = 0x1a; break; } byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( byte_stream_value & 0x00ff ); *byte_stream_index = safe_byte_stream_index; return( 1 ); } libesedb-20240420/libuna/libuna_codepage_windows_950.h0000644000175000017500000000344714610746251023271 0ustar00lordyestalordyesta/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_950_H ) #define _LIBUNA_CODEPAGE_WINDOWS_950_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 ); 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 ); 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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_950_H ) */ libesedb-20240420/libuna/libuna_url_stream.c0000644000175000017500000003625414610746251021525 0ustar00lordyestalordyesta/* * Percent or URL encoded stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 an 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 an 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 an 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 an 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 + 3 ) > 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 + 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 ); } 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 + 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 ); } 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 ); } libesedb-20240420/libuna/libuna_codepage_windows_1251.h0000644000175000017500000000313414610746251023335 0ustar00lordyestalordyesta/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1251_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1251_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 ); int libuna_codepage_windows_1251_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) */ libesedb-20240420/libuna/libuna_codepage_windows_1252.h0000644000175000017500000000315414610746251023340 0ustar00lordyestalordyesta/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1252_H #include #include #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif int libuna_codepage_windows_1252_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 ); int libuna_codepage_windows_1252_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 /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) */ libesedb-20240420/libuna/libuna_codepage_iso_8859_14.h0000644000175000017500000000303314610746251022764 0ustar00lordyestalordyesta/* * ISO 8859-14 codepage (Celtic) functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) #define _LIBUNA_CODEPAGE_ISO_8859_14_H #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN_VARIABLE \ const uint16_t libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ 96 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ 64 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ 8 ]; LIBUNA_EXTERN_VARIABLE \ const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ 8 ]; #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) */ libesedb-20240420/libuna/libuna_base16_stream.h0000644000175000017500000000507714610746251022010 0ustar00lordyestalordyesta/* * Base16 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 int libuna_base16_character_copy_from_base16_stream( uint32_t *base16_character, const uint8_t *base16_stream, uint32_t base16_variant, libcerror_error_t **error ); 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 /* !defined( _LIBUNA_BASE16_STREAM_H ) */ libesedb-20240420/libuna/libuna_base32_stream.c0000644000175000017500000024046214610746251022000 0ustar00lordyestalordyesta/* * Base32 stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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[ 32 ] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7' }; static uint8_t libuna_base32hex_quintet_to_character_table[ 32 ] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V' }; /* Copies a base32 character to a base32 quintet * Returns 1 if successful or -1 on error */ 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"; uint8_t safe_base32_quintet = 0; 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 an 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' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'A'; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'J' + 9; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'Z' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'S' + 18; } else if( ( base32_character >= (uint8_t) '2' ) && ( base32_character <= (uint8_t) '7' ) ) { safe_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' ) ) { safe_base32_quintet = base32_character - (uint8_t) '0'; } /* A-V is not a continous range on an 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' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'A' + 10; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'J' + 19; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'V' ) ) { safe_base32_quintet = base32_character - (uint8_t) 'S' + 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 ); } *base32_quintet = safe_base32_quintet; 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 */ 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 safe_base32_stream_index = 0; uint64_t safe_base32_quintuplet = 0; uint32_t base32_character1 = 0; uint32_t base32_character2 = 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; uint8_t safe_padding_size = 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: case LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL: case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: 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 ); } safe_base32_stream_index = *base32_stream_index; if( base32_character_size > ( base32_stream_size - safe_base32_stream_index ) ) { 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[ safe_base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_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( base32_character_size > ( base32_stream_size - safe_base32_stream_index ) ) { 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[ safe_base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_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 ); } safe_padding_size = 6; if( ( 2 * base32_character_size ) <= ( base32_stream_size - safe_base32_stream_index ) ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ safe_base32_stream_index ]; base32_character2 = base32_stream[ safe_base32_stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; } safe_base32_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( ( base32_character1 == (uint32_t) '=' ) || ( base32_character2 == (uint32_t) '=' ) ) { if( ( base32_variant & 0x0f000000UL ) == LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 3rd or 4th base32 character.", function ); return( -1 ); } if( base32_character1 != (uint32_t) '=' ) { 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) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 character.", function ); return( -1 ); } } else { if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet3, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 quintet.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet4, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 quintet.", function ); return( -1 ); } safe_padding_size -= 2; } } else if( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 3rd or 4th base32 character.", function ); return( -1 ); } if( base32_character_size <= ( base32_stream_size - safe_base32_stream_index ) ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ safe_base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_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( base32_character1 == (uint32_t) '=' ) { if( ( base32_variant & 0x0f000000UL ) == LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 5th base32 character.", function ); return( -1 ); } } else { if( safe_padding_size > 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: non-padding where not supposed to - invalid 5th base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet5, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 quintet.", function ); return( -1 ); } safe_padding_size -= 1; } } else if( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 5th base32 character.", function ); return( -1 ); } if( ( 2 * base32_character_size ) <= ( base32_stream_size - safe_base32_stream_index ) ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ safe_base32_stream_index ]; base32_character2 = base32_stream[ safe_base32_stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; } safe_base32_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( ( base32_character1 == (uint32_t) '=' ) || ( base32_character2 == (uint32_t) '=' ) ) { if( ( base32_variant & 0x0f000000UL ) == LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 6th or 7th base32 character.", function ); return( -1 ); } if( base32_character1 != (uint32_t) '=' ) { 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) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } } else { if( safe_padding_size > 3 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: non-padding where not supposed to - invalid 6th or 7th base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet6, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 quintet.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet7, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } safe_padding_size -= 2; } } else if( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 6th or 7th base32 character.", function ); return( -1 ); } if( base32_character_size <= ( base32_stream_size - safe_base32_stream_index ) ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ safe_base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_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( base32_character1 == (uint32_t) '=' ) { if( ( base32_variant & 0x0f000000UL ) == LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: padding where not supposed to - invalid 8th base32 character.", function ); return( -1 ); } } else { if( safe_padding_size > 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: non-padding where not supposed to - invalid 8th base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet8, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 quintet.", function ); return( -1 ); } safe_padding_size -= 1; } } else if( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 8th base32 character.", function ); return( -1 ); } safe_base32_quintuplet = quintet1; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet2; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet3; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet4; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet5; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet6; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet7; safe_base32_quintuplet <<= 5; safe_base32_quintuplet |= quintet8; *base32_stream_index = safe_base32_stream_index; *base32_quintuplet = safe_base32_quintuplet; *padding_size = safe_padding_size; return( 1 ); } /* Copies a base32 quintuplet to a base32 stream * Returns 1 if successful or -1 on error */ 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"; size_t base32_character_size = 0; size_t safe_base32_stream_index = 0; uint32_t base32_character1 = 0; uint32_t base32_character2 = 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: case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: 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 ); } safe_base32_stream_index = *base32_stream_index; /* 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( ( 2 * base32_character_size ) > ( base32_stream_size - safe_base32_stream_index ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small - insufficient space for 1st and 2nd base32 characters.", function ); return( -1 ); } base32_character1 = (uint32_t) quintet_to_character_table[ quintet1 ]; base32_character2 = (uint32_t) quintet_to_character_table[ quintet2 ]; switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_stream[ safe_base32_stream_index ] = (uint8_t) base32_character1; base32_stream[ safe_base32_stream_index + 1 ] = (uint8_t) base32_character2; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; } safe_base32_stream_index += 2 * base32_character_size; /* Spread the encoding over 4 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( padding_size < 6 ) || ( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) ) { if( ( 2 * base32_character_size ) > ( base32_stream_size - safe_base32_stream_index ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small - insufficient space for 3rd and 4th base32 characters.", function ); return( -1 ); } if( padding_size < 6 ) { base32_character1 = (uint32_t) quintet_to_character_table[ quintet3 ]; base32_character2 = (uint32_t) quintet_to_character_table[ quintet4 ]; } else { base32_character1 = (uint32_t) '='; base32_character2 = (uint32_t) '='; } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_stream[ safe_base32_stream_index ] = (uint8_t) base32_character1; base32_stream[ safe_base32_stream_index + 1 ] = (uint8_t) base32_character2; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; } safe_base32_stream_index += 2 * base32_character_size; } /* Spread the encoding over 5 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( ( padding_size < 4 ) || ( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) ) { if( base32_character_size > ( base32_stream_size - safe_base32_stream_index ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small - insufficient space for 5th base32 character.", function ); return( -1 ); } if( padding_size < 4 ) { base32_character1 = (uint32_t) quintet_to_character_table[ quintet5 ]; } else { base32_character1 = (uint32_t) '='; } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_stream[ safe_base32_stream_index ] = (uint8_t) base32_character1; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_stream_index += base32_character_size; } /* Spread the encoding over 7 characters if 4 bytes are available * Otherwise pad the remaining bytes if required */ if( ( padding_size < 3 ) || ( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) ) { if( ( 2 * base32_character_size ) > ( base32_stream_size - safe_base32_stream_index ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small - insufficient space for 6th and 7th base32 characters.", function ); return( -1 ); } if( padding_size < 3 ) { base32_character1 = (uint32_t) quintet_to_character_table[ quintet6 ]; base32_character2 = (uint32_t) quintet_to_character_table[ quintet7 ]; } else { base32_character1 = (uint32_t) '='; base32_character2 = (uint32_t) '='; } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_stream[ safe_base32_stream_index ] = (uint8_t) base32_character1; base32_stream[ safe_base32_stream_index + 1 ] = (uint8_t) base32_character2; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index + 4 ] ), base32_character2 ); break; } safe_base32_stream_index += 2 * base32_character_size; } /* Spread the encoding over 8 characters if 5 bytes are available * Otherwise pad the remaining bytes if required */ if( ( padding_size < 1 ) || ( ( base32_variant & 0x0f000000UL ) != LIBUNA_BASE32_VARIANT_PADDING_NONE ) ) { if( base32_character_size > ( base32_stream_size - safe_base32_stream_index ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small - insufficient space for 8th base32 character.", function ); return( -1 ); } if( padding_size < 1 ) { base32_character1 = (uint32_t) quintet_to_character_table[ quintet8 ]; } else { base32_character1 = (uint32_t) '='; } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_stream[ safe_base32_stream_index ] = (uint8_t) base32_character1; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base32_stream[ safe_base32_stream_index ] ), base32_character1 ); break; } safe_base32_stream_index += base32_character_size; } *base32_stream_index = safe_base32_stream_index; return( 1 ); } /* Copies a base32 quintuplet from a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_byte_stream_index = 0; uint64_t safe_base32_quintuplet = 0; uint8_t safe_padding_size = 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( 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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } /* Determine the value of 5 bytes (40 bits) */ safe_byte_stream_index = *byte_stream_index; safe_base32_quintuplet = byte_stream[ safe_byte_stream_index++ ]; safe_padding_size = 6; safe_base32_quintuplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base32_quintuplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 2; } safe_base32_quintuplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base32_quintuplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 1; } safe_base32_quintuplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base32_quintuplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 2; } safe_base32_quintuplet <<= 8; if( safe_byte_stream_index < byte_stream_size ) { safe_base32_quintuplet |= byte_stream[ safe_byte_stream_index++ ]; safe_padding_size -= 1; } *base32_quintuplet = safe_base32_quintuplet; *byte_stream_index = safe_byte_stream_index; *padding_size = safe_padding_size; return( 1 ); } /* Copies a base32 quintuplet to a byte stream * Returns 1 if successful or -1 on error */ 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"; size_t safe_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( 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 ); } safe_byte_stream_index = *byte_stream_index; byte_stream[ safe_byte_stream_index++ ] = (uint8_t) ( ( base32_quintuplet >> 32 ) & 0xff ); if( padding_size <= 4 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( ( base32_quintuplet >> 24 ) & 0xff ); } if( padding_size <= 3 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( ( base32_quintuplet >> 16 ) & 0xff ); } if( padding_size <= 2 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( ( base32_quintuplet >> 8 ) & 0xff ); } if( padding_size == 0 ) { if( safe_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[ safe_byte_stream_index++ ] = (uint8_t) ( base32_quintuplet & 0xff ); } *byte_stream_index = safe_byte_stream_index; 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_character_size = 0; size_t base32_stream_index = 0; size_t number_of_characters = 0; size_t safe_byte_stream_size = 0; size_t whitespace_size = 0; uint32_t base32_character1 = 0; uint32_t base32_character2 = 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_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: 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 ); } 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 ); } 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 ); } /* Ignore trailing whitespace */ if( base32_stream_size > base32_character_size ) { base32_stream_index = base32_stream_size - base32_character_size; whitespace_size = 0; while( base32_stream_index > base32_character_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; } base32_stream_index -= base32_character_size; if( ( base32_character1 == (uint32_t) '\n' ) || ( base32_character1 == (uint32_t) '\r' ) ) { whitespace_size += base32_character_size; continue; } else if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } if( ( base32_character1 == (uint32_t) ' ' ) || ( base32_character1 == (uint32_t) '\t' ) || ( base32_character1 == (uint32_t) '\v' ) ) { whitespace_size += base32_character_size; } else { break; } } base32_stream_size -= whitespace_size; } /* Determine and ignore the padding */ if( base32_stream_size > base32_character_size ) { base32_stream_index = base32_stream_size - base32_character_size; while( ( base32_stream_index > base32_character_size ) && ( padding_size <= 6 ) ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; } base32_stream_index -= base32_character_size; if( base32_character1 == (uint32_t) '=' ) { padding_size += 1; } } if( padding_size > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid amount of padding - found more than 6 padding characters.", function ); return( -1 ); } base32_stream_size -= padding_size * base32_character_size; } base32_stream_index = 0; whitespace_size = 0; while( ( base32_stream_index + base32_character_size ) < base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; } if( ( base32_character1 == (uint32_t) '\n' ) || ( base32_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 { /* Handle multi-character end-of-line */ if( ( base32_stream_index + base32_character_size ) < base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character2 = base32_stream[ base32_stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index + 4 ] ), base32_character2 ); break; } if( ( base32_character2 == (uint32_t) '\n' ) || ( base32_character2 == (uint32_t) '\r' ) ) { base32_stream_index += base32_character_size; whitespace_size += base32_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( ( number_of_characters != 0 ) && ( 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: %" PRIzd " does not match character limit: %" PRIu8 ".", function, number_of_characters, character_limit ); return( -1 ); } number_of_characters = 0; } whitespace_size += base32_character_size; } else if( ( base32_character1 == (uint32_t) ' ' ) || ( base32_character1 == (uint32_t) '\t' ) || ( base32_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { 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 += base32_character_size; } } } 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 an EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base32_character1 >= (uint32_t) 'A' ) && ( base32_character1 <= (uint32_t) 'I' ) ) { number_of_characters++; } else if( ( base32_character1 >= (uint32_t) 'J' ) && ( base32_character1 <= (uint32_t) 'R' ) ) { number_of_characters++; } else if( ( base32_character1 >= (uint32_t) 'S' ) && ( base32_character1 <= (uint32_t) 'Z' ) ) { number_of_characters++; } else if( ( base32_character1 >= (uint32_t) '2' ) && ( base32_character1 <= (uint32_t) '7' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: if( ( base32_character1 >= (uint32_t) '0' ) && ( base32_character1 <= (uint32_t) '9' ) ) { number_of_characters++; } /* A-V is not a continous range on an EBCDIC based system * it consists of the ranges: A-I, J-R, S-V */ else if( ( base32_character1 >= (uint32_t) 'A' ) && ( base32_character1 <= (uint32_t) 'I' ) ) { number_of_characters++; } else if( ( base32_character1 >= (uint32_t) 'J' ) && ( base32_character1 <= (uint32_t) 'R' ) ) { number_of_characters++; } else if( ( base32_character1 >= (uint32_t) 'S' ) && ( base32_character1 <= (uint32_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 += base32_character_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 ); } } base32_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 5 bytes for each 8 base32 characters */ safe_byte_stream_size = ( base32_stream_size * 5 ) / ( base32_character_size * 8 ); *byte_stream_size = safe_byte_stream_size * base32_character_size; 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_character_size = 0; size_t base32_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; uint32_t base32_character1 = 0; uint32_t base32_character2 = 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 ); } 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 ); } 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 ); } /* Ignore trailing whitespace */ if( base32_stream_size > base32_character_size ) { base32_stream_index = base32_stream_size - base32_character_size; whitespace_size = 0; while( base32_stream_index > base32_character_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; } base32_stream_index -= base32_character_size; if( ( base32_character1 == (uint32_t) '\n' ) || ( base32_character1 == (uint32_t) '\r' ) ) { whitespace_size += base32_character_size; continue; } else if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } if( ( base32_character1 == (uint32_t) ' ' ) || ( base32_character1 == (uint32_t) '\t' ) || ( base32_character1 == (uint32_t) '\v' ) ) { whitespace_size += base32_character_size; } else { break; } } base32_stream_size -= whitespace_size; } if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } base32_stream_index = 0; while( ( base32_stream_index + base32_character_size ) < base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ base32_stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index ] ), base32_character1 ); break; } if( ( base32_character1 == (uint32_t) '\n' ) || ( base32_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 { /* Handle multi-character end-of-line */ if( ( base32_stream_index + base32_character_size ) < base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character2 = base32_stream[ base32_stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ base32_stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ base32_stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ base32_stream_index + 4 ] ), base32_character2 ); break; } if( ( base32_character2 == (uint32_t) '\n' ) || ( base32_character2 == (uint32_t) '\r' ) ) { base32_stream_index += base32_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; base32_stream_index += base32_character_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 line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base32_character1 == (uint32_t) ' ' ) || ( base32_character1 == (uint32_t) '\t' ) || ( base32_character1 == (uint32_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 += base32_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_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 base32_character_size = 0; size_t safe_base32_stream_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( 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 ); } 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 ); } /* Make sure the base32 stream is able to hold * at least 8 base32 characters for each 5 bytes */ safe_base32_stream_size = byte_stream_size / 5; if( ( byte_stream_size % 5 ) != 0 ) { safe_base32_stream_size += 1; } safe_base32_stream_size *= 8; if( character_limit != 0 ) { whitespace_size = safe_base32_stream_size / character_limit; if( ( safe_base32_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } safe_base32_stream_size += whitespace_size; } *base32_stream_size = safe_base32_stream_size * base32_character_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 safe_base32_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 ); } safe_base32_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, &safe_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 to base32 stream.", function ); return( -1 ); } if( character_limit != 0 ) { number_of_characters += 8; if( number_of_characters >= (size_t) character_limit ) { base32_stream[ safe_base32_stream_index++ ] = (uint8_t) '\n'; number_of_characters = 0; } } } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base32_stream[ safe_base32_stream_index++ ] = (uint8_t) '\n'; } } *base32_stream_index = safe_base32_stream_index; return( 1 ); } libesedb-20240420/Makefile.in0000644000175000017500000012206414610746265016445 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) 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/libesedb/definitions.h \ include/libesedb/features.h include/libesedb/types.h \ dpkg/changelog libesedb.pc libesedb.spec setup.cfg CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } 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_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libesedb.pc.in \ $(srcdir)/libesedb.spec.in $(srcdir)/setup.cfg.in \ $(top_srcdir)/dpkg/changelog.in \ $(top_srcdir)/include/libesedb/definitions.h.in \ $(top_srcdir)/include/libesedb/features.h.in \ $(top_srcdir)/include/libesedb/types.h.in ABOUT-NLS AUTHORS \ COPYING COPYING.LESSER ChangeLog INSTALL NEWS README compile \ config.guess config.rpath config.sub install-sh ltmain.sh \ missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_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 DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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 \ libcerror \ libcthreads \ libcdata \ libclocale \ libcnotify \ libcsplit \ libuna \ libcfile \ libcpath \ libbfio \ libfcache \ libfdata \ libfdatetime \ libfguid \ libfvalue \ libfwnt \ libesedb \ libfmapi \ libmapidb \ esedbtools \ pyesedb \ po \ manuals \ tests \ ossfuzz \ msvscpp DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/rules \ dpkg/libesedb.install \ dpkg/libesedb-dev.install \ dpkg/libesedb-python3.install \ dpkg/libesedb-tools.install \ dpkg/source/format GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libesedb.pc.in SETUP_PY_FILES = \ pyproject.toml \ setup.cfg \ setup.cfg.in \ setup.py SPEC_FILES = \ libesedb.spec \ libesedb.spec.in EXTRA_DIST = \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SETUP_PY_FILES) \ $(SPEC_FILES) DISTCLEANFILES = \ config.status \ config.cache \ config.log \ libesedb.pc \ libesedb.spec \ Makefile \ Makefile.in \ po/Makevars pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libesedb.pc all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ 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/libesedb/definitions.h: $(top_builddir)/config.status $(top_srcdir)/include/libesedb/definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libesedb/features.h: $(top_builddir)/config.status $(top_srcdir)/include/libesedb/features.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libesedb/types.h: $(top_builddir)/config.status $(top_srcdir)/include/libesedb/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 $@ libesedb.pc: $(top_builddir)/config.status $(srcdir)/libesedb.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libesedb.spec: $(top_builddir)/config.status $(srcdir)/libesedb.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ setup.cfg: $(top_builddir)/config.status $(srcdir)/setup.cfg.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) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ 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|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(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__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile 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: sources: sources-recursive sources-am: sources-local splint: splint-recursive splint-am: splint-local uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am uninstall-pkgconfigDATA .PRECIOUS: Makefile libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck lib: library library: (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcdata && $(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)/libesedb && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(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: libesedb-20240420/libfvalue/0000755000175000017500000000000014610746414016340 5ustar00lordyestalordyestalibesedb-20240420/libfvalue/libfvalue_filetime.c0000644000175000017500000000554114610746243022340 0ustar00lordyestalordyesta/* * Filetime functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfvalue_definitions.h" #include "libfvalue_filetime.h" #include "libfvalue_libcerror.h" #include "libfvalue_libfdatetime.h" #if defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) /* Copies the filetime from an integer value * Returns 1 if successful or -1 on error */ int libfvalue_filetime_copy_from_integer( libfdatetime_filetime_t *filetime, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ) { static char *function = "libfvalue_filetime_copy_from_integer"; if( 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 ); } if( libfdatetime_filetime_copy_from_64bit( filetime, integer_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime from 64-bit value.", function ); return( -1 ); } return( 1 ); } /* Copies the filetime to an integer value * Returns 1 if successful or -1 on error */ int libfvalue_filetime_copy_to_integer( libfdatetime_filetime_t *filetime, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ) { static char *function = "libfvalue_filetime_copy_to_integer"; 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 ); } if( libfdatetime_filetime_copy_to_64bit( filetime, integer_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to 64-bit value.", function ); return( -1 ); } *integer_value_size = 64; return( 1 ); } #endif /* defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ libesedb-20240420/libfvalue/libfvalue_utf16_string.c0000644000175000017500000001436614610746243023102 0ustar00lordyestalordyesta/* * UTF-16 string value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfvalue_libcerror.h" #include "libfvalue_split_utf16_string.h" #include "libfvalue_types.h" /* 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_end = NULL; uint16_t *segment_start = NULL; const 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 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size--; } /* Determine the number of segments */ segment_start = (uint16_t *) utf16_string; string_end = utf16_string + utf16_string_size; 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 + 1, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize 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; } string_end = segment_start + utf16_string_size; 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 ); } libesedb-20240420/libfvalue/libfvalue_libfwnt.h0000644000175000017500000000325314610746243022212 0ustar00lordyestalordyesta/* * The libfwnt header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 #include #include #include #include #include /* Note that libfvalue does not require to have libfwnt support */ #elif defined( HAVE_LIBFWNT ) /* 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 /* defined( HAVE_LOCAL_LIBFWNT ) */ #endif /* !defined( _LIBFVALUE_LIBFWNT_H ) */ libesedb-20240420/libfvalue/libfvalue_value.c0000644000175000017500000036432714610746243021670 0ustar00lordyestalordyesta/* * Value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_libcdata.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_types.h" #include "libfvalue_value.h" /* Creates a value * Make sure the value value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfvalue_value_initialize( libfvalue_value_t **value, const char *type_string, const char *type_description, libfvalue_data_handle_t *data_handle, 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_to_byte_stream)( intptr_t *instance, 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 ), uint8_t flags, 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 ); memory_free( internal_value ); return( -1 ); } if( free_instance != NULL ) { if( libcdata_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; } } if( data_handle == NULL ) { /* TODO add read function ? */ if( libfvalue_data_handle_initialize( &( internal_value->data_handle ), NULL, 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; } internal_value->flags |= LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED; } else { internal_value->data_handle = data_handle; } internal_value->type_string = type_string; internal_value->type_description = type_description; 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_to_byte_stream = copy_to_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; internal_value->flags |= flags; *value = (libfvalue_value_t *) internal_value; return( 1 ); on_error: if( internal_value != NULL ) { if( internal_value->value_instances != NULL ) { libcdata_array_free( &( internal_value->value_instances ), NULL, 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 ) { if( libfvalue_value_clear( *value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data handle.", function ); result = -1; } internal_value = (libfvalue_internal_value_t *) *value; *value = NULL; if( internal_value->value_instances != NULL ) { if( libcdata_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; } } if( ( internal_value->flags & LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED ) != 0 ) { if( libfvalue_data_handle_free( &( 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; } internal_value->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED ); } 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_source_value = NULL; libfvalue_data_handle_t *destination_data_handle = 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_data_handle_clone( &destination_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 data handle.", function ); goto on_error; } if( libfvalue_value_initialize( destination_value, internal_source_value->type_string, internal_source_value->type_description, destination_data_handle, 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_to_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, internal_source_value->flags | LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value.", function ); goto on_error; } if( *destination_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination value.", function ); goto on_error; } destination_data_handle = NULL; if( internal_source_value->identifier != NULL ) { if( libfvalue_value_set_identifier( *destination_value, internal_source_value->identifier, internal_source_value->identifier_size, LIBFVALUE_VALUE_IDENTIFIER_FLAG_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; } } /* The value instances are not cloned and are re-created on demand */ return( 1 ); on_error: if( destination_data_handle != NULL ) { libfvalue_data_handle_free( &destination_data_handle, NULL ); } if( *destination_value != NULL ) { libfvalue_value_free( destination_value, NULL ); } return( -1 ); } /* Clears a value * Returns 1 if successful or -1 on error */ int libfvalue_value_clear( libfvalue_value_t *value, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_clear"; 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->flags & LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED ) != 0 ) { if( internal_value->identifier != NULL ) { memory_free( internal_value->identifier ); } internal_value->flags &= ~( LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED ); } if( libfvalue_data_handle_clear( internal_value->data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear data handle.", function ); return( -1 ); } if( internal_value->value_instances != NULL ) { 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( libcdata_array_empty( 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 empty value instances array.", function ); return( -1 ); } } 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 LIBCDATA_COMPARE_LESS, LIBCDATA_COMPARE_EQUAL, LIBCDATA_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( LIBCDATA_COMPARE_LESS ); } else if( result > 0 ) { return( LIBCDATA_COMPARE_GREATER ); } if( internal_first_value->identifier_size < internal_second_value->identifier_size ) { return( LIBCDATA_COMPARE_LESS ); } else if( internal_first_value->identifier_size > internal_second_value->identifier_size ) { return( LIBCDATA_COMPARE_GREATER ); } return( LIBCDATA_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 ); } /* Retrieves the value data flags * Returns 1 if successful or -1 on error */ int libfvalue_value_get_data_flags( libfvalue_value_t *value, uint32_t *data_flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_data_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( libfvalue_data_handle_get_data_flags( internal_value->data_handle, data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data flags from data handle.", function ); return( -1 ); } return( 1 ); } /* Sets the value data flags * Returns 1 if successful or -1 on error */ int libfvalue_value_set_data_flags( libfvalue_value_t *value, uint32_t data_flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_set_data_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( libfvalue_data_handle_set_data_flags( internal_value->data_handle, data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data flags in data handle.", function ); return( -1 ); } 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( libfvalue_data_handle_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 ); } /* Initializes the data * Returns 1 if successful or -1 on error */ int libfvalue_value_initialize_data( 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_initialize_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( ( 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 ); } 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 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value data already set.", 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( libfvalue_data_handle_set_data( internal_value->data_handle, data, data_size, LIBFVALUE_ENDIAN_NATIVE, LIBFVALUE_VALUE_DATA_FLAG_MANAGED | LIBFVALUE_VALUE_DATA_FLAG_CLONE_BY_REFERENCE, 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 ); } /* 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( libfvalue_data_handle_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( libfvalue_data_handle_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( libfvalue_data_handle_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( 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( libfvalue_data_handle_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->value_instances != NULL ) { 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( libcdata_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( libcdata_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 safe_number_of_value_entries = 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( 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( libfvalue_data_handle_get_number_of_value_entries( internal_value->data_handle, &safe_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( internal_value->value_instances != NULL ) { if( libcdata_array_get_number_of_entries( internal_value->value_instances, &safe_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( safe_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 ); } *number_of_value_entries = safe_number_of_value_entries; return( 1 ); } /* Retrieves the entry * Returns 1 if successful, 0 if the value has no data or -1 on error */ int libfvalue_value_get_entry( libfvalue_value_t *value, int value_entry_index, size_t *entry_data_offset, size_t *entry_data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_entry"; 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( entry_data_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry data offset.", function ); return( -1 ); } if( entry_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry data size.", 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( libfvalue_data_handle_get_value_entry( internal_value->data_handle, value_entry_index, entry_data_offset, entry_data_size, 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_size == 0 ) { result = 0; } } if( result == 0 ) { *entry_data_offset = 0; *entry_data_size = 0; } return( result ); } /* Sets the entry * Returns 1 if successful or -1 on error */ int libfvalue_value_set_entry( libfvalue_value_t *value, int value_entry_index, size_t entry_data_offset, size_t entry_data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_set_entry"; 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( libcdata_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( libcdata_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( libfvalue_data_handle_set_value_entry( internal_value->data_handle, value_entry_index, entry_data_offset, entry_data_size, 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 * Returns 1 if successful or -1 on error */ int libfvalue_value_append_entry( libfvalue_value_t *value, int *value_entry_index, size_t entry_data_offset, size_t entry_data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_append_entry"; int entry_index = 0; 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->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( 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( libfvalue_data_handle_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 ); } /* Since the data handle can reallocate the buffer used to store the data * and the value instances reference this data make sure that no stale * value instances are kept around. */ for( entry_index = 0; entry_index < number_of_value_entries; entry_index += 1 ) { if( libcdata_array_get_entry_by_index( internal_value->value_instances, 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, entry_index ); return( -1 ); } if( value_instance != NULL ) { if( libcdata_array_set_entry_by_index( internal_value->value_instances, 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, 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, entry_index ); return( -1 ); } } } if( libcdata_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( libfvalue_data_handle_append_value_entry( internal_value->data_handle, value_entry_index, entry_data_offset, entry_data_size, 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 ); } /* 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( 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_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ); } 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( libfvalue_data_handle_get_value_entry_data( 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 data 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( libcdata_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( libcdata_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 data 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( libfvalue_data_handle_set_value_entry_data( 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->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( 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( libfvalue_data_handle_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 ); } /* Since the data handle can reallocate the buffer used to store the data * and the value instances reference this data make sure that no stale * value instances are kept around. */ for( *value_entry_index = 0; *value_entry_index < number_of_value_entries; *value_entry_index += 1 ) { if( libcdata_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( libcdata_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( libcdata_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( libfvalue_data_handle_append_value_entry_data( 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 ); } /* Copies the entry data * Returns 1 if successful, 0 if the value has no data or -1 on error */ int libfvalue_value_copy_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; uint8_t *value_entry_data = NULL; static char *function = "libfvalue_value_copy_entry_data"; size_t value_entry_data_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( 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_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entry data size value exceeds maximum.", 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( libfvalue_data_handle_get_value_entry_data( internal_value->data_handle, value_entry_index, &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 retrieve entry: %d data from data handle.", function, value_entry_index ); return( -1 ); } if( ( value_entry_data == NULL ) || ( value_entry_data_size == 0 ) ) { result = 0; } } if( result != 0 ) { if( entry_data_size < value_entry_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry: %d data size value out of bounds.", function, value_entry_index ); return( -1 ); } if( memory_copy( entry_data, value_entry_data, value_entry_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy entry: %d data.", function, value_entry_index ); return( -1 ); } } return( result ); } /* 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( libcdata_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( libcdata_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 ); } 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 ); } 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( libcdata_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; 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( 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( 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( 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 = 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( 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_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 ); } libesedb-20240420/libfvalue/libfvalue_value.h0000644000175000017500000004743714610746243021675 0ustar00lordyestalordyesta/* * Value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_VALUE_H ) #define _LIBFVALUE_INTERNAL_VALUE_H #include #include #include #include "libfvalue_extern.h" #include "libfvalue_libcdata.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 */ libfvalue_data_handle_t *data_handle; /* The value instances array */ libcdata_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 to byte stream */ int (*copy_to_byte_stream)( intptr_t *instance, 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, libfvalue_data_handle_t *data_handle, 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_to_byte_stream)( intptr_t *instance, 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 ), uint8_t flags, 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 ); LIBFVALUE_EXTERN \ int libfvalue_value_clear( libfvalue_value_t *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 ); LIBFVALUE_EXTERN \ int libfvalue_value_get_data_flags( libfvalue_value_t *value, uint32_t *data_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_data_flags( libfvalue_value_t *value, uint32_t data_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_has_data( libfvalue_value_t *value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_initialize_data( libfvalue_value_t *value, size_t data_size, 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( libfvalue_value_t *value, int value_entry_index, size_t *entry_data_offset, size_t *entry_data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_entry( libfvalue_value_t *value, int value_entry_index, size_t entry_data_offset, size_t entry_data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_append_entry( libfvalue_value_t *value, int *value_entry_index, size_t entry_data_offset, size_t entry_data_size, 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 ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_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 ); /* 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 /* !defined( _LIBFVALUE_INTERNAL_VALUE_H ) */ libesedb-20240420/libfvalue/libfvalue_definitions.h0000644000175000017500000002470514610746243023065 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240415 /* The libfvalue version string */ #define LIBFVALUE_VERSION_STRING "20240415" /* 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 flags definitions */ enum LIBFVALUE_VALUE_FLAGS { /* The data handle is not managed by the value * the data handle is expected to be available * during the life-time of the value */ LIBFVALUE_VALUE_FLAG_DATA_HANDLE_NON_MANAGED = 0x00, /* The data handle is managed by the value */ LIBFVALUE_VALUE_FLAG_DATA_HANDLE_MANAGED = 0x01, /* 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 = 0x02, /* 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 = 0x04, /* The value has a runtime instance of the value type */ LIBFVALUE_VALUE_FLAG_HAS_RUNTIME_INSTANCE = 0x08, }; /* 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_NULL, 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 date time value format definition flags */ enum LIBFVALUE_DATE_TIME_FORMAT_FLAGS { /* Format the date time value in C time */ LIBFVALUE_DATE_TIME_FORMAT_TYPE_CTIME = 0x00000001UL, /* Format the date time value in ISO 8601 */ LIBFVALUE_DATE_TIME_FORMAT_TYPE_ISO8601 = 0x00000002UL, /* Format the date time value as a date only */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE = 0x00000100UL, /* Format the date time value as a time only */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME = 0x00000200UL, /* Format the date time value as a duration */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_DURATION = 0x00000400UL, /* Format the date time value with a time in milli seconds */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_MILLI_SECONDS = 0x00010000UL, /* Format the date time value with a time in micro seconds */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_MICRO_SECONDS = 0x00020000UL, /* Format the date time value with a time in nano seconds */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_NANO_SECONDS = 0x00040000UL, /* Add a timezone indicator */ LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIMEZONE_INDICATOR = 0x80000000UL, }; #define LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME \ ( LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME ) #define LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME_MILLI_SECONDS \ ( LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_MILLI_SECONDS ) #define LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME_MICRO_SECONDS \ ( LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_MICRO_SECONDS ) #define LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE_TIME_NANO_SECONDS \ ( LIBFVALUE_DATE_TIME_FORMAT_FLAG_DATE | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME | LIBFVALUE_DATE_TIME_FORMAT_FLAG_TIME_NANO_SECONDS ) /* The GUID value format definition flags */ enum LIBFVALUE_GUID_FORMAT_FLAGS { /* Format the using lower case */ LIBFVALUE_GUID_FORMAT_FLAG_USE_LOWER_CASE = 0x00000001UL, /* Format the using upper case */ LIBFVALUE_GUID_FORMAT_FLAG_USE_UPPER_CASE = 0x00000002UL, /* Format the using surrounding braces { GUID } */ LIBFVALUE_GUID_FORMAT_FLAG_USE_SURROUNDING_BRACES = 0x00000004UL }; /* 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 POSIX time value encodings, which need to be combined with a byte order indication */ enum LIBFVALUE_POSIX_TIME_ENCODINGS { LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_SIGNED = 0x00000000UL, LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_UNSIGNED = 0x00000100UL, LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_64BIT_SIGNED = 0x00000200UL, LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_64BIT_UNSIGNED = 0x00000300UL, LIBFVALUE_POSIX_TIME_ENCODING_MICRO_SECONDS_64BIT_SIGNED = 0x00000400UL, LIBFVALUE_POSIX_TIME_ENCODING_MICRO_SECONDS_64BIT_UNSIGNED = 0x00000500UL, LIBFVALUE_POSIX_TIME_ENCODING_NANO_SECONDS_64BIT_SIGNED = 0x00000600UL, LIBFVALUE_POSIX_TIME_ENCODING_NANO_SECONDS_64BIT_UNSIGNED = 0x00000700UL }; #define LIBFVALUE_POSIX_TIME_ENCODING_32BIT_BIG_ENDIAN \ LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_SIGNED | LIBFVALUE_ENDIAN_BIG #define LIBFVALUE_POSIX_TIME_ENCODING_32BIT_LITTLE_ENDIAN \ LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_SIGNED | LIBFVALUE_ENDIAN_LITTLE /* 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 /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( LIBFVALUE_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfvalue/libfvalue_codepage.h0000644000175000017500000000630314610746243022313 0ustar00lordyestalordyesta/* * Codepage functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_CODEPAGES { 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_SCSU = 65002, LIBFVALUE_CODEPAGE_WINDOWS_874 = 874, LIBFVALUE_CODEPAGE_WINDOWS_932 = 932, LIBFVALUE_CODEPAGE_WINDOWS_936 = 936, LIBFVALUE_CODEPAGE_WINDOWS_949 = 949, LIBFVALUE_CODEPAGE_WINDOWS_950 = 950, 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, /* A special codepage to indicate codepage 1200 that uses ASCII strings as well. * This has primarily been seen in the ESE database format. */ LIBFVALUE_CODEPAGE_1200_MIXED = (int) 0x800004b0 }; #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_CODEPAGE_H ) */ libesedb-20240420/libfvalue/libfvalue_split_utf16_string.c0000644000175000017500000003363214610746243024312 0ustar00lordyestalordyesta/* * Split UTF-16 string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_split_utf16_string.h" #include "libfvalue_types.h" /* Creates a split UTF-16 string * Make sure the value split_string is referencing, is set to NULL * 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( *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( 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 a split UTF-16 string * 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 ); } libesedb-20240420/libfvalue/libfvalue_error.c0000644000175000017500000000555414610746243021677 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfvalue_error_sprint( libfvalue_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfvalue_error_backtrace_sprint( libfvalue_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ libesedb-20240420/libfvalue/libfvalue_utf8_string.c0000644000175000017500000001431514610746243023015 0ustar00lordyestalordyesta/* * UTF-8 string value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfvalue_libcerror.h" #include "libfvalue_split_utf8_string.h" #include "libfvalue_types.h" /* 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_end = NULL; uint8_t *segment_start = NULL; const 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 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size--; } /* Determine the number of segments */ segment_start = (uint8_t *) utf8_string; string_end = utf8_string + utf8_string_size; 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 + 1, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize 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; } string_end = segment_start + utf8_string_size; 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 ); } libesedb-20240420/libfvalue/libfvalue_unused.h0000644000175000017500000000261014610746243022044 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_UNUSED_H ) #define _LIBFVALUE_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 /* !defined( _LIBFVALUE_UNUSED_H ) */ libesedb-20240420/libfvalue/libfvalue_split_utf16_string.h0000644000175000017500000000600314610746243024307 0ustar00lordyestalordyesta/* * Split UTF-16 string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_SPLIT_UTF16_STRING_H ) #define _LIBFVALUE_SPLIT_UTF16_STRING_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) /* This inclusion is needed otherwise some linkers mess up exporting the UTF-16 string functions. */ #include "libfvalue_utf16_string.h" #endif #if defined( __cplusplus ) extern "C" { #endif 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_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 /* !defined( _LIBFVALUE_SPLIT_UTF16_STRING_H ) */ libesedb-20240420/libfvalue/libfvalue_filetime.h0000644000175000017500000000313514610746243022342 0ustar00lordyestalordyesta/* * Filetime functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_FILETIME_H ) #define _LIBFVALUE_FILETIME_H #include #include #include "libfvalue_libcerror.h" #include "libfvalue_libfdatetime.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) int libfvalue_filetime_copy_from_integer( libfdatetime_filetime_t *filetime, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); int libfvalue_filetime_copy_to_integer( libfdatetime_filetime_t *filetime, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); #endif /* defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_FILETIME_H ) */ libesedb-20240420/libfvalue/libfvalue_support.c0000644000175000017500000000216314610746243022253 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfvalue/libfvalue_extern.h0000644000175000017500000000257214610746243022055 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFVALUE_EXTERN_VARIABLE extern #else #define LIBFVALUE_EXTERN_VARIABLE LIBFVALUE_EXTERN #endif #else #define LIBFVALUE_EXTERN /* extern */ #define LIBFVALUE_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _LIBFVALUE_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfvalue/Makefile.am0000644000175000017500000000324614610746243020401 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFVALUE AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @PTHREAD_CPPFLAGS@ noinst_LTLIBRARIES = libfvalue.la libfvalue_la_SOURCES = \ 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_filetime.c libfvalue_filetime.h \ libfvalue_floating_point.c libfvalue_floating_point.h \ libfvalue_integer.c libfvalue_integer.h \ libfvalue_libcdata.h \ libfvalue_libcerror.h \ libfvalue_libcnotify.h \ libfvalue_libfdatetime.h \ libfvalue_libfguid.h \ libfvalue_libfwnt.h \ libfvalue_libuna.h \ libfvalue_split_utf8_string.c libfvalue_split_utf8_string.h \ libfvalue_split_utf16_string.c libfvalue_split_utf16_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 \ libfvalue_utf8_string.c libfvalue_utf8_string.h \ libfvalue_utf16_string.c libfvalue_utf16_string.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfvalue ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvalue_la_SOURCES) libesedb-20240420/libfvalue/libfvalue_value_type.h0000644000175000017500000000541714610746243022726 0ustar00lordyestalordyesta/* * Value type functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_libfdatetime.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, libfvalue_data_handle_t *data_handle, uint8_t flags, 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( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) int libfvalue_value_type_posix_time_copy_from_byte_stream( libfdatetime_posix_time_t *posix_time, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); #endif /* defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_VALUE_TYPE_H ) */ libesedb-20240420/libfvalue/libfvalue_libcerror.h0000644000175000017500000000264114610746243022530 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFVALUE_LIBCERROR_H ) */ libesedb-20240420/libfvalue/libfvalue_split_utf8_string.c0000644000175000017500000003303614610746243024231 0ustar00lordyestalordyesta/* * Split UTF-8 string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_split_utf8_string.h" #include "libfvalue_types.h" /* Creates a split UTF-8 string * Make sure the value split_string is referencing, is set to NULL * 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( *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( 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 a split UTF-8 string * 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 ); } libesedb-20240420/libfvalue/libfvalue_data_handle.h0000644000175000017500000001200714610746243022766 0ustar00lordyestalordyesta/* * Data handle functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_DATA_HANDLE_H ) #define _LIBFVALUE_INTERNAL_DATA_HANDLE_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcdata.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 data flags */ uint32_t data_flags; /* The value entries array */ libcdata_array_t *value_entries; /* The read value entries function */ int (*read_value_entries)( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint32_t data_flags, libcerror_error_t **error ); /* The flags */ uint8_t flags; }; LIBFVALUE_EXTERN \ int libfvalue_data_handle_initialize( libfvalue_data_handle_t **data_handle, int (*read_value_entries)( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint32_t data_flags, libcerror_error_t **error ), libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_free( libfvalue_data_handle_t **data_handle, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_clone( libfvalue_data_handle_t **destination_data_handle, libfvalue_data_handle_t *source_data_handle, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_clear( libfvalue_data_handle_t *data_handle, libcerror_error_t **error ); LIBFVALUE_EXTERN \ 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_EXTERN \ 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_EXTERN \ int libfvalue_data_handle_get_data_flags( libfvalue_data_handle_t *data_handle, uint32_t *data_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_set_data_flags( libfvalue_data_handle_t *data_handle, uint32_t data_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ 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_EXTERN \ int libfvalue_data_handle_get_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, size_t *value_entry_offset, size_t *value_entry_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_set_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, size_t value_entry_offset, size_t value_entry_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_append_value_entry( libfvalue_data_handle_t *data_handle, int *value_entry_index, size_t value_entry_offset, size_t value_entry_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_data_handle_get_value_entry_data( 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_EXTERN \ int libfvalue_data_handle_set_value_entry_data( 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_EXTERN \ int libfvalue_data_handle_append_value_entry_data( 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 /* !defined( _LIBFVALUE_INTERNAL_DATA_HANDLE_H ) */ libesedb-20240420/libfvalue/libfvalue_libcnotify.h0000644000175000017500000000254314610746243022710 0ustar00lordyestalordyesta/* * The internal libcnotify header * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfvalue/libfvalue_data_handle.c0000644000175000017500000011673614610746243022777 0ustar00lordyestalordyesta/* * Data handle functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_libcdata.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #include "libfvalue_value_entry.h" /* Creates a data handle * Make sure the value data_handle is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_initialize( libfvalue_data_handle_t **data_handle, int (*read_value_entries)( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint32_t data_flags, libcerror_error_t **error ), 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; } internal_data_handle->read_value_entries = read_value_entries; *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 a 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->value_entries != NULL ) { if( libcdata_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; } } if( ( internal_data_handle->flags & LIBFVALUE_VALUE_DATA_FLAG_MANAGED ) != 0 ) { if( internal_data_handle->data != NULL ) { memory_free( internal_data_handle->data ); } } 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, internal_source_data_handle->read_value_entries, 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( libcdata_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 ); } /* Clears a data handle * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_clear( 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_clear"; 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->value_entries != NULL ) { if( libcdata_array_empty( 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 empty value instances array.", function ); 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->encoding = 0; internal_data_handle->data_flags = 0; 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( data == NULL ) { if( data_size != 0 ) { 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 ); } } else { 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( ( 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 data flags * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_get_data_flags( libfvalue_data_handle_t *data_handle, uint32_t *data_flags, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_get_data_flags"; 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_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data flags.", function ); return( -1 ); } *data_flags = internal_data_handle->data_flags; return( 1 ); } /* Sets the data flags * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_set_data_flags( libfvalue_data_handle_t *data_handle, uint32_t data_flags, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_set_data_flags"; 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; internal_data_handle->data_flags = data_flags; return( 1 ); } /* Retrieves the number of value entries * Returns 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( libcdata_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 * Returns if successful or -1 on error */ int libfvalue_data_handle_get_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, size_t *value_entry_offset, size_t *value_entry_size, 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_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry offset.", function ); return( -1 ); } if( value_entry_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry size.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { *value_entry_offset = 0; *value_entry_size = internal_data_handle->data_size; } else { if( libcdata_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: %d.", function, value_entry_index ); return( -1 ); } *value_entry_offset = value_entry->offset; *value_entry_size = value_entry->size; } return( 1 ); } /* Sets a specific value entry * Returns if successful or -1 on error */ int libfvalue_data_handle_set_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, size_t value_entry_offset, size_t value_entry_size, 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_offset > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry offset value exceeds maximum.", function ); return( -1 ); } if( value_entry_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry size value exceeds maximum.", function ); return( -1 ); } if( value_entry_offset > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry offset value out of bounds.", function ); return( -1 ); } if( ( value_entry_size > internal_data_handle->data_size ) || ( value_entry_offset > ( internal_data_handle->data_size - value_entry_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry size 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_offset != 0 ) || ( value_entry_size != internal_data_handle->data_size ) ) { 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 ); return( -1 ); } value_entry->offset = value_entry_offset; value_entry->size = value_entry_size; if( libcdata_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 ); libfvalue_value_entry_free( &value_entry, NULL ); return( -1 ); } if( libcdata_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 ); libfvalue_value_entry_free( &value_entry, NULL ); libcdata_array_free( &( internal_data_handle->value_entries ), NULL, NULL ); return( -1 ); } value_entry = NULL; } } else { if( libcdata_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 ); } value_entry->offset = value_entry_offset; value_entry->size = value_entry_size; } return( 1 ); } /* Appends a value entry * Returns if successful or -1 on error */ int libfvalue_data_handle_append_value_entry( libfvalue_data_handle_t *data_handle, int *value_entry_index, size_t value_entry_offset, size_t value_entry_size, 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_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_offset > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry offset value exceeds maximum.", function ); return( -1 ); } if( value_entry_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry size value exceeds maximum.", function ); return( -1 ); } if( value_entry_offset > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry offset value out of bounds.", function ); return( -1 ); } if( ( value_entry_size > internal_data_handle->data_size ) || ( value_entry_offset > ( internal_data_handle->data_size - value_entry_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry size value out of bounds.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { if( libcdata_array_initialize( &( internal_data_handle->value_entries ), 0, 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 = value_entry_offset; value_entry->size = value_entry_size; if( libcdata_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 ); } /* Retrieves the data of a specific value entry * Returns if successful or -1 on error */ int libfvalue_data_handle_get_value_entry_data( 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; static char *function = "libfvalue_data_handle_get_value_entry_data"; size_t value_entry_offset = 0; size_t value_entry_size = 0; 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( libfvalue_data_handle_get_value_entry( data_handle, value_entry_index, &value_entry_offset, &value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry: %d.", function, value_entry_index ); 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: %d offset out of bounds.", function, value_entry_index ); return( -1 ); } if( ( value_entry_size > internal_data_handle->data_size ) || ( value_entry_offset > ( internal_data_handle->data_size - value_entry_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry: %d size out of bounds.", function, value_entry_index ); return( -1 ); } if( value_entry_size == 0 ) { *value_entry_data = NULL; } else { *value_entry_data = &( ( internal_data_handle->data )[ value_entry_offset ] ); } *value_entry_data_size = value_entry_size; *encoding = internal_data_handle->encoding; return( 1 ); } /* Sets the data of a specific value entry * Returns if successful or -1 on error */ int libfvalue_data_handle_set_value_entry_data( 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; static char *function = "libfvalue_data_handle_set_value_entry_data"; size_t value_entry_offset = 0; size_t value_entry_size = 0; 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 ); } /* TODO remove limitation */ 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( libfvalue_data_handle_get_value_entry( data_handle, value_entry_index, &value_entry_offset, &value_entry_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value entry: %d.", function, value_entry_index ); 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: %d offset out of bounds.", function, value_entry_index ); return( -1 ); } if( ( value_entry_size > internal_data_handle->data_size ) || ( value_entry_offset > ( internal_data_handle->data_size - value_entry_size ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry: %d size out of bounds.", function, value_entry_index ); return( -1 ); } if( value_entry_data_size != value_entry_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 the data of a value entry * Returns if successful or -1 on error */ int libfvalue_data_handle_append_value_entry_data( 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_append_value_entry_data"; void *reallocation = NULL; size_t reallocation_data_size = 0; 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 > ( (size_t) SSIZE_MAX - value_entry_data_size ) ) { 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( libcdata_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( libcdata_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_data_size = internal_data_handle->data_size + value_entry_data_size; reallocation = memory_reallocate( internal_data_handle->data, reallocation_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 = reallocation_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( libcdata_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 ); } libesedb-20240420/libfvalue/libfvalue_integer.c0000644000175000017500000021212014610746243022170 0ustar00lordyestalordyesta/* * Integer value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_integer.h" #include "libfvalue_libcerror.h" /* Creates an integer * Make sure the value integer is referencing, is set to NULL * 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_length, 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_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 %" 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_length, 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_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 %" 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_length, 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_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 %" 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( ( string_format_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 safe_utf8_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 ); } safe_utf8_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( ( string_format_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( ( number_of_characters > utf8_string_size ) || ( safe_utf8_string_index > ( utf8_string_size - number_of_characters ) ) ) { 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[ safe_utf8_string_index++ ] = (uint8_t) 'f'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'a'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'l'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 's'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'e'; } else { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 't'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'r'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'u'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '0'; utf8_string[ safe_utf8_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[ safe_utf8_string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '-'; } while( divider > 1 ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); } utf8_string[ safe_utf8_string_index++ ] = 0; *utf8_string_index = safe_utf8_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 safe_utf8_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 ); } safe_utf8_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( ( string_format_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 += safe_utf8_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( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { character_value = utf8_string[ safe_utf8_string_index++ ]; if( character_value != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } character_value = utf8_string[ safe_utf8_string_index++ ]; if( character_value != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } } while( safe_utf8_string_index < utf8_string_length ) { character_value = utf8_string[ safe_utf8_string_index ]; if( character_value == 0 ) { break; } if( safe_utf8_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( ( character_value >= (uint8_t) '0' ) && ( character_value <= (uint8_t) '9' ) ) { byte_value = character_value - (uint8_t) '0'; } else if( ( character_value >= (uint8_t) 'A' ) && ( character_value <= (uint8_t) 'F' ) ) { byte_value = character_value - (uint8_t) 'A' + 10; } else if( ( character_value >= (uint8_t) 'a' ) && ( character_value <= (uint8_t) 'f' ) ) { byte_value = character_value - (uint8_t) 'a' + 10; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf8_string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { character_value = utf8_string[ safe_utf8_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint8_t) '-' ) { safe_utf8_string_index++; sign = -1; } else if( character_value == (uint8_t) '+' ) { safe_utf8_string_index++; } } while( safe_utf8_string_index < utf8_string_length ) { character_value = utf8_string[ safe_utf8_string_index ]; if( character_value == 0 ) { break; } if( safe_utf8_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( ( character_value < (uint8_t) '0' ) || ( character_value > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } character_value -= (uint8_t) '0'; value_64bit += character_value; safe_utf8_string_index++; } if( ( sign == -1 ) && ( value_64bit != 0 ) ) { value_64bit = ~( value_64bit - 1 ); } } *utf8_string_index = safe_utf8_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 safe_utf16_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 ); } safe_utf16_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( ( string_format_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( ( number_of_characters > utf16_string_size ) || ( safe_utf16_string_index > ( utf16_string_size - number_of_characters ) ) ) { 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[ safe_utf16_string_index++ ] = (uint16_t) 'f'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'a'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'l'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 's'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'e'; } else { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 't'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'r'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'u'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0'; utf16_string[ safe_utf16_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[ safe_utf16_string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '-'; } while( divider > 1 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); } utf16_string[ safe_utf16_string_index++ ] = 0; *utf16_string_index = safe_utf16_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 safe_utf16_string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t character_value = 0; uint8_t byte_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 ); } safe_utf16_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( ( string_format_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 += safe_utf16_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( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { character_value = utf16_string[ safe_utf16_string_index++ ]; if( character_value != (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, character_value, safe_utf16_string_index ); return( -1 ); } character_value = utf16_string[ safe_utf16_string_index++ ]; if( character_value != (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, character_value, safe_utf16_string_index ); return( -1 ); } } while( safe_utf16_string_index < utf16_string_length ) { character_value = utf16_string[ safe_utf16_string_index ]; if( character_value == 0 ) { break; } if( safe_utf16_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( ( character_value >= (uint16_t) '0' ) && ( character_value <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( character_value - (uint16_t) '0' ); } else if( ( character_value >= (uint16_t) 'A' ) && ( character_value <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( character_value - (uint16_t) 'A' + 10 ); } else if( ( character_value >= (uint16_t) 'a' ) && ( character_value <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( character_value - (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, character_value, safe_utf16_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf16_string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { character_value = utf16_string[ safe_utf16_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint16_t) '-' ) { safe_utf16_string_index++; sign = -1; } else if( character_value == (uint16_t) '+' ) { safe_utf16_string_index++; } } while( safe_utf16_string_index < utf16_string_length ) { character_value = utf16_string[ safe_utf16_string_index ]; if( character_value == 0 ) { break; } if( safe_utf16_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( ( character_value < (uint16_t) '0' ) || ( character_value > (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, character_value, safe_utf16_string_index ); return( -1 ); } character_value = (uint8_t) ( character_value - (uint16_t) '0' ); value_64bit += character_value; safe_utf16_string_index++; } if( ( sign == -1 ) && ( value_64bit != 0 ) ) { value_64bit = ~( value_64bit - 1 ); } } *utf16_string_index = safe_utf16_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 safe_utf32_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 ); } safe_utf32_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( ( string_format_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( ( number_of_characters > utf32_string_size ) || ( safe_utf32_string_index > ( utf32_string_size - number_of_characters ) ) ) { 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[ safe_utf32_string_index++ ] = (uint32_t) 'f'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'a'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'l'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 's'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'e'; } else { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 't'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'r'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'u'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0'; utf32_string[ safe_utf32_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[ safe_utf32_string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '-'; } while( divider > 1 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); } utf32_string[ safe_utf32_string_index++ ] = 0; *utf32_string_index = safe_utf32_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 safe_utf32_string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t character_value = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_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 ); } safe_utf32_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( ( string_format_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 += safe_utf32_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( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { character_value = utf32_string[ safe_utf32_string_index++ ]; if( character_value != (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, character_value, safe_utf32_string_index ); return( -1 ); } character_value = utf32_string[ safe_utf32_string_index++ ]; if( character_value != (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, character_value, safe_utf32_string_index ); return( -1 ); } } while( safe_utf32_string_index < utf32_string_length ) { character_value = utf32_string[ safe_utf32_string_index ]; if( character_value == 0 ) { break; } if( safe_utf32_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( ( character_value >= (uint32_t) '0' ) && ( character_value <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( character_value - (uint32_t) '0' ); } else if( ( character_value >= (uint32_t) 'A' ) && ( character_value <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( character_value - (uint32_t) 'A' + 10 ); } else if( ( character_value >= (uint32_t) 'a' ) && ( character_value <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( character_value - (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, character_value, safe_utf32_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf32_string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { character_value = utf32_string[ safe_utf32_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint32_t) '-' ) { safe_utf32_string_index++; sign = -1; } else if( character_value == (uint32_t) '+' ) { safe_utf32_string_index++; } } while( safe_utf32_string_index < utf32_string_length ) { character_value = utf32_string[ safe_utf32_string_index ]; if( character_value == 0 ) { break; } if( safe_utf32_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( ( character_value < (uint32_t) '0' ) || ( character_value > (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, character_value, safe_utf32_string_index ); return( -1 ); } character_value = (uint8_t) ( character_value - (uint32_t) '0' ); value_64bit += character_value; safe_utf32_string_index++; } if( ( sign == -1 ) && ( value_64bit != 0 ) ) { value_64bit = ~( value_64bit - 1 ); } } *utf32_string_index = safe_utf32_string_index; *integer_value = value_64bit; return( 1 ); } libesedb-20240420/libfvalue/libfvalue_value_type.c0000644000175000017500000011562314610746243022722 0ustar00lordyestalordyesta/* * Value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libfvalue_binary_data.h" #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_filetime.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 ) || defined( HAVE_LOCAL_LIBFDATETIME ) #include "libfvalue_libfdatetime.h" #endif #if defined( HAVE_LIBFGUID ) || defined( HAVE_LOCAL_LIBFGUID ) #include "libfvalue_libfguid.h" #endif #if defined( HAVE_LIBFWNT ) || defined( HAVE_LOCAL_LIBFWNT ) #include "libfvalue_libfwnt.h" #endif const char *libfvalue_value_type_strings[ 28 ] = { NULL, "binary-data", "boolean", "enum", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "float32", "float64", "NULL", "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[ 28 ] = { 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)", "Null (None)", "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)", }; /* Creates a value of a specific type * Make sure the value value is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfvalue_value_type_initialize( libfvalue_value_t **value, int type, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_initialize"; if( libfvalue_value_type_initialize_with_data_handle( value, type, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value with data handle.", function ); return( -1 ); } 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, libfvalue_data_handle_t *data_handle, uint8_t flags, 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, (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, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_get_utf8_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_utf16_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_utf32_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, flags, 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, (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, NULL, (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, (int (*)(intptr_t *, double, size_t, libcerror_error_t **)) &libfvalue_floating_point_copy_from_floating_point, (int (*)(intptr_t *, double *, size_t *, libcerror_error_t **)) &libfvalue_floating_point_copy_to_floating_point, (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, flags, 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, (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, NULL, (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, flags, error ); break; case LIBFVALUE_VALUE_TYPE_NULL: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, flags, 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, (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, 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, flags, error ); break; #if defined( HAVE_LIBFDATETIME ) || 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, (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, 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, flags, error ); break; case LIBFVALUE_VALUE_TYPE_FILETIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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, (int (*)(intptr_t *, uint64_t, size_t, libcerror_error_t **)) &libfvalue_filetime_copy_from_integer, (int (*)(intptr_t *, uint64_t *, size_t *, libcerror_error_t **)) &libfvalue_filetime_copy_to_integer, 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, flags, error ); break; case LIBFVALUE_VALUE_TYPE_FLOATINGTIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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, 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, flags, 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, (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, 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, flags, 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, (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 **)) &libfvalue_value_type_posix_time_copy_from_byte_stream, NULL, 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, flags, error ); break; case LIBFVALUE_VALUE_TYPE_SYSTEMTIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, (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, 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, flags, error ); break; #endif /* defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( HAVE_LIBFGUID ) || 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, (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, (int (*)(intptr_t *, uint8_t *, size_t, int, libcerror_error_t **)) &libfguid_identifier_copy_to_byte_stream, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_from_utf8_string_with_index, (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, (int (*)(intptr_t *, const uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_from_utf16_string_with_index, (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, (int (*)(intptr_t *, const uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_from_utf32_string_with_index, (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, flags, error ); break; #endif /* defined( HAVE_LIBFGUID ) || defined( HAVE_LOCAL_LIBFGUID ) */ #if defined( HAVE_LIBFWNT ) || 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, (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, 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, flags, error ); break; #endif /* defined( HAVE_LIBFWNT ) || defined( HAVE_LOCAL_LIBFWNT ) */ 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_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( 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 ) { if( data_size < 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data size value too small.", function ); return( -1 ); } while( data_index <= ( data_size - 2 ) ) { 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 ) { if( data_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data size value too small.", function ); return( -1 ); } while( data_index <= ( data_size - 4 ) ) { 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 /* defined( HAVE_DEBUG_OUTPUT ) */ } 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( data_index == 0 ) { break; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: strings array value entry: %d data offset: 0x%08" PRIzx "\n", function, value_entry_index, last_data_index ); 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 ); } #if defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) /* Helper function for libfvalue value type to covert a byte stream into a POSIX time using libfdatetime * Returns 1 if successful or -1 on error */ int libfvalue_value_type_posix_time_copy_from_byte_stream( libfdatetime_posix_time_t *posix_time, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_posix_time_copy_from_byte_stream"; int byte_order = 0; uint8_t value_type = 0; byte_order = encoding & 0xff; if( ( byte_order != LIBFVALUE_ENDIAN_BIG ) && ( byte_order != LIBFVALUE_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order: 0x%02x in encoding: 0x%08x.", function, byte_order, encoding ); return( -1 ); } switch( encoding & 0xffffff00UL ) { case LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_SIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_32BIT_UNSIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_64BIT_SIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_SECONDS_64BIT_UNSIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_MICRO_SECONDS_64BIT_SIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_MICRO_SECONDS_64BIT_UNSIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_NANO_SECONDS_64BIT_SIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED; break; case LIBFVALUE_POSIX_TIME_ENCODING_NANO_SECONDS_64BIT_UNSIGNED: value_type = LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%08x in encoding: 0x%08x.", function, encoding & 0xffffff00UL, encoding ); return( -1 ); } if( libfdatetime_posix_time_copy_from_byte_stream( posix_time, byte_stream, byte_stream_size, byte_order, value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time from byte stream.", function ); return( -1 ); } return( 1 ); } #endif /* defined( HAVE_LIBFDATETIME ) || defined( HAVE_LOCAL_LIBFDATETIME ) */ libesedb-20240420/libfvalue/libfvalue_integer.h0000644000175000017500000001643014610746243022203 0ustar00lordyestalordyesta/* * Integer value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFVALUE_INTEGER_H ) */ libesedb-20240420/libfvalue/libfvalue_binary_data.h0000644000175000017500000000630014610746243023016 0ustar00lordyestalordyesta/* * Binary data value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_utf8_string_size( libfvalue_binary_data_t *binary_data, size_t *utf8_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_get_utf16_string_size( libfvalue_binary_data_t *binary_data, size_t *utf16_string_size, 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_get_utf32_string_size( libfvalue_binary_data_t *binary_data, size_t *utf32_string_size, 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 /* !defined( _LIBFVALUE_BINARY_DATA_H ) */ libesedb-20240420/libfvalue/libfvalue_value_entry.h0000644000175000017500000000320114610746243023073 0ustar00lordyestalordyesta/* * Value entry functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFVALUE_VALUE_ENTRY_H ) */ libesedb-20240420/libfvalue/libfvalue_utf16_string.h0000644000175000017500000000262314610746243023100 0ustar00lordyestalordyesta/* * UTF-16 string value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBVALUE_UTF16_STRING_H ) #define _LIBVALUE_UTF16_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 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 /* !defined( _LIBVALUE_UTF16_STRING_H ) */ libesedb-20240420/libfvalue/libfvalue_error.h0000644000175000017500000000343214610746243021675 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( HAVE_LOCAL_LIBFVALUE ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_INTERNAL_ERROR_H ) */ libesedb-20240420/libfvalue/libfvalue_table.h0000644000175000017500000000667314610746243021645 0ustar00lordyestalordyesta/* * Values table functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_TABLE_H ) #define _LIBFVALUE_INTERNAL_TABLE_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcdata.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 */ libcdata_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 /* !defined( _LIBFVALUE_INTERNAL_TABLE_H ) */ libesedb-20240420/libfvalue/libfvalue_libfguid.h0000644000175000017500000000272714610746243022337 0ustar00lordyestalordyesta/* * The libfguid header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* Note that libfvalue does not require to have libfguid support */ #elif defined( HAVE_LIBFGUID ) /* 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 /* defined( HAVE_LOCAL_LIBFGUID ) */ #endif /* !defined( _LIBFVALUE_LIBFGUID_H ) */ libesedb-20240420/libfvalue/libfvalue_split_utf8_string.h0000644000175000017500000000574014610746243024237 0ustar00lordyestalordyesta/* * Split UTF-8 string functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_SPLIT_UTF8_STRING_H ) #define _LIBFVALUE_SPLIT_UTF8_STRING_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) /* This inclusion is needed otherwise some linkers mess up exporting the UTF-8 string functions. */ #include "libfvalue_utf8_string.h" #endif #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; }; 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 ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFVALUE_SPLIT_UTF8_STRING_H ) */ libesedb-20240420/libfvalue/libfvalue_floating_point.h0000644000175000017500000001671214610746243023565 0ustar00lordyestalordyesta/* * Floating point value (IEEE 754) functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_copy_from_floating_point( libfvalue_floating_point_t *floating_point, double floating_point_value, size_t floating_point_value_size, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_floating_point( libfvalue_floating_point_t *floating_point, double *floating_point_value, size_t *floating_point_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 /* !defined( _LIBFVALUE_FLOATING_POINT_H ) */ libesedb-20240420/libfvalue/libfvalue_libfdatetime.h0000644000175000017500000000344714610746243023203 0ustar00lordyestalordyesta/* * The libfdatetime header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* Note that libfvalue does not require to have libfdatetime support */ #elif defined( HAVE_LIBFDATETIME ) /* 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 /* defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFVALUE_LIBFDATETIME_H ) */ libesedb-20240420/libfvalue/libfvalue_string.h0000644000175000017500000001054314610746243022053 0ustar00lordyestalordyesta/* * String value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBVALUE_STRING_H ) */ libesedb-20240420/libfvalue/libfvalue_binary_data.c0000644000175000017500000011574114610746243023023 0ustar00lordyestalordyesta/* * Binary data value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfvalue_binary_data.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libuna.h" /* Creates a binary data * Make sure the value binary_data is referencing, is set to NULL * 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( byte_stream == NULL ) { if( byte_stream_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid byte stream size value out of bounds.", function ); return( -1 ); } } else { 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 != 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 an UTF-8 formatted string of the binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_get_utf8_string_size( libfvalue_binary_data_t *binary_data, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_get_utf8_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 ); } 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 ); } 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 ); } *utf8_string_size = 0; if( ( binary_data->data != NULL ) && ( binary_data->data_size != 0 ) ) { 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, utf8_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 UTF-8 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, utf8_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 UTF-8 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, utf8_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 UTF-8 string of base64 formatted binary data.", function ); return( -1 ); } break; } } /* Add space for the end-of-string character */ *utf8_string_size += 1; 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 ); } 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 ); } 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 ) ) { 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; } } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; return( 1 ); } /* Retrieves the size of an UTF-16 formatted string of the binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_get_utf16_string_size( libfvalue_binary_data_t *binary_data, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_get_utf16_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 ); } 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 ); } 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 ); } *utf16_string_size = 0; if( ( binary_data->data != NULL ) && ( binary_data->data_size != 0 ) ) { 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_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base16_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf16_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 UTF-16 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( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base32_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf16_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 UTF-16 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( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base64_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf16_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 UTF-16 string of base64 formatted binary data.", function ); return( -1 ); } break; } /* The size returned is the size of the byte stream and the size needed * should be the number of characters */ *utf16_string_size /= sizeof( uint16_t ); } /* Add space for the end-of-string character */ *utf16_string_size += 1; 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; size_t string_size = 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 == 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 ); } 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 ) ) { string_index = *utf16_string_index * sizeof( uint16_t ); string_size = utf16_string_size * sizeof( uint16_t ); 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_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base16_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, 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 ); } 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_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base32_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, 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 ); } 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_UTF16_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } if( libuna_base64_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, 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 ); } break; } *utf16_string_index = string_index / sizeof( uint16_t ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; return( 1 ); } /* Retrieves the size of an UTF-32 formatted string of the binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_get_utf32_string_size( libfvalue_binary_data_t *binary_data, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_get_utf32_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 ); } 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 ); } 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 ); } *utf32_string_size = 0; if( ( binary_data->data != NULL ) && ( binary_data->data_size != 0 ) ) { 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 ); } if( libuna_base16_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf32_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 UTF-32 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( _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 ); } if( libuna_base32_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf32_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 UTF-32 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( _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 ); } if( libuna_base64_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, utf32_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 UTF-32 string of base64 formatted binary data.", function ); return( -1 ); } break; } /* The size returned is the size of the byte stream and the size needed * should be the number of characters */ *utf32_string_size /= sizeof( uint32_t ); } /* Add space for the end-of-string character */ *utf32_string_size += 1; 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; size_t string_size = 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 == 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 ); } 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 ) ) { string_index = *utf32_string_index * sizeof( uint32_t ); string_size = utf32_string_size * sizeof( uint32_t ); 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 ); } if( libuna_base16_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, 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 ); } 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 ); } if( libuna_base32_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, 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 ); } 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 ); } if( libuna_base64_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, 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 ); } break; } *utf32_string_index = string_index / sizeof( uint32_t ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; return( 1 ); } libesedb-20240420/libfvalue/libfvalue_value_entry.c0000644000175000017500000001106614610746243023076 0ustar00lordyestalordyesta/* * Value entry functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_value_entry.h" /* Creates a value entry * Make sure the value value_entry is referencing, is set to NULL * 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 ); } libesedb-20240420/libfvalue/libfvalue_libcdata.h0000644000175000017500000000301714610746243022306 0ustar00lordyestalordyesta/* * The libcdata header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_LIBCDATA_H ) #define _LIBFVALUE_LIBCDATA_H #include /* Define HAVE_LOCAL_LIBCDATA for local use of libcdata */ #if defined( HAVE_LOCAL_LIBCDATA ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT * before including libcdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCDATA_DLL_IMPORT #endif #include #endif /* defined( HAVE_LOCAL_LIBCDATA ) */ #endif /* !defined( _LIBFVALUE_LIBCDATA_H ) */ libesedb-20240420/libfvalue/libfvalue_support.h0000644000175000017500000000225714610746243022264 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFVALUE_SUPPORT_H ) */ libesedb-20240420/libfvalue/libfvalue_table.c0000644000175000017500000007671314610746243021642 0ustar00lordyestalordyesta/* * Values table functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfvalue_codepage.h" #include "libfvalue_definitions.h" #include "libfvalue_libcdata.h" #include "libfvalue_libcerror.h" #include "libfvalue_table.h" #include "libfvalue_types.h" #include "libfvalue_value.h" #include "libfvalue_value_type.h" /* Creates a values table * Make sure the value table is referencing, is set to NULL * 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 ); memory_free( internal_table ); return( -1 ); } if( libcdata_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 ) { libfvalue_internal_table_t *internal_table = NULL; 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 ) { internal_table = (libfvalue_internal_table_t *) *table; *table = NULL; if( libcdata_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( libcdata_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( libcdata_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_source_table = (libfvalue_internal_table_t *) source_table; 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( libcdata_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( libcdata_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( libcdata_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( libcdata_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( libcdata_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( libcdata_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( libcdata_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( libcdata_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( libcdata_array_insert_entry( internal_table->values, &value_index, (intptr_t *) value, &libfvalue_compare_identifier, LIBCDATA_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( libcdata_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( libcdata_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 == 0 ) || ( 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( libcdata_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; } if( string_index >= utf8_string_size ) { break; } /* 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++; if( string_index >= utf8_string_size ) { break; } } 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++; } if( string_index >= utf8_string_size ) { break; } /* 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++; } if( string_index >= utf8_string_size ) { break; } /* Look for the end of the XML tag: '>' */ if( utf8_string[ string_index++ ] != 0x3e ) { continue; } if( string_index >= utf8_string_size ) { break; } 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 ) && ( 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 ) && ( narrow_string_compare( xml_table_name, xml_tag_name, xml_tag_name_length ) == 0 ) ) { xml_table_name = NULL; 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 ) && ( 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_IDENTIFIER_FLAG_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( libcdata_array_insert_entry( internal_table->values, &value_index, (intptr_t *) value, &libfvalue_compare_identifier, LIBCDATA_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( libcdata_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 '&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_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_filetime.c libfvalue_filetime.h \ libfvalue_floating_point.c libfvalue_floating_point.h \ libfvalue_integer.c libfvalue_integer.h libfvalue_libcdata.h \ libfvalue_libcerror.h libfvalue_libcnotify.h \ libfvalue_libfdatetime.h libfvalue_libfguid.h \ libfvalue_libfwnt.h libfvalue_libuna.h \ libfvalue_split_utf8_string.c libfvalue_split_utf8_string.h \ libfvalue_split_utf16_string.c libfvalue_split_utf16_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 libfvalue_utf8_string.c \ libfvalue_utf8_string.h libfvalue_utf16_string.c \ libfvalue_utf16_string.h @HAVE_LOCAL_LIBFVALUE_TRUE@am_libfvalue_la_OBJECTS = \ @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_filetime.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_floating_point.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_integer.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_split_utf8_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_split_utf16_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 \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_utf8_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_utf16_string.lo libfvalue_la_OBJECTS = $(am_libfvalue_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFVALUE_TRUE@am_libfvalue_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfvalue_binary_data.Plo \ ./$(DEPDIR)/libfvalue_data_handle.Plo \ ./$(DEPDIR)/libfvalue_error.Plo \ ./$(DEPDIR)/libfvalue_filetime.Plo \ ./$(DEPDIR)/libfvalue_floating_point.Plo \ ./$(DEPDIR)/libfvalue_integer.Plo \ ./$(DEPDIR)/libfvalue_split_utf16_string.Plo \ ./$(DEPDIR)/libfvalue_split_utf8_string.Plo \ ./$(DEPDIR)/libfvalue_string.Plo \ ./$(DEPDIR)/libfvalue_support.Plo \ ./$(DEPDIR)/libfvalue_table.Plo \ ./$(DEPDIR)/libfvalue_utf16_string.Plo \ ./$(DEPDIR)/libfvalue_utf8_string.Plo \ ./$(DEPDIR)/libfvalue_value.Plo \ ./$(DEPDIR)/libfvalue_value_entry.Plo \ ./$(DEPDIR)/libfvalue_value_type.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfvalue_la_SOURCES) DIST_SOURCES = $(am__libfvalue_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFVALUE_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCTHREADS_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCDATA_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@ @PTHREAD_CPPFLAGS@ @HAVE_LOCAL_LIBFVALUE_TRUE@noinst_LTLIBRARIES = libfvalue.la @HAVE_LOCAL_LIBFVALUE_TRUE@libfvalue_la_SOURCES = \ @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_filetime.c libfvalue_filetime.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_libcdata.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcerror.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcnotify.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_utf8_string.c libfvalue_split_utf8_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_split_utf16_string.c libfvalue_split_utf16_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 \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_utf8_string.c libfvalue_utf8_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_utf16_string.c libfvalue_utf16_string.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfvalue.la: $(libfvalue_la_OBJECTS) $(libfvalue_la_DEPENDENCIES) $(EXTRA_libfvalue_la_DEPENDENCIES) $(AM_V_CCLD)$(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_binary_data.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_data_handle.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_filetime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_floating_point.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_integer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_split_utf16_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_split_utf8_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_table.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_utf16_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_utf8_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_entry.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_type.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfvalue_binary_data.Plo -rm -f ./$(DEPDIR)/libfvalue_data_handle.Plo -rm -f ./$(DEPDIR)/libfvalue_error.Plo -rm -f ./$(DEPDIR)/libfvalue_filetime.Plo -rm -f ./$(DEPDIR)/libfvalue_floating_point.Plo -rm -f ./$(DEPDIR)/libfvalue_integer.Plo -rm -f ./$(DEPDIR)/libfvalue_split_utf16_string.Plo -rm -f ./$(DEPDIR)/libfvalue_split_utf8_string.Plo -rm -f ./$(DEPDIR)/libfvalue_string.Plo -rm -f ./$(DEPDIR)/libfvalue_support.Plo -rm -f ./$(DEPDIR)/libfvalue_table.Plo -rm -f ./$(DEPDIR)/libfvalue_utf16_string.Plo -rm -f ./$(DEPDIR)/libfvalue_utf8_string.Plo -rm -f ./$(DEPDIR)/libfvalue_value.Plo -rm -f ./$(DEPDIR)/libfvalue_value_entry.Plo -rm -f ./$(DEPDIR)/libfvalue_value_type.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfvalue_binary_data.Plo -rm -f ./$(DEPDIR)/libfvalue_data_handle.Plo -rm -f ./$(DEPDIR)/libfvalue_error.Plo -rm -f ./$(DEPDIR)/libfvalue_filetime.Plo -rm -f ./$(DEPDIR)/libfvalue_floating_point.Plo -rm -f ./$(DEPDIR)/libfvalue_integer.Plo -rm -f ./$(DEPDIR)/libfvalue_split_utf16_string.Plo -rm -f ./$(DEPDIR)/libfvalue_split_utf8_string.Plo -rm -f ./$(DEPDIR)/libfvalue_string.Plo -rm -f ./$(DEPDIR)/libfvalue_support.Plo -rm -f ./$(DEPDIR)/libfvalue_table.Plo -rm -f ./$(DEPDIR)/libfvalue_utf16_string.Plo -rm -f ./$(DEPDIR)/libfvalue_utf8_string.Plo -rm -f ./$(DEPDIR)/libfvalue_value.Plo -rm -f ./$(DEPDIR)/libfvalue_value_entry.Plo -rm -f ./$(DEPDIR)/libfvalue_value_type.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfvalue/libfvalue_utf8_string.h0000644000175000017500000000261114610746243023016 0ustar00lordyestalordyesta/* * UTF-8 string value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBVALUE_UTF8_STRING_H ) #define _LIBVALUE_UTF8_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 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 ); #if defined( _cplusplus ) } #endif #endif /* !defined( _LIBVALUE_UTF8_STRING_H ) */ libesedb-20240420/libfvalue/libfvalue_floating_point.c0000644000175000017500000024506114610746243023561 0ustar00lordyestalordyesta/* * Floating point value (IEEE 754) functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_floating_point.h" #include "libfvalue_libcerror.h" /* Creates a floating point * Make sure the value floating_point is referencing, is set to NULL * 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 ); } /* Copies the floating point from a floating point value * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_floating_point( libfvalue_floating_point_t *floating_point, double floating_point_value, size_t floating_point_value_size, libcerror_error_t **error ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_floating_point_copy_from_floating_point"; 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_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 ); } value_float64.floating_point = floating_point_value; floating_point->value = value_float64.integer; floating_point->value_size = 64; return( 1 ); } /* Copies the floating point to a floating point value * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_floating_point( libfvalue_floating_point_t *floating_point, double *floating_point_value, size_t *floating_point_value_size, libcerror_error_t **error ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_floating_point_copy_to_floating_point"; 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_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 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value size.", function ); return( -1 ); } value_float64.integer = floating_point->value; *floating_point_value = (double) value_float64.floating_point; *floating_point_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_length, 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_length, 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_length, 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_length, 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_length, 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_length, 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 ) { static char *function = "libfvalue_string_size_from_floating_point"; size_t safe_string_size = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 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( ( 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 ) { safe_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; } break; case 64: #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( floating_point_value == 0x7ff0000000000000UL ) #else if( floating_point_value == 0x7ff0000000000000ULL ) #endif { is_infinite = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000UL ) ) #else else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) #endif { is_indeterminate = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( floating_point_value >= 0x7ff0000000000001UL ) && ( floating_point_value <= 0x7fffffffffffffffUL ) ) #else else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) #endif { is_not_a_number = 1; } break; } if( is_indeterminate != 0 ) { /* "Ind\x00" */ safe_string_size = 4; } else if( is_infinite != 0 ) { /* "Inf\x00" */ safe_string_size = 4; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ safe_string_size = 4; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { safe_string_size = 15; } else { safe_string_size = 14; } } } *string_size = safe_string_size; 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 ) { 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 safe_utf8_string_index = 0; uint64_t divider = 0; uint64_t value_fraction = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; int16_t exponent10 = 0; int16_t exponent2 = 0; uint8_t byte_value = 0; uint8_t digit_index = 0; uint8_t exponent_sign = 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 number_of_characters = 0; int8_t bit_shift = 0; double exponent_value = 0.0; double value_float = 0.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 ); } safe_utf8_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; value_float = (double) value_float32.floating_point; exponent2 = (int16_t) ( floating_point_value >> 23 ); if( exponent2 == 0 ) { exponent2 = -126; } else { exponent2 -= 127; } } break; case 64: #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( floating_point_value == 0x7ff0000000000000UL ) #else if( floating_point_value == 0x7ff0000000000000ULL ) #endif { is_infinite = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000UL ) ) #else else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) #endif { is_indeterminate = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( floating_point_value >= 0x7ff0000000000001UL ) && ( floating_point_value <= 0x7fffffffffffffffUL ) ) #else else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) #endif { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = (uint64_t) floating_point_value; value_float = (double) value_float64.floating_point; exponent2 = (int16_t) ( floating_point_value >> 52 ); if( exponent2 == 0 ) { exponent2 = -1023; } else { exponent2 -= 1023; } } break; } if( is_indeterminate != 0 ) { /* "Ind\x00" */ number_of_characters = 4; } else if( is_infinite != 0 ) { /* "Inf\x00" */ number_of_characters = 4; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ number_of_characters = 4; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { number_of_characters = 15; } else { number_of_characters = 14; } } } if( ( number_of_characters > utf8_string_size ) || ( safe_utf8_string_index > ( utf8_string_size - number_of_characters ) ) ) { 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[ safe_utf8_string_index++ ] = (uint8_t) '0'; utf8_string[ safe_utf8_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[ safe_utf8_string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_indeterminate != 0 ) { /* "Ind\x00" */ utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'I'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'n'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'd'; } else if( is_infinite != 0 ) { /* "Inf\x00" */ utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'I'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'n'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'f'; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'N'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'a'; utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'N'; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '-'; } if( exponent2 < 0 ) { exponent_sign = (uint8_t) '-'; exponent2 *= -1; } else { exponent_sign = (uint8_t) '+'; } exponent_value = 1.0; exponent10 = 0; while( exponent2 > 0 ) { exponent_value *= 2; exponent2--; if( exponent_value >= 10.0 ) { exponent_value /= 10.0; exponent10++; if( exponent_sign == (uint8_t) '-' ) { value_float *= 10.0; } else { value_float /= 10.0; } } } if( value_float != 0.0 ) { while( ( value_float < 1.0 ) || ( value_float >= 10.0 ) ) { exponent10++; if( exponent_sign == (uint8_t) '-' ) { value_float *= 10; } else { value_float /= 10; } } } for( digit_index = 0; digit_index < 7; digit_index++ ) { value_fraction *= 10; value_fraction += (uint8_t) value_float; value_float -= (uint8_t) value_float; value_float *= 10.0; } if( value_float >= 5.0 ) { value_fraction += 1; } divider = 1000000; for( digit_index = 0; digit_index < 7; digit_index++ ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '0' + (uint8_t) ( value_fraction / divider ); if( digit_index == 0 ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '.'; } value_fraction %= divider; divider /= 10; } utf8_string[ safe_utf8_string_index++ ] = (uint8_t) 'e'; utf8_string[ safe_utf8_string_index++ ] = exponent_sign; divider = 100; for( digit_index = 0; digit_index < 3; digit_index++ ) { utf8_string[ safe_utf8_string_index++ ] = (uint8_t) '0' + (uint8_t) ( exponent10 / divider ); exponent10 %= divider; divider /= 10; } } } utf8_string[ safe_utf8_string_index++ ] = 0; *utf8_string_index = safe_utf8_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 ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_utf8_string_with_index_copy_to_floating_point"; size_t fraction_index = 0; size_t maximum_string_index = 0; size_t safe_utf8_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; double value_fraction = 0.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_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 ); } safe_utf8_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 += safe_utf8_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 ) { character_value = utf8_string[ safe_utf8_string_index++ ]; if(character_value != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } character_value = utf8_string[ safe_utf8_string_index++ ]; if( character_value != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } while( safe_utf8_string_index < utf8_string_length ) { character_value = utf8_string[ safe_utf8_string_index ]; if( character_value == 0 ) { break; } if( safe_utf8_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( ( character_value >= (uint8_t) '0' ) && ( character_value <= (uint8_t) '9' ) ) { byte_value = (uint8_t) ( character_value - (uint8_t) '0' ); } else if( ( character_value >= (uint8_t) 'A' ) && ( character_value <= (uint8_t) 'F' ) ) { byte_value = (uint8_t) ( character_value - (uint8_t) 'A' + 10 ); } else if( ( character_value >= (uint8_t) 'a' ) && ( character_value <= (uint8_t) 'f' ) ) { byte_value = (uint8_t) ( character_value - (uint8_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf8_string_index++; } } else { value_float64.floating_point = 0.0; character_value = utf8_string[ safe_utf8_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint8_t) '-' ) { safe_utf8_string_index++; sign = -1; } else if( character_value == (uint8_t) '+' ) { safe_utf8_string_index++; } while( safe_utf8_string_index < utf8_string_length ) { character_value = utf8_string[ safe_utf8_string_index ]; if( character_value == 0 ) { break; } if( safe_utf8_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 ); } if( character_value == (uint8_t) '.' ) { break; } if( ( character_value < (uint8_t) '0' ) || ( character_value > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, safe_utf8_string_index ); return( -1 ); } value_float64.floating_point *= 10; value_float64.floating_point += character_value - (uint8_t) '0'; safe_utf8_string_index++; } fraction_index = safe_utf8_string_index; safe_utf8_string_index++; utf8_string_length--; if( utf8_string_length > (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 ); } while( fraction_index < utf8_string_length ) { character_value = utf8_string[ utf8_string_length ]; if( character_value == 0 ) { break; } if( ( character_value < (uint8_t) '0' ) || ( character_value > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx8 " at index: %d.", function, character_value, utf8_string_length ); return( -1 ); } value_fraction /= 10; value_fraction += character_value - (uint8_t) '0'; safe_utf8_string_index++; utf8_string_length--; } if( value_fraction != 0.0 ) { value_float64.floating_point += value_fraction / 10; } if( sign == -1 ) { value_float64.floating_point *= 1.0; } value_64bit = value_float64.integer; } *utf8_string_index = safe_utf8_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 from 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 ) { 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 safe_utf16_string_index = 0; uint64_t divider = 0; uint64_t value_fraction = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; int16_t exponent10 = 0; int16_t exponent2 = 0; uint8_t byte_value = 0; uint8_t digit_index = 0; uint8_t exponent_sign = 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 number_of_characters = 0; int8_t bit_shift = 0; double exponent_value = 0.0; double value_float = 0.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 ); } safe_utf16_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 = (int8_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; value_float = (double) value_float32.floating_point; exponent2 = (int16_t) ( floating_point_value >> 23 ); if( exponent2 == 0 ) { exponent2 = -126; } else { exponent2 -= 127; } } break; case 64: #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( floating_point_value == 0x7ff0000000000000UL ) #else if( floating_point_value == 0x7ff0000000000000ULL ) #endif { is_infinite = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000UL ) ) #else else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) #endif { is_indeterminate = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( floating_point_value >= 0x7ff0000000000001UL ) && ( floating_point_value <= 0x7fffffffffffffffUL ) ) #else else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) #endif { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = (uint64_t) floating_point_value; value_float = (double) value_float64.floating_point; exponent2 = (int16_t) ( floating_point_value >> 52 ); if( exponent2 == 0 ) { exponent2 = -1023; } else { exponent2 -= 1023; } } break; } if( is_indeterminate != 0 ) { /* "Ind\x00" */ number_of_characters = 4; } else if( is_infinite != 0 ) { /* "Inf\x00" */ number_of_characters = 4; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ number_of_characters = 4; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { number_of_characters = 15; } else { number_of_characters = 14; } } } if( ( number_of_characters > utf16_string_size ) || ( safe_utf16_string_index > ( utf16_string_size - number_of_characters ) ) ) { 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[ safe_utf16_string_index++ ] = (uint16_t) '0'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'x'; bit_shift = (int8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint16_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_indeterminate != 0 ) { /* "Ind\x00" */ utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'I'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'n'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'd'; } else if( is_infinite != 0 ) { /* "Inf\x00" */ utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'I'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'n'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'f'; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'N'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'a'; utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'N'; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '-'; } if( exponent2 < 0 ) { exponent_sign = (uint16_t) '-'; exponent2 *= -1; } else { exponent_sign = (uint16_t) '+'; } exponent_value = 1.0; exponent10 = 0; while( exponent2 > 0 ) { exponent_value *= 2; exponent2--; if( exponent_value >= 10.0 ) { exponent_value /= 10.0; exponent10++; if( exponent_sign == (uint16_t) '-' ) { value_float *= 10.0; } else { value_float /= 10.0; } } } if( value_float != 0.0 ) { while( ( value_float < 1.0 ) || ( value_float >= 10.0 ) ) { exponent10++; if( exponent_sign == (uint16_t) '-' ) { value_float *= 10; } else { value_float /= 10; } } } for( digit_index = 0; digit_index < 7; digit_index++ ) { value_fraction *= 10; value_fraction += (uint16_t) value_float; value_float -= (uint16_t) value_float; value_float *= 10.0; } if( value_float >= 5.0 ) { value_fraction += 1; } divider = 1000000; for( digit_index = 0; digit_index < 7; digit_index++ ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0' + (uint16_t) ( value_fraction / divider ); if( digit_index == 0 ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '.'; } value_fraction %= divider; divider /= 10; } utf16_string[ safe_utf16_string_index++ ] = (uint16_t) 'e'; utf16_string[ safe_utf16_string_index++ ] = exponent_sign; divider = 100; for( digit_index = 0; digit_index < 3; digit_index++ ) { utf16_string[ safe_utf16_string_index++ ] = (uint16_t) '0' + (uint16_t) ( exponent10 / divider ); exponent10 %= divider; divider /= 10; } } } utf16_string[ safe_utf16_string_index++ ] = 0; *utf16_string_index = safe_utf16_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 ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_utf16_string_with_index_copy_to_floating_point"; size_t fraction_index = 0; size_t maximum_string_index = 0; size_t safe_utf16_string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t character_value = 0; uint8_t byte_value = 0; int8_t bit_shift = 0; int8_t sign = 1; double value_fraction = 0.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_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 ); } safe_utf16_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 += safe_utf16_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 ) { character_value = utf16_string[ safe_utf16_string_index++ ]; if( character_value != (uint16_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx16 " at index: %d.", function, character_value, safe_utf16_string_index ); return( -1 ); } character_value = utf16_string[ safe_utf16_string_index++ ]; if( character_value != (uint16_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx16 " at index: %d.", function, character_value, safe_utf16_string_index ); return( -1 ); } while( safe_utf16_string_index < utf16_string_length ) { character_value = utf16_string[ safe_utf16_string_index ]; if( character_value == 0 ) { break; } if( safe_utf16_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( ( character_value >= (uint16_t) '0' ) && ( character_value <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( character_value - (uint16_t) '0' ); } else if( ( character_value >= (uint16_t) 'A' ) && ( character_value <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( character_value - (uint16_t) 'A' + 10 ); } else if( ( character_value >= (uint16_t) 'a' ) && ( character_value <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( character_value - (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, character_value, safe_utf16_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf16_string_index++; } } else { value_float64.floating_point = 0.0; character_value = utf16_string[ safe_utf16_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint16_t) '-' ) { safe_utf16_string_index++; sign = -1; } else if( character_value == (uint16_t) '+' ) { safe_utf16_string_index++; } while( safe_utf16_string_index < utf16_string_length ) { character_value = utf16_string[ safe_utf16_string_index ]; if( character_value == 0 ) { break; } if( safe_utf16_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 ); } if( character_value == (uint16_t) '.' ) { break; } if( ( character_value < (uint16_t) '0' ) || ( character_value > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx16 " at index: %d.", function, character_value, safe_utf16_string_index ); return( -1 ); } value_float64.floating_point *= 10; value_float64.floating_point += character_value - (uint16_t) '0'; safe_utf16_string_index++; } fraction_index = safe_utf16_string_index; safe_utf16_string_index++; utf16_string_length--; if( utf16_string_length > (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 ); } while( fraction_index < utf16_string_length ) { character_value = utf16_string[ utf16_string_length ]; if( character_value == 0 ) { break; } if( ( character_value < (uint16_t) '0' ) || ( character_value > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx16 " at index: %d.", function, character_value, utf16_string_length ); return( -1 ); } value_fraction /= 10; value_fraction += character_value - (uint16_t) '0'; safe_utf16_string_index++; utf16_string_length--; } if( value_fraction != 0.0 ) { value_float64.floating_point += value_fraction / 10; } if( sign == -1 ) { value_float64.floating_point *= 1.0; } value_64bit = value_float64.integer; } *utf16_string_index = safe_utf16_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 ) { 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 safe_utf32_string_index = 0; uint64_t divider = 0; uint64_t value_fraction = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; int16_t exponent10 = 0; int16_t exponent2 = 0; uint8_t byte_value = 0; uint8_t digit_index = 0; uint8_t exponent_sign = 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 number_of_characters = 0; int8_t bit_shift = 0; double exponent_value = 0.0; double value_float = 0.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 ); } safe_utf32_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 = (int8_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; value_float = (double) value_float32.floating_point; exponent2 = (int16_t) ( floating_point_value >> 23 ); if( exponent2 == 0 ) { exponent2 = -126; } else { exponent2 -= 127; } } break; case 64: #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( floating_point_value == 0x7ff0000000000000UL ) #else if( floating_point_value == 0x7ff0000000000000ULL ) #endif { is_infinite = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000UL ) ) #else else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) #endif { is_indeterminate = 1; } #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) else if( ( floating_point_value >= 0x7ff0000000000001UL ) && ( floating_point_value <= 0x7fffffffffffffffUL ) ) #else else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) #endif { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = (uint64_t) floating_point_value; value_float = (double) value_float64.floating_point; exponent2 = (int16_t) ( floating_point_value >> 52 ); if( exponent2 == 0 ) { exponent2 = -1023; } else { exponent2 -= 1023; } } break; } if( is_indeterminate != 0 ) { /* "Ind\x00" */ number_of_characters = 4; } else if( is_infinite != 0 ) { /* "Inf\x00" */ number_of_characters = 4; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ number_of_characters = 4; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { number_of_characters = 15; } else { number_of_characters = 14; } } } if( ( number_of_characters > utf32_string_size ) || ( safe_utf32_string_index > ( utf32_string_size - number_of_characters ) ) ) { 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[ safe_utf32_string_index++ ] = (uint32_t) '0'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'x'; bit_shift = (int8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint32_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_indeterminate != 0 ) { /* "Ind\x00" */ utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'I'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'n'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'd'; } else if( is_infinite != 0 ) { /* "Inf\x00" */ utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'I'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'n'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'f'; } else if( is_not_a_number != 0 ) { /* "Nan\x00" */ utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'N'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'a'; utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'N'; } else { /* "[-]0.000000e[+-]000\x00" */ if( is_signed != 0 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '-'; } if( exponent2 < 0 ) { exponent_sign = (uint32_t) '-'; exponent2 *= -1; } else { exponent_sign = (uint32_t) '+'; } exponent_value = 1.0; exponent10 = 0; while( exponent2 > 0 ) { exponent_value *= 2; exponent2--; if( exponent_value >= 10.0 ) { exponent_value /= 10.0; exponent10++; if( exponent_sign == (uint32_t) '-' ) { value_float *= 10.0; } else { value_float /= 10.0; } } } if( value_float != 0.0 ) { while( ( value_float < 1.0 ) || ( value_float >= 10.0 ) ) { exponent10++; if( exponent_sign == (uint32_t) '-' ) { value_float *= 10; } else { value_float /= 10; } } } for( digit_index = 0; digit_index < 7; digit_index++ ) { value_fraction *= 10; value_fraction += (uint32_t) value_float; value_float -= (uint32_t) value_float; value_float *= 10.0; } if( value_float >= 5.0 ) { value_fraction += 1; } divider = 1000000; for( digit_index = 0; digit_index < 7; digit_index++ ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0' + (uint32_t) ( value_fraction / divider ); if( digit_index == 0 ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '.'; } value_fraction %= divider; divider /= 10; } utf32_string[ safe_utf32_string_index++ ] = (uint32_t) 'e'; utf32_string[ safe_utf32_string_index++ ] = exponent_sign; divider = 100; for( digit_index = 0; digit_index < 3; digit_index++ ) { utf32_string[ safe_utf32_string_index++ ] = (uint32_t) '0' + (uint32_t) ( exponent10 / divider ); exponent10 %= divider; divider /= 10; } } } utf32_string[ safe_utf32_string_index++ ] = 0; *utf32_string_index = safe_utf32_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 ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_utf32_string_with_index_copy_to_floating_point"; size_t fraction_index = 0; size_t maximum_string_index = 0; size_t safe_utf32_string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t character_value = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; int8_t bit_shift = 0; int8_t sign = 1; double value_fraction = 0.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_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 ); } safe_utf32_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 += safe_utf32_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 ) { character_value = utf32_string[ safe_utf32_string_index++ ]; if(character_value != (uint32_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx32 " at index: %d.", function, character_value, safe_utf32_string_index ); return( -1 ); } character_value = utf32_string[ safe_utf32_string_index++ ]; if( character_value != (uint32_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx32 " at index: %d.", function, character_value, safe_utf32_string_index ); return( -1 ); } while( safe_utf32_string_index < utf32_string_length ) { character_value = utf32_string[ safe_utf32_string_index ]; if( character_value == 0 ) { break; } if( safe_utf32_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( ( character_value >= (uint32_t) '0' ) && ( character_value <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( character_value - (uint32_t) '0' ); } else if( ( character_value >= (uint32_t) 'A' ) && ( character_value <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( character_value - (uint32_t) 'A' + 10 ); } else if( ( character_value >= (uint32_t) 'a' ) && ( character_value <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( character_value - (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, character_value, safe_utf32_string_index ); return( -1 ); } value_64bit += byte_value; safe_utf32_string_index++; } } else { value_float64.floating_point = 0.0; character_value = utf32_string[ safe_utf32_string_index ]; /* In the maximum possible string one character is substituted for the sign */ if( character_value == (uint32_t) '-' ) { safe_utf32_string_index++; sign = -1; } else if( character_value == (uint32_t) '+' ) { safe_utf32_string_index++; } while( safe_utf32_string_index < utf32_string_length ) { character_value = utf32_string[ safe_utf32_string_index ]; if( character_value == 0 ) { break; } if( safe_utf32_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 ); } if( character_value == (uint32_t) '.' ) { break; } if( ( character_value < (uint32_t) '0' ) || ( character_value > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx32 " at index: %d.", function, character_value, safe_utf32_string_index ); return( -1 ); } value_float64.floating_point *= 10; value_float64.floating_point += character_value - (uint32_t) '0'; safe_utf32_string_index++; } fraction_index = safe_utf32_string_index; safe_utf32_string_index++; utf32_string_length--; if( utf32_string_length > (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 ); } while( fraction_index < utf32_string_length ) { character_value = utf32_string[ utf32_string_length ]; if( character_value == 0 ) { break; } if( ( character_value < (uint32_t) '0' ) || ( character_value > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x%02" PRIx32 " at index: %d.", function, character_value, utf32_string_length ); return( -1 ); } value_fraction /= 10; value_fraction += character_value - (uint32_t) '0'; safe_utf32_string_index++; utf32_string_length--; } if( value_fraction != 0.0 ) { value_float64.floating_point += value_fraction / 10; } if( sign == -1 ) { value_float64.floating_point *= 1.0; } value_64bit = value_float64.integer; } *utf32_string_index = safe_utf32_string_index; *floating_point_value = value_64bit; return( 1 ); } libesedb-20240420/libfvalue/libfvalue_types.h0000644000175000017500000000365414610746243021716 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_TYPES_H ) #define _LIBFVALUE_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue * The definitions in are copied here * for local use of libfvalue */ #if defined( HAVE_LOCAL_LIBFVALUE ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfvalue_data_handle {} libfvalue_data_handle_t; typedef struct libfvalue_split_utf16_string {} libfvalue_split_utf16_string_t; typedef struct libfvalue_split_utf8_string {} libfvalue_split_utf8_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_utf16_string_t; typedef intptr_t libfvalue_split_utf8_string_t; typedef intptr_t libfvalue_table_t; typedef intptr_t libfvalue_value_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFVALUE ) */ #endif /* !defined( _LIBFVALUE_INTERNAL_TYPES_H ) */ libesedb-20240420/libfvalue/libfvalue_string.c0000644000175000017500000021716214610746243022054 0ustar00lordyestalordyesta/* * String value functions * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfvalue_codepage.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_libuna.h" #include "libfvalue_split_utf16_string.h" #include "libfvalue_split_utf8_string.h" #include "libfvalue_string.h" #include "libfvalue_types.h" /* Creates a string * Make sure the value string is referencing, is set to NULL * 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( memory_set( *destination_string, 0, sizeof( libfvalue_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination string.", function ); memory_free( *destination_string ); *destination_string = NULL; return( -1 ); } 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( 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_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_SCSU ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_874 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_932 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_936 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_949 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_950 ) && ( 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_1255 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1256 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1257 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1258 ) && ( encoding != LIBFVALUE_CODEPAGE_1200_MIXED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); return( -1 ); } 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 = byte_stream_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; if( memory_copy( string->data, byte_stream, sizeof( uint8_t ) * string->data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy byte stream.", function ); goto on_error; } string->codepage = encoding; return( 1 ); on_error: if( string->data != NULL ) { memory_free( string->data ); string->data = NULL; } string->data_size = 0; 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 safe_utf8_string_index = 0; 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 ); } safe_utf8_string_index = *utf8_string_index; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: case LIBFVALUE_CODEPAGE_SCSU: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); goto on_error; case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf8( &( utf8_string[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, &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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, &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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, &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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, &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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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[ safe_utf8_string_index ] ), utf8_string_size - safe_utf8_string_index, 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; } *utf8_string_index = utf8_string_size; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf8_string_size_from_utf16_stream( string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, 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 of UTF-16 stream.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf8_string_size_from_byte_stream( string->data, string->data_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 UTF-8 string size of byte stream.", function ); return( -1 ); } } break; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf8_string_size_from_scsu_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 SCSU stream.", function ); return( -1 ); } break; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf8_string_with_index_copy_from_utf16_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf8_string_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, LIBUNA_CODEPAGE_ASCII, 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; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf8_string_with_index_copy_from_scsu_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 SCSU stream to UTF-8 string.", function ); return( -1 ); } break; 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 safe_utf16_string_index = 0; 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 ); } safe_utf16_string_index = *utf16_string_index; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: case LIBFVALUE_CODEPAGE_SCSU: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); goto on_error; case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf16( &( utf16_string[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, &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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, &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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, &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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, &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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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[ safe_utf16_string_index ] ), utf16_string_size - safe_utf16_string_index, 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; } *utf16_string_index = utf16_string_size; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf16_string_size_from_utf16_stream( string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, 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 of UTF-16 stream.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf16_string_size_from_byte_stream( string->data, string->data_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 UTF-16 string size of byte stream.", function ); return( -1 ); } } break; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf16_string_size_from_scsu_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 SCSU stream.", function ); return( -1 ); } break; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf16_string_with_index_copy_from_utf16_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf16_string_with_index_copy_from_byte_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, LIBUNA_CODEPAGE_ASCII, 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; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf16_string_with_index_copy_from_scsu_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 SCSU stream to UTF-16 string.", function ); return( -1 ); } break; 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 safe_utf32_string_index = 0; 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 ); } safe_utf32_string_index = *utf32_string_index; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_1200_MIXED: case LIBFVALUE_CODEPAGE_SCSU: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); goto on_error; case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf32( &( utf32_string[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, &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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, &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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, &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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, &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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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[ safe_utf32_string_index ] ), utf32_string_size - safe_utf32_string_index, 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; } *utf32_string_index = utf32_string_size; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf32_string_size_from_utf16_stream( string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, utf32_string_size, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf32_string_size_from_byte_stream( string->data, string->data_size, LIBUNA_CODEPAGE_ASCII, 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; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf32_string_size_from_scsu_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 SCSU stream.", function ); return( -1 ); } break; 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; int result = 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_1200_MIXED: if( ( string->data_size % 2 ) == 0 ) { result = libuna_utf32_string_with_index_copy_from_utf16_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, LIBFVALUE_ENDIAN_LITTLE, error ); if( result != 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 ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } } if( result != 1 ) { if( libuna_utf32_string_with_index_copy_from_byte_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, LIBUNA_CODEPAGE_ASCII, 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; case LIBFVALUE_CODEPAGE_SCSU: if( libuna_utf32_string_with_index_copy_from_scsu_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 SCSU stream to UTF-32 string.", function ); return( -1 ); } break; 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 ); } libesedb-20240420/libfvalue/libfvalue_libuna.h0000644000175000017500000000331314610746243022014 0ustar00lordyestalordyesta/* * The libuna header wrapper * * Copyright (C) 2010-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _LIBFVALUE_LIBUNA_H ) */ libesedb-20240420/libcnotify/0000755000175000017500000000000014610746413016530 5ustar00lordyestalordyestalibesedb-20240420/libcnotify/libcnotify_definitions.h0000644000175000017500000000301414610746227023437 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240414 /* The libcnotify version string */ #define LIBCNOTIFY_VERSION_STRING "20240414" /* The print data flags */ enum LIBCNOTIFY_NOTIFY_PRINT_DATA_FLAGS { LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA = 0x01, }; #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( LIBCNOTIFY_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libcnotify/libcnotify_extern.h0000644000175000017500000000260714610746227022440 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCNOTIFY_EXTERN_VARIABLE extern #else #define LIBCNOTIFY_EXTERN_VARIABLE LIBCNOTIFY_EXTERN #endif #else #define LIBCNOTIFY_EXTERN /* extern */ #define LIBCNOTIFY_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif /* !defined( _LIBCNOTIFY_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcnotify/libcnotify_support.c0000644000175000017500000000221414610746227022634 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include "libcnotify_definitions.h" #include "libcnotify_support.h" #if !defined( HAVE_LOCAL_LIBCNOTIFY ) /* Returns the library version as a string */ const char *libcnotify_get_version( void ) { return( (const char *) LIBCNOTIFY_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ libesedb-20240420/libcnotify/libcnotify_stream.h0000644000175000017500000000263714610746227022431 0ustar00lordyestalordyesta/* * Notification stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBCNOTIFY_STREAM_H ) */ libesedb-20240420/libcnotify/Makefile.am0000644000175000017500000000132414610746227020567 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCNOTIFY AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ noinst_LTLIBRARIES = libcnotify.la libcnotify_la_SOURCES = \ libcnotify_definitions.h \ libcnotify_extern.h \ libcnotify_libcerror.h \ libcnotify_print.c libcnotify_print.h \ libcnotify_stream.c libcnotify_stream.h \ libcnotify_support.c libcnotify_support.h \ libcnotify_unused.h \ libcnotify_verbose.c libcnotify_verbose.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) libesedb-20240420/libcnotify/libcnotify_unused.h0000644000175000017500000000262014610746227022431 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCNOTIFY_UNUSED_H ) #define _LIBCNOTIFY_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 /* !defined( _LIBCNOTIFY_UNUSED_H ) */ libesedb-20240420/libcnotify/libcnotify_verbose.h0000644000175000017500000000241214610746227022572 0ustar00lordyestalordyesta/* * Verbose functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCNOTIFY_VERBOSE_H ) #define _LIBCNOTIFY_VERBOSE_H #include #include #include "libcnotify_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( __CYGWIN__ ) && ( __GNUC__ < 10 ) int libcnotify_verbose; #else LIBCNOTIFY_EXTERN_VARIABLE \ int libcnotify_verbose; #endif LIBCNOTIFY_EXTERN \ void libcnotify_verbose_set( int verbose ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCNOTIFY_VERBOSE_H ) */ libesedb-20240420/libcnotify/libcnotify_print.h0000644000175000017500000000327214610746227022266 0ustar00lordyestalordyesta/* * Notification print functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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, ... ); int libcnotify_print_data_as_character( uint8_t data ); int libcnotify_print_data_as_characters( const uint8_t *data, size_t data_size, size_t data_offset ); int libcnotify_print_data_as_hexadecimal( const uint8_t *data, size_t data_size, size_t data_offset ); 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 /* !defined( _LIBCNOTIFY_PRINT_H ) */ libesedb-20240420/libcnotify/libcnotify_stream.c0000644000175000017500000000766214610746227022427 0ustar00lordyestalordyesta/* * Notification stream functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); } libesedb-20240420/libcnotify/libcnotify_support.h0000644000175000017500000000236214610746227022645 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCNOTIFY_SUPPORT_H ) #define _LIBCNOTIFY_SUPPORT_H #include #include #include #include "libcnotify_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCNOTIFY ) LIBCNOTIFY_EXTERN \ const char *libcnotify_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBCNOTIFY_SUPPORT_H ) */ libesedb-20240420/libcnotify/libcnotify_verbose.c0000644000175000017500000000210614610746227022565 0ustar00lordyestalordyesta/* * Verbose functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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; } libesedb-20240420/libcnotify/Makefile.in0000644000175000017500000007444214610746265020615 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_SOURCES_DIST = libcnotify_definitions.h \ libcnotify_extern.h libcnotify_libcerror.h libcnotify_print.c \ libcnotify_print.h libcnotify_stream.c libcnotify_stream.h \ libcnotify_support.c libcnotify_support.h libcnotify_unused.h \ libcnotify_verbose.c libcnotify_verbose.h @HAVE_LOCAL_LIBCNOTIFY_TRUE@am_libcnotify_la_OBJECTS = \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_print.lo \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_stream.lo \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_support.lo \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_verbose.lo libcnotify_la_OBJECTS = $(am_libcnotify_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCNOTIFY_TRUE@am_libcnotify_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcnotify_print.Plo \ ./$(DEPDIR)/libcnotify_stream.Plo \ ./$(DEPDIR)/libcnotify_support.Plo \ ./$(DEPDIR)/libcnotify_verbose.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcnotify_la_SOURCES) DIST_SOURCES = $(am__libcnotify_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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_LIBCNOTIFY_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ -I../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ @LIBCERROR_CPPFLAGS@ @HAVE_LOCAL_LIBCNOTIFY_TRUE@noinst_LTLIBRARIES = libcnotify.la @HAVE_LOCAL_LIBCNOTIFY_TRUE@libcnotify_la_SOURCES = \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_definitions.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_extern.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_libcerror.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_print.c libcnotify_print.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_stream.c libcnotify_stream.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_support.c libcnotify_support.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_unused.h \ @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_verbose.c libcnotify_verbose.h DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcnotify.la: $(libcnotify_la_OBJECTS) $(libcnotify_la_DEPENDENCIES) $(EXTRA_libcnotify_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libcnotify_la_rpath) $(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_verbose.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcnotify_print.Plo -rm -f ./$(DEPDIR)/libcnotify_stream.Plo -rm -f ./$(DEPDIR)/libcnotify_support.Plo -rm -f ./$(DEPDIR)/libcnotify_verbose.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcnotify_print.Plo -rm -f ./$(DEPDIR)/libcnotify_stream.Plo -rm -f ./$(DEPDIR)/libcnotify_support.Plo -rm -f ./$(DEPDIR)/libcnotify_verbose.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libcnotify/libcnotify_libcerror.h0000644000175000017500000000252514610746227023115 0ustar00lordyestalordyesta/* * The internal libcerror header * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libcnotify/libcnotify_print.c0000644000175000017500000001774614610746227022274 0ustar00lordyestalordyesta/* * Notification print functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 as a character on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_data_as_character( uint8_t data ) { int print_count = 0; if( ( data >= 0x20 ) && ( data <= 0x7e ) ) { print_count = libcnotify_printf( "%c", (char) data ); } else { print_count = libcnotify_printf( "." ); } return( print_count ); } /* Prints the first 16 bytes of data as a characters on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_data_as_characters( const uint8_t *data, size_t data_size, size_t data_offset ) { int print_count = 0; int total_print_count = 0; if( data == NULL ) { return( -1 ); } while( data_offset < data_size ) { print_count = libcnotify_print_data_as_character( data[ data_offset++ ] ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( ( data_offset % 16 == 0 ) || ( data_offset == data_size ) ) { break; } if( data_offset % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } return( total_print_count ); } /* Prints the first 16 bytes of data as a hexadecimal values on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_data_as_hexadecimal( const uint8_t *data, size_t data_size, size_t data_offset ) { int print_count = 0; int total_print_count = 0; if( data == NULL ) { return( -1 ); } while( data_offset < data_size ) { print_count = libcnotify_printf( "%.2" PRIx8 " ", data[ data_offset++ ] ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( data_offset % 16 == 0 ) { break; } else if( data_offset % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } while( data_offset % 16 != 0 ) { data_offset++; print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( ( data_offset % 8 == 0 ) && ( data_offset % 16 != 0 ) ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } return( total_print_count ); } /* 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 data_offset = 0; int in_group = 0; int print_count = 0; int total_print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } if( data_size > 0 ) { if( data == NULL ) { return( -1 ); } } if( data_size > (size_t) SSIZE_MAX ) { return( -1 ); } while( data_offset < data_size ) { if( ( ( print_data_flags & LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) != 0 ) && ( data_size >= 32 ) && ( data_offset >= 16 ) && ( data_offset <= ( data_size - 32 ) ) ) { if( ( memory_compare( &( data[ data_offset - 16 ] ), &( data[ data_offset ] ), 16 ) == 0 ) && ( memory_compare( &( data[ data_offset + 16 ] ), &( data[ data_offset ] ), 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; } data_offset += 16; continue; } in_group = 0; } if( data_offset % 16 == 0 ) { print_count = libcnotify_printf( "%.8" PRIzx ": ", data_offset ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } print_count = libcnotify_print_data_as_hexadecimal( data, data_size, data_offset ); 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; print_count = libcnotify_print_data_as_characters( data, data_size, data_offset ); 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_offset += 16; } 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 ) { int print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } print_count = libcerror_error_backtrace_fprint( error, libcnotify_stream ); return( print_count ); } libesedb-20240420/libcerror/0000755000175000017500000000000014610746413016351 5ustar00lordyestalordyestalibesedb-20240420/libcerror/libcerror_system.c0000644000175000017500000003607414610746223022115 0ustar00lordyestalordyesta/* * System functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #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_definitions.h" #include "libcerror_error.h" #include "libcerror_system.h" #include "libcerror_types.h" #if defined( WINAPI ) /* 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 #endif /* defined( WINAPI ) */ #if defined( WINAPI ) && ( WINVER <= 0x0500 ) /* Cross Windows safe version of FormatMessageA * Returns the number of printed characters without the end-of-string character or 0 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 print_count = 0; if( string == NULL ) { return( 0 ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageA" ); if( function != NULL ) { print_count = 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 ) { print_count = 0; } return( print_count ); } /* Cross Windows safe version of FormatMessageW * Returns the number of printed characters without the end-of-string character or 0 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 print_count = 0; if( string == NULL ) { return( 0 ); } library_handle = LoadLibrary( _SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageW" ); if( function != NULL ) { print_count = 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 ) { print_count = 0; } return( print_count ); } #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ #if defined( WINAPI ) #if ( WINVER <= 0x0500 ) #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #define libcerror_system_FormatMessage libcerror_FormatMessageW #else #define libcerror_system_FormatMessage libcerror_FormatMessageA #endif #else #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #define libcerror_system_FormatMessage FormatMessageW #else #define libcerror_system_FormatMessage FormatMessageA #endif #endif /* ( WINVER <= 0x0500 ) */ /* 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 */ int libcerror_system_copy_string_from_error_number( system_character_t *string, size_t string_size, uint32_t error_number ) { DWORD print_count = 0; if( string == NULL ) { return( -1 ); } if( string_size > (size_t) INT_MAX ) { return( -1 ); } print_count = libcerror_system_FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); if( print_count == 0 ) { return( -1 ); } return( (int) print_count ); } #elif defined( HAVE_STRERROR_R ) #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #error Missing wide character strerror_r function #endif /* 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 */ int libcerror_system_copy_string_from_error_number( 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) INT_MAX ) { return( -1 ); } #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 ] = (system_character_t) 0; string_length = system_string_length( string ); return( (int) string_length ); } #elif defined( HAVE_STRERROR ) #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #error Missing wide character strerror function #endif /* 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 */ int libcerror_system_copy_string_from_error_number( system_character_t *string, size_t string_size, uint32_t error_number ) { #if defined( 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) INT_MAX ) { return( -1 ); } #if defined( 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 = system_string_length( static_error_string ); if( system_string_copy( string, static_error_string, static_error_string_length ) == NULL ) { return( -1 ); } string[ static_error_string_length ] = 0; return( (int) 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 * Creates 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; system_character_t *error_string = NULL; system_character_t *system_format_string = NULL; void *reallocation = NULL; size_t error_string_size = 0; size_t format_string_length = 0; size_t message_size = 0; size_t next_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 = narrow_string_length( format_string ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) libcerror_error_get_system_format_string( format_string, format_string_length, &system_format_string ); if( system_format_string == NULL ) { return; } #else system_format_string = (system_character_t *) format_string; #endif if( *error == NULL ) { if( libcerror_error_initialize( error, error_domain, error_code ) != 1 ) { goto on_error; } } internal_error = (libcerror_internal_error_t *) *error; if( libcerror_error_resize( internal_error ) != 1 ) { goto on_error; } if( format_string_length > next_message_size ) { next_message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } do { if( next_message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { next_message_size = LIBCERROR_MESSAGE_MAXIMUM_SIZE; } reallocation = memory_reallocate( error_string, sizeof( system_character_t ) * next_message_size ); if( reallocation == NULL ) { memory_free( error_string ); goto on_error; } error_string = (system_character_t *) reallocation; message_size = next_message_size; /* argument_list cannot be reused in successive calls to vsnprintf */ VASTART( argument_list, const char *, format_string ); print_count = system_string_vsnprintf( error_string, message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { next_message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count >= message_size ) || ( error_string[ print_count ] != (system_character_t) 0 ) ) { next_message_size = (size_t) ( print_count + 1 ); print_count = -1; } else { error_string_size = (size_t) print_count + 1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { break; } } while( print_count <= -1 ); if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; error_string_size = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; } message_index = internal_error->number_of_messages - 1; internal_error->messages[ message_index ] = error_string; internal_error->sizes[ message_index ] = error_string_size; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); system_format_string = NULL; #endif message_size = internal_error->sizes[ message_index ]; if( message_size < LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { /* TODO move to separate helper function */ string_index = internal_error->sizes[ message_index ] - 1; if( ( internal_error->messages[ message_index ] != NULL ) && ( ( internal_error->messages[ message_index ] )[ string_index - 1 ] == (system_character_t) '.' ) ) { string_index -= 1; } reallocation = memory_reallocate( internal_error->messages[ message_index ], sizeof( system_character_t ) * ( 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 ] = (system_character_t *) reallocation; if( system_string_copy( &( ( internal_error->messages[ message_index ] )[ string_index ] ), _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; } internal_error->sizes[ message_index ] += print_count; } if( internal_error->sizes[ message_index ] >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; internal_error->sizes[ message_index ] = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; } return; on_error: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_format_string != NULL ) { memory_free( system_format_string ); } #endif return; } #undef VARARGS #undef VASTART #undef VAEND libesedb-20240420/libcerror/libcerror_error.c0000644000175000017500000004572014610746223021720 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #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 #include "libcerror_definitions.h" #include "libcerror_error.h" #include "libcerror_types.h" /* Creates an error * Returns 1 if successful or -1 on error */ int libcerror_error_initialize( libcerror_error_t **error, int error_domain, int error_code ) { libcerror_internal_error_t *internal_error = NULL; if( error == NULL ) { return( -1 ); } if( *error != NULL ) { return( -1 ); } internal_error = memory_allocate_structure( libcerror_internal_error_t ); if( internal_error == NULL ) { return( -1 ); } 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; return( 1 ); } /* 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; } } /* Resizes an error * Returns 1 if successful or -1 on error */ int libcerror_error_resize( libcerror_internal_error_t *internal_error ) { void *reallocation = NULL; int message_index = 0; int number_of_messages = 0; if( internal_error == NULL ) { return( -1 ); } message_index = internal_error->number_of_messages; number_of_messages = internal_error->number_of_messages + 1; reallocation = memory_reallocate( internal_error->messages, sizeof( system_character_t * ) * number_of_messages ); if( reallocation == NULL ) { return( -1 ); } internal_error->messages = (system_character_t **) reallocation; internal_error->messages[ message_index ] = NULL; reallocation = memory_reallocate( internal_error->sizes, sizeof( size_t ) * number_of_messages ); if( reallocation == NULL ) { return( -1 ); } internal_error->sizes = (size_t *) reallocation; internal_error->sizes[ message_index ] = 0; internal_error->number_of_messages += 1; return( 1 ); } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) /* Retrieves the format string as a system string */ void libcerror_error_get_system_format_string( const char *format_string, size_t format_string_length, system_character_t **system_format_string ) { void *reallocation = NULL; size_t next_format_string_length = 0; int print_count = 0; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) size_t string_index = 0; #endif if( format_string == NULL ) { return; } if( format_string_length > (size_t) SSIZE_MAX ) { return; } if( system_format_string == NULL ) { return; } next_format_string_length = format_string_length + 1; do { if( next_format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { next_format_string_length = LIBCERROR_MESSAGE_MAXIMUM_SIZE; } reallocation = memory_reallocate( *system_format_string, sizeof( system_character_t ) * next_format_string_length ); if( reallocation == NULL ) { memory_free( *system_format_string ); *system_format_string = NULL; return; } *system_format_string = (system_character_t *) reallocation; format_string_length = next_format_string_length; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) print_count = wide_string_snwprintf( *system_format_string, format_string_length, L"%S", format_string ); #else print_count = wide_string_snwprintf( *system_format_string, format_string_length, L"%s", format_string ); #endif if( print_count <= -1 ) { next_format_string_length += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > format_string_length ) || ( ( *system_format_string )[ print_count ] != 0 ) ) { next_format_string_length = (size_t) print_count; print_count = -1; } if( next_format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { /* TODO handle similar to error string */ memory_free( *system_format_string ); *system_format_string = NULL; return; } } while( print_count <= -1 ); #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 ] == (system_character_t) '%' ) { string_index++; if( ( *system_format_string )[ string_index ] == (system_character_t) 's' ) { ( *system_format_string )[ string_index ] = (system_character_t) 'S'; } } string_index++; } #endif /* defined( __BORLANDC__ ) || defined( _MSC_VER ) */ } #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ #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 /* defined( HAVE_STDARG_H ) || defined( WINAPI ) */ /* Sets an error * Creates 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; system_character_t *error_string = NULL; system_character_t *system_format_string = NULL; void *reallocation = NULL; size_t error_string_size = 0; size_t format_string_length = 0; size_t message_size = 0; size_t next_message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE; int message_index = 0; int print_count = 0; if( error == NULL ) { return; } if( format_string == NULL ) { return; } format_string_length = narrow_string_length( format_string ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) libcerror_error_get_system_format_string( format_string, format_string_length, &system_format_string ); if( system_format_string == NULL ) { return; } #else system_format_string = (system_character_t *) format_string; #endif if( *error == NULL ) { if( libcerror_error_initialize( error, error_domain, error_code ) != 1 ) { goto on_error; } } internal_error = (libcerror_internal_error_t *) *error; if( libcerror_error_resize( internal_error ) != 1 ) { goto on_error; } if( format_string_length > next_message_size ) { next_message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } do { if( next_message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { next_message_size = LIBCERROR_MESSAGE_MAXIMUM_SIZE; } reallocation = memory_reallocate( error_string, sizeof( system_character_t ) * next_message_size ); if( reallocation == NULL ) { memory_free( error_string ); goto on_error; } error_string = (system_character_t *) reallocation; message_size = next_message_size; /* argument_list cannot be reused in successive calls to vsnprintf */ VASTART( argument_list, const char *, format_string ); print_count = system_string_vsnprintf( error_string, message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { next_message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count >= message_size ) || ( error_string[ print_count ] != (system_character_t) 0 ) ) { next_message_size = (size_t) ( print_count + 1 ); print_count = -1; } else { error_string_size = (size_t) print_count + 1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { break; } } while( print_count <= -1 ); if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; error_string_size = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; } message_index = internal_error->number_of_messages - 1; internal_error->messages[ message_index ] = error_string; internal_error->sizes[ message_index ] = error_string_size; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); system_format_string = NULL; #endif return; on_error: #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) if( system_format_string != NULL ) { memory_free( system_format_string ); } #endif 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; system_character_t *error_string = NULL; int message_index = 0; int print_count = 0; #if defined( WINAPI ) const char *format_string = "%" PRIs_SYSTEM "\r\n"; #else const char *format_string = "%" PRIs_SYSTEM "\n"; #endif 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; error_string = internal_error->messages[ message_index ]; if( error_string != NULL ) { print_count = fprintf( stream, format_string, error_string ); 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; system_character_t *error_string = NULL; size_t message_index = 0; size_t print_count = 0; #if !defined( HAVE_WIDE_SYSTEM_CHARACTER ) size_t error_string_size = 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 ); } #if INT_MAX < SSIZE_MAX if( size > (size_t) INT_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { return( -1 ); } message_index = internal_error->number_of_messages - 1; error_string = internal_error->messages[ message_index ]; if( error_string != NULL ) { #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) if( wcstombs_s( &print_count, string, size, error_string, _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( string, error_string, size ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif /* defined( _MSC_VER ) */ if( print_count >= size ) { return( -1 ); } #else error_string_size = internal_error->sizes[ message_index ]; if( size < ( error_string_size + 1 ) ) { return( -1 ); } if( narrow_string_copy( string, error_string, error_string_size ) == NULL ) { return( -1 ); } print_count = error_string_size; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ } if( print_count > (size_t) INT_MAX ) { return( -1 ); } return( (int) print_count ); } /* 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; system_character_t *error_string = NULL; int message_index = 0; int print_count = 0; int total_print_count = 0; #if defined( WINAPI ) const char *format_string = "%" PRIs_SYSTEM "\r\n"; #else const char *format_string = "%" PRIs_SYSTEM "\n"; #endif 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++ ) { error_string = internal_error->messages[ message_index ]; if( error_string != NULL ) { print_count = fprintf( stream, format_string, error_string ); 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; system_character_t *error_string = NULL; size_t string_index = 0; int message_index = 0; #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) size_t print_count = 0; #else size_t error_string_size = 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 ); } #if INT_MAX < SSIZE_MAX if( size > (size_t) INT_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { return( -1 ); } for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { error_string = internal_error->messages[ message_index ]; if( error_string != NULL ) { if( string_index > 0 ) { #if defined( WINAPI ) if( ( string_index + 2 ) >= size ) { return( -1 ); } string[ string_index++ ] = (system_character_t) '\r'; #else if( ( string_index + 1 ) >= size ) { return( -1 ); } #endif /* defined( WINAPI ) */ string[ string_index++ ] = (system_character_t) '\n'; string[ string_index ] = (system_character_t) 0; } #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) if( wcstombs_s( &print_count, &( string[ string_index ] ), size - string_index, error_string, _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( &( string[ string_index ] ), error_string, size - string_index ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif /*defined( _MSC_VER ) */ string_index += print_count; if( string_index >= size ) { return( -1 ); } if( string[ string_index - 1 ] == 0 ) { string_index--; } #else error_string_size = internal_error->sizes[ message_index ]; if( size < ( string_index + error_string_size + 1 ) ) { return( -1 ); } if( narrow_string_copy( &( string[ string_index ] ), error_string, error_string_size ) == NULL ) { return( -1 ); } string_index += error_string_size - 1; #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ } } string_index++; if( string_index > (size_t) INT_MAX ) { return( -1 ); } return( (int) string_index ); } libesedb-20240420/libcerror/libcerror_extern.h0000644000175000017500000000257214610746223022077 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBCERROR_EXTERN_VARIABLE extern #else #define LIBCERROR_EXTERN_VARIABLE LIBCERROR_EXTERN #endif #else #define LIBCERROR_EXTERN /* extern */ #define LIBCERROR_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCERROR_INTERNAL_EXTERN_H ) */ libesedb-20240420/libcerror/Makefile.am0000644000175000017500000000117414610746223020407 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBCERROR AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common noinst_LTLIBRARIES = libcerror.la libcerror_la_SOURCES = \ libcerror_definitions.h \ libcerror_extern.h \ libcerror_error.c libcerror_error.h \ libcerror_support.c libcerror_support.h \ libcerror_system.c libcerror_system.h \ libcerror_types.h \ libcerror_unused.h endif DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) libesedb-20240420/libcerror/libcerror_types.h0000644000175000017500000000276214610746223021737 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_TYPES_H ) #define _LIBCERROR_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror * The definitions in are copied here * for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) /* 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBCERROR_INTERNAL_TYPES_H ) */ libesedb-20240420/libcerror/libcerror_support.h0000644000175000017500000000232614610746223022303 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCERROR_SUPPORT_H ) #define _LIBCERROR_SUPPORT_H #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 /* !defined( _LIBCERROR_SUPPORT_H ) */ libesedb-20240420/libcerror/libcerror_error.h0000644000175000017500000000550014610746223021715 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_ERROR_H ) #define _LIBCERROR_INTERNAL_ERROR_H #include #include #include #include "libcerror_extern.h" #include "libcerror_types.h" #if defined( __cplusplus ) extern "C" { #endif 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 */ system_character_t **messages; /* A dynamic array containing the message string sizes * without the end-of-string character */ size_t *sizes; }; int libcerror_error_initialize( libcerror_error_t **error, int error_domain, int error_code ); LIBCERROR_EXTERN \ void libcerror_error_free( libcerror_error_t **error ); int libcerror_error_resize( libcerror_internal_error_t *internal_error ); #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) void libcerror_error_get_system_format_string( const char *format_string, size_t format_string_length, system_character_t **system_format_string ); #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */ 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 /* !defined( _LIBCERROR_INTERNAL_ERROR_H ) */ libesedb-20240420/libcerror/libcerror_system.h0000644000175000017500000000375214610746223022117 0ustar00lordyestalordyesta/* * System functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCERROR_SYSTEM_H ) #define _LIBCERROR_SYSTEM_H #include #include #include #include "libcerror_extern.h" #include "libcerror_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) 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 /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */ int libcerror_system_copy_string_from_error_number( 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 /* !defined( _LIBCERROR_SYSTEM_H ) */ libesedb-20240420/libcerror/libcerror_definitions.h0000644000175000017500000001671514610746223023111 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240413 /* The libcerror version string */ #define LIBCERROR_VERSION_STRING "20240413" /* 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 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 }; /* 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 }; #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ #define LIBCERROR_MESSAGE_INCREMENT_SIZE 64 #define LIBCERROR_MESSAGE_MAXIMUM_SIZE 4096 #endif /* !defined( LIBCERROR_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libcerror/libcerror_support.c0000644000175000017500000000220614610746223022273 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) */ libesedb-20240420/libcerror/libcerror_unused.h0000644000175000017500000000261014610746223022066 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2008-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBCERROR_UNUSED_H ) #define _LIBCERROR_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 /* !defined( _LIBCERROR_UNUSED_H ) */ libesedb-20240420/libcerror/Makefile.in0000644000175000017500000007341514610746265020435 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_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) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBCERROR_TRUE@am_libcerror_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcerror_error.Plo \ ./$(DEPDIR)/libcerror_support.Plo \ ./$(DEPDIR)/libcerror_system.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcerror_la_SOURCES) DIST_SOURCES = $(am__libcerror_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCERROR_TRUE@ -I../common -I$(top_srcdir)/common @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_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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcerror.la: $(libcerror_la_OBJECTS) $(libcerror_la_DEPENDENCIES) $(EXTRA_libcerror_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_system.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcerror_error.Plo -rm -f ./$(DEPDIR)/libcerror_support.Plo -rm -f ./$(DEPDIR)/libcerror_system.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libcerror_error.Plo -rm -f ./$(DEPDIR)/libcerror_support.Plo -rm -f ./$(DEPDIR)/libcerror_system.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libesedb.spec.in0000644000175000017500000000711614610727243017425 0ustar00lordyestalordyestaName: libesedb Version: @VERSION@ Release: 1 Summary: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format Group: System Environment/Libraries License: LGPL-3.0-or-later Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libesedb @libesedb_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcdata_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_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libfvalue_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@ BuildRequires: gcc @ax_libbfio_spec_build_requires@ @ax_libcdata_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_libcthreads_spec_build_requires@ @ax_libfcache_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfguid_spec_build_requires@ @ax_libfvalue_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@ %description -n libesedb Library to access the Extensible Storage Engine (ESE) Database File (EDB) format %package -n libesedb-static Summary: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format Group: Development/Libraries Requires: libesedb = %{version}-%{release} %description -n libesedb-static Static library version of libesedb. %package -n libesedb-devel Summary: Header files and libraries for developing applications for libesedb Group: Development/Libraries Requires: libesedb = %{version}-%{release} %description -n libesedb-devel Header files and libraries for developing applications for libesedb. %package -n libesedb-python3 Summary: Python 3 bindings for libesedb Group: System Environment/Libraries Requires: libesedb = %{version}-%{release} python3 BuildRequires: python3-devel python3-setuptools %description -n libesedb-python3 Python 3 bindings for libesedb %package -n libesedb-tools Summary: Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB) Group: Applications/System Requires: libesedb = %{version}-%{release} @ax_libfmapi_spec_requires@ @ax_libmapidb_spec_requires@ @libesedb_spec_tools_build_requires@ @ax_libfmapi_spec_build_requires@ @ax_libmapidb_spec_build_requires@ %description -n libesedb-tools Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB) %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n libesedb %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.so.* %files -n libesedb-static %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.a %files -n libesedb-devel %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.so %{_libdir}/pkgconfig/libesedb.pc %{_includedir}/* %{_mandir}/man3/* %files -n libesedb-python3 %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/python3*/site-packages/*.a %{_libdir}/python3*/site-packages/*.so %files -n libesedb-tools %license COPYING COPYING.LESSER %doc AUTHORS README %{_bindir}/* %{_mandir}/man1/* %changelog * @SPEC_DATE@ Joachim Metz @VERSION@-1 - Auto-generated libesedb-20240420/libfdatetime/0000755000175000017500000000000014610746414017020 5ustar00lordyestalordyestalibesedb-20240420/libfdatetime/libfdatetime_floatingtime.h0000644000175000017500000001243614610746237024375 0ustar00lordyestalordyesta/* * Floatingtime functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_64bit( libfdatetime_floatingtime_t *floatingtime, uint64_t *value_64bit, libcerror_error_t **error ); int libfdatetime_internal_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 ); int libfdatetime_internal_floatingtime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_floatingtime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_floatingtime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_nsf_timedate.c0000644000175000017500000010306014610746237024342 0ustar00lordyestalordyesta/* * Notes Storage Facility (NSF) timedate functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a NSF timedate * Make sure the value nsf_timedate is referencing, 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 & 0xffffffffUL; return( 1 ); } /* Converts a NSF timedate into a 64-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_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_to_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; if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 64-bit value.", function ); return( -1 ); } *value_64bit = internal_nsf_timedate->upper; *value_64bit <<= 32; *value_64bit |= internal_nsf_timedate->lower; return( 1 ); } /* Converts a NSF timedate into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_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_internal_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 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 ) ); if( date_time_values->year > 9999 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid NSF timedate - year value out of bounds.", function ); return( -1 ); } /* 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 */ if( nsf_time >= 24 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported number of hours: %d.", function, nsf_time ); return( -1 ); } 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"; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } result = libfdatetime_internal_nsf_timedate_copy_to_date_time_values( (libfdatetime_internal_nsf_timedate_t *) nsf_timedate, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the NSF timedate */ *string_size = 24; } return( 1 ); } /* Converts the NSF timedate into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_nsf_timedate_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_nsf_timedate_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", 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_size < 24 ) || ( *utf8_string_index > ( utf8_string_size - 24 ) ) ) { 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-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"; 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; result = libfdatetime_internal_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_nsf_timedate_copy_to_utf8_string_in_hexadecimal( internal_nsf_timedate, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to NSF timedate to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the NSF timedate into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_nsf_timedate_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_nsf_timedate_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", 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_size < 24 ) || ( *utf16_string_index > ( utf16_string_size - 24 ) ) ) { 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-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"; 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; result = libfdatetime_internal_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_nsf_timedate_copy_to_utf16_string_in_hexadecimal( internal_nsf_timedate, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to NSF timedate to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the NSF timedate into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_nsf_timedate_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_nsf_timedate_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", 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_size < 24 ) || ( *utf32_string_index > ( utf32_string_size - 24 ) ) ) { 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 ); } /* 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"; 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; result = libfdatetime_internal_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 ); } } if( result != 1 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: unable to copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_nsf_timedate_copy_to_utf32_string_in_hexadecimal( internal_nsf_timedate, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to NSF timedate to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/libfdatetime_error.h0000644000175000017500000000353714610746237023046 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBFDATETIME_INTERNAL_ERROR_H ) */ libesedb-20240420/libfdatetime/libfdatetime_floatingtime.c0000644000175000017500000010116714610746237024370 0ustar00lordyestalordyesta/* * Floatingtime functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a floatingtime * Make sure the value floatingtime is referencing, 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 a 64-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_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; if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 64-bit value.", function ); return( -1 ); } *value_64bit = internal_floatingtime->timestamp.integer; return( 1 ); } /* Converts a floatingtime into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_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_internal_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 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; if( ( floatingtimestamp <= -3650000.0 ) || ( floatingtimestamp >= 3650000.0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid floatingtime - value out of bounds.", function ); return( -1 ); } /* 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; date_time_values->month = 12; date_time_values->day = 30; if( floatingtimestamp >= 2.0 ) { date_time_values->year = 1900; date_time_values->month = 1; date_time_values->day = 1; floatingtimestamp -= 2.0; } while( floatingtimestamp > 0.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.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; } if( date_time_values->year > 9999 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid floatingtime - year value out of bounds.", function ); return( -1 ); } /* Determine the month correct the value to days within the month */ while( floatingtimestamp > 0.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 -= (int) floatingtimestamp; /* There are 24 hours in a day correct the value to hours */ floatingtimestamp *= 24.0; 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.0; 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.0; 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.0; 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.0; 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.0; date_time_values->nano_seconds = (uint8_t) floatingtimestamp; 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"; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } result = libfdatetime_internal_floatingtime_copy_to_date_time_values( (libfdatetime_internal_floatingtime_t *) floatingtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the floatingtime */ *string_size = 21; } return( 1 ); } /* Converts the floatingtime into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_floatingtime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_floatingtime_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", 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_size < 21 ) || ( *utf8_string_index > ( utf8_string_size - 21 ) ) ) { 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-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"; 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; result = libfdatetime_internal_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_floatingtime_copy_to_utf8_string_in_hexadecimal( internal_floatingtime, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to floatingtime to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the floatingtime into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_floatingtime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_floatingtime_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", 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_size < 21 ) || ( *utf16_string_index > ( utf16_string_size - 21 ) ) ) { 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-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"; 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; result = libfdatetime_internal_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_floatingtime_copy_to_utf16_string_in_hexadecimal( internal_floatingtime, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to floatingtime to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the floatingtime into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_floatingtime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_floatingtime_t *internal_floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_floatingtime_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", 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_size < 21 ) || ( *utf32_string_index > ( utf32_string_size - 21 ) ) ) { 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++ ] = 0; *utf32_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"; 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; result = libfdatetime_internal_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_floatingtime_copy_to_utf32_string_in_hexadecimal( internal_floatingtime, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to floatingtime to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/libfdatetime_support.h0000644000175000017500000000230414610746237023420 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFDATETIME_SUPPORT_H ) */ libesedb-20240420/libfdatetime/libfdatetime_hfs_time.h0000644000175000017500000001162214610746237023505 0ustar00lordyestalordyesta/* * HFS time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_HFS_TIME_H ) #define _LIBFDATETIME_INTERNAL_HFS_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_hfs_time libfdatetime_internal_hfs_time_t; /* Contains a value representing the number of seconds since January 1, 1904 */ struct libfdatetime_internal_hfs_time { /* The timestamp */ uint32_t timestamp; }; LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_initialize( libfdatetime_hfs_time_t **hfs_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_free( libfdatetime_hfs_time_t **hfs_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_from_byte_stream( libfdatetime_hfs_time_t *hfs_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_from_32bit( libfdatetime_hfs_time_t *hfs_time, uint32_t value_32bit, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_32bit( libfdatetime_hfs_time_t *hfs_time, uint32_t *value_32bit, libcerror_error_t **error ); int libfdatetime_internal_hfs_time_copy_to_date_time_values( libfdatetime_internal_hfs_time_t *internal_hfs_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_get_string_size( libfdatetime_hfs_time_t *hfs_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_internal_hfs_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf8_string( libfdatetime_hfs_time_t *hfs_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf8_string_with_index( libfdatetime_hfs_time_t *hfs_time, 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_internal_hfs_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf16_string( libfdatetime_hfs_time_t *hfs_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf16_string_with_index( libfdatetime_hfs_time_t *hfs_time, 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_internal_hfs_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf32_string( libfdatetime_hfs_time_t *hfs_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_hfs_time_copy_to_utf32_string_with_index( libfdatetime_hfs_time_t *hfs_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 /* !defined( _LIBFDATETIME_INTERNAL_HFS_TIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_definitions.h0000644000175000017500000001012614610746237024220 0ustar00lordyestalordyesta/* * The internal definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 20240415 /* The version string */ #define LIBFDATETIME_VERSION_STRING "20240415" /* 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, /* Add a timezone indicator */ LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR = 0x80000000UL, }; #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, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED }; #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( LIBFDATETIME_INTERNAL_DEFINITIONS_H ) */ libesedb-20240420/libfdatetime/libfdatetime_hfs_time.c0000644000175000017500000007603614610746237023512 0ustar00lordyestalordyesta/* * HFS time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_hfs_time.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Creates a HFS time * Make sure the value hfs_time is referencing, is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_initialize( libfdatetime_hfs_time_t **hfs_time, libcerror_error_t **error ) { libfdatetime_internal_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_initialize"; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } if( *hfs_time != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid HFS time value already set.", function ); return( -1 ); } internal_hfs_time = memory_allocate_structure( libfdatetime_internal_hfs_time_t ); if( internal_hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create HFS time.", function ); goto on_error; } if( memory_set( internal_hfs_time, 0, sizeof( libfdatetime_internal_hfs_time_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear HFS time.", function ); goto on_error; } *hfs_time = (libfdatetime_hfs_time_t *) internal_hfs_time; return( 1 ); on_error: if( internal_hfs_time != NULL ) { memory_free( internal_hfs_time ); } return( -1 ); } /* Frees a HFS time * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_free( libfdatetime_hfs_time_t **hfs_time, libcerror_error_t **error ) { libfdatetime_internal_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_free"; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } if( *hfs_time != NULL ) { internal_hfs_time = (libfdatetime_internal_hfs_time_t *) *hfs_time; *hfs_time = NULL; memory_free( internal_hfs_time ); } return( 1 ); } /* Converts a byte stream into a HFS time * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_copy_from_byte_stream( libfdatetime_hfs_time_t *hfs_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_from_byte_stream"; uint32_t value_32bit = 0; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_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( 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_32bit ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, value_32bit ); } internal_hfs_time->timestamp = value_32bit; return( 1 ); } /* Converts a 32-bit value into a HFS time * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_copy_from_32bit( libfdatetime_hfs_time_t *hfs_time, uint32_t value_32bit, libcerror_error_t **error ) { libfdatetime_internal_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_from_32bit"; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_time; internal_hfs_time->timestamp = value_32bit; return( 1 ); } /* Converts a HFS time into a 32-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_copy_to_32bit( libfdatetime_hfs_time_t *hfs_time, uint32_t *value_32bit, libcerror_error_t **error ) { libfdatetime_internal_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_to_32bit"; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_time; if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 32-bit value.", function ); return( -1 ); } *value_32bit = internal_hfs_time->timestamp; return( 1 ); } /* Converts a HFS time into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_hfs_time_copy_to_date_time_values( libfdatetime_internal_hfs_time_t *internal_hfs_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_hfs_time_copy_to_date_time_values"; uint32_t hfs_timestamp = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; if( internal_hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS 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 ); } hfs_timestamp = internal_hfs_time->timestamp; date_time_values->micro_seconds = 0; date_time_values->milli_seconds = 0; date_time_values->nano_seconds = 0; /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = hfs_timestamp % 60; hfs_timestamp /= 60; /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = hfs_timestamp % 60; hfs_timestamp /= 60; /* There are 24 hours in a day correct the value to days */ date_time_values->hours = hfs_timestamp % 24; hfs_timestamp /= 24; /* Determine the number of years starting at 'Jan 1, 1904 00:00:00' * correct the value to days within the year */ /* Add 1 day to compensate that Jan 1, 1904 is represented as 0 */ hfs_timestamp += 1; date_time_values->year = 1904; if( hfs_timestamp >= 35064 ) { date_time_values->year = 2000; hfs_timestamp -= 35064; } while( hfs_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( hfs_timestamp <= days_in_year ) { break; } hfs_timestamp -= days_in_year; date_time_values->year += 1; } /* Determine the month correct the value to days within the month */ date_time_values->month = 1; 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( hfs_timestamp <= days_in_month ) { break; } hfs_timestamp -= days_in_month; date_time_values->month += 1; } while( hfs_timestamp > 0 ); /* Determine the day */ date_time_values->day = (uint8_t) hfs_timestamp; return( 1 ); } /* Deterimes the size of the string for the HFS time * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_hfs_time_get_string_size( libfdatetime_hfs_time_t *hfs_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_hfs_time_get_string_size"; int result = 0; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS 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 ); } result = libfdatetime_internal_hfs_time_copy_to_date_time_values( (libfdatetime_internal_hfs_time_t *) hfs_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the HFS time */ *string_size = 13; } return( 1 ); } /* Converts the HFS time into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_hfs_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_hfs_time_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", 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_size < 13 ) || ( *utf8_string_index > ( utf8_string_size - 13 ) ) ) { 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_hfs_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 HFS 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_hfs_time_copy_to_utf8_string( libfdatetime_hfs_time_t *hfs_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_hfs_time_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_hfs_time_copy_to_utf8_string_with_index( hfs_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 HFS time to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the HFS 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_hfs_time_copy_to_utf8_string_with_index( libfdatetime_hfs_time_t *hfs_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_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_to_utf8_string_with_index"; int result = 0; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_time; result = libfdatetime_internal_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_hfs_time_copy_to_utf8_string_in_hexadecimal( internal_hfs_time, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to HFS time to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the HFS time into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_hfs_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_hfs_time_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", 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_size < 13 ) || ( *utf16_string_index > ( utf16_string_size - 13 ) ) ) { 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_hfs_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 HFS 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_hfs_time_copy_to_utf16_string( libfdatetime_hfs_time_t *hfs_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_hfs_time_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_hfs_time_copy_to_utf16_string_with_index( hfs_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 HFS time to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the HFS 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_hfs_time_copy_to_utf16_string_with_index( libfdatetime_hfs_time_t *hfs_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_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_to_utf16_string_with_index"; int result = 0; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_time; result = libfdatetime_internal_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 ); } } if( result != 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 + 13 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: unable to copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_hfs_time_copy_to_utf16_string_in_hexadecimal( internal_hfs_time, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to HFS time to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the HFS time into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_hfs_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_hfs_time_t *internal_hfs_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_hfs_time_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", 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_size < 13 ) || ( *utf32_string_index > ( utf32_string_size - 13 ) ) ) { 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_hfs_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 ); } /* Converts the HFS 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_hfs_time_copy_to_utf32_string( libfdatetime_hfs_time_t *hfs_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_hfs_time_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_hfs_time_copy_to_utf32_string_with_index( hfs_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 HFS time to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the HFS 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_hfs_time_copy_to_utf32_string_with_index( libfdatetime_hfs_time_t *hfs_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_hfs_time_t *internal_hfs_time = NULL; static char *function = "libfdatetime_hfs_time_copy_to_utf32_string_with_index"; int result = 0; if( hfs_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid HFS time.", function ); return( -1 ); } internal_hfs_time = (libfdatetime_internal_hfs_time_t *) hfs_time; result = libfdatetime_internal_hfs_time_copy_to_date_time_values( internal_hfs_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_hfs_time_copy_to_utf32_string_in_hexadecimal( internal_hfs_time, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to HFS time to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/Makefile.am0000644000175000017500000000217014610746237021057 0ustar00lordyestalordyestaif HAVE_LOCAL_LIBFDATETIME AM_CPPFLAGS = \ -I../include -I$(top_srcdir)/include \ -I../common -I$(top_srcdir)/common \ @LIBCERROR_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_hfs_time.c libfdatetime_hfs_time.h \ libfdatetime_libcerror.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 DISTCLEANFILES = \ Makefile \ Makefile.in sources-local: $(BUILT_SOURCES) splint-local: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) libesedb-20240420/libfdatetime/libfdatetime_filetime.c0000644000175000017500000010444514610746237023506 0ustar00lordyestalordyesta/* * FILETIME functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a FILETIME * Make sure the value filetime is referencing, 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 & 0xffffffffUL; return( 1 ); } /* Converts a FILETIME into a 64-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_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_to_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; if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 64-bit value.", function ); return( -1 ); } *value_64bit = internal_filetime->upper; *value_64bit <<= 32; *value_64bit |= internal_filetime->lower; return( 1 ); } /* Converts a FILETIME into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_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_internal_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 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; } if( date_time_values->year > 9999 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid FILETIME - year value out of bounds.", function ); return( -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"; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } result = libfdatetime_internal_filetime_copy_to_date_time_values( (libfdatetime_internal_filetime_t *) filetime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the filetime */ *string_size = 24; } return( 1 ); } /* Converts the FILETIME into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_filetime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_filetime_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FILETIME.", 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_size < 24 ) || ( *utf8_string_index > ( utf8_string_size - 24 ) ) ) { 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-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"; 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; result = libfdatetime_internal_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_filetime_copy_to_utf8_string_in_hexadecimal( internal_filetime, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FILETIME to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the FILETIME into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_filetime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_filetime_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FILETIME.", 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_size < 24 ) || ( *utf16_string_index > ( utf16_string_size - 24 ) ) ) { 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-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"; 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; result = libfdatetime_internal_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 ); } } if( result != 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: unable to copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_filetime_copy_to_utf16_string_in_hexadecimal( internal_filetime, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FILETIME to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the FILETIME into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_filetime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_filetime_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FILETIME.", 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_size < 24 ) || ( *utf32_string_index > ( utf32_string_size - 24 ) ) ) { 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 ); } /* 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"; 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; result = libfdatetime_internal_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_filetime_copy_to_utf32_string_in_hexadecimal( internal_filetime, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FILETIME to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/libfdatetime_systemtime.h0000644000175000017500000001160114610746237024107 0ustar00lordyestalordyesta/* * SYSTEMTIME functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_internal_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 ); int libfdatetime_internal_systemtime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_systemtime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_systemtime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_extern.h0000644000175000017500000000264114610746237023215 0ustar00lordyestalordyesta/* * The internal extern definition * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) #include #if defined( __CYGWIN__ ) || defined( __MINGW32__ ) #define LIBFDATETIME_EXTERN_VARIABLE extern #else #define LIBFDATETIME_EXTERN_VARIABLE LIBFDATETIME_EXTERN #endif #else #define LIBFDATETIME_EXTERN /* extern */ #define LIBFDATETIME_EXTERN_VARIABLE extern #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) */ libesedb-20240420/libfdatetime/libfdatetime_posix_time.c0000644000175000017500000014176614610746237024077 0ustar00lordyestalordyesta/* * POSIX time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a POSIX time * Make sure the value posix_time is referencing, 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 ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_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 defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffUL ) == 0 ) ) #else if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffULL ) == 0 ) ) #endif { 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 POSIX time into a 32-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_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_to_32bit"; 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( ( 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 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", function ); return( -1 ); } if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 32-bit value.", 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 ); } *value_32bit = (uint32_t) internal_posix_time->timestamp; *value_type = internal_posix_time->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 ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_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 defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffUL ) == 0 ) ) #else if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffULL ) == 0 ) ) #endif { 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 a 64-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_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_to_64bit"; 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( ( 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", function ); return( -1 ); } if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 64-bit value.", 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 ); } *value_64bit = internal_posix_time->timestamp; *value_type = internal_posix_time->value_type; return( 1 ); } /* Converts a POSIX time into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_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_internal_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 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid 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 ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { is_signed = (uint8_t) ( posix_timestamp >> 63 ); #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) posix_timestamp &= 0x7fffffffffffffffUL; #else posix_timestamp &= 0x7fffffffffffffffULL; #endif } if( ( is_signed != 0 ) && ( 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_NANO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { /* The timestamp is in units of nano seconds correct the value to seconds */ if( is_signed == 0 ) { date_time_values->nano_seconds = posix_timestamp % 1000; } else { date_time_values->nano_seconds = 1000 - ( posix_timestamp % 1000 ); } posix_timestamp /= 1000; } 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 ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_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; } 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; } 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 'Jan 1, 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; if( posix_timestamp >= 10957 ) { date_time_values->year = 2000; posix_timestamp -= 10957; } else { date_time_values->year = 1970; } } 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 ); /* Determine the day */ date_time_values->day = (uint8_t) posix_timestamp; 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; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_get_string_size"; 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( ( 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", 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 ); } result = libfdatetime_internal_posix_time_copy_to_date_time_values( (libfdatetime_internal_posix_time_t *) posix_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the POSIX time */ 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 ) ) { *string_size = 13; } else { *string_size = 21; } } return( 1 ); } /* Converts the POSIX time into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_posix_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_posix_time_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; size_t string_size = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", 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( ( 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 ) ) { string_size = 13; byte_shift = 28; } else { string_size = 21; byte_shift = 60; } if( ( utf8_string_size < string_size ) || ( *utf8_string_index > ( utf8_string_size - 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'; 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-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"; 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; result = libfdatetime_internal_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_posix_time_copy_to_utf8_string_in_hexadecimal( internal_posix_time, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to POSIX time to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the POSIX time into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_posix_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_posix_time_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; size_t string_size = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", 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( ( 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 ) ) { string_size = 13; byte_shift = 28; } else { string_size = 21; byte_shift = 60; } if( ( utf16_string_size < string_size ) || ( *utf16_string_index > ( utf16_string_size - 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'; 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-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"; 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; result = libfdatetime_internal_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_posix_time_copy_to_utf16_string_in_hexadecimal( internal_posix_time, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to POSIX time to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the POSIX time into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_posix_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_posix_time_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; size_t string_size = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 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 ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_NANO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid POSIX time - unsupported value type.", 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( ( 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 ) ) { string_size = 13; byte_shift = 28; } else { string_size = 21; byte_shift = 60; } if( ( utf32_string_size < string_size ) || ( *utf32_string_index > ( utf32_string_size - 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'; 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 ); } /* 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"; 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; result = libfdatetime_internal_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 ); } } if( result != 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: unable to copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_posix_time_copy_to_utf32_string_in_hexadecimal( internal_posix_time, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to POSIX time to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/libfdatetime_unused.h0000644000175000017500000000264014610746237023212 0ustar00lordyestalordyesta/* * Definitions to silence compiler warnings about unused function attributes/parameters. * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #if !defined( _LIBFDATETIME_UNUSED_H ) #define _LIBFDATETIME_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 /* !defined( _LIBFDATETIME_UNUSED_H ) */ libesedb-20240420/libfdatetime/libfdatetime_fat_date_time.h0000644000175000017500000001233614610746237024477 0ustar00lordyestalordyesta/* * FAT date and time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_32bit( libfdatetime_fat_date_time_t *fat_date_time, uint32_t value_32bit, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_32bit( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *value_32bit, libcerror_error_t **error ); int libfdatetime_internal_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 ); 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 ); int libfdatetime_internal_fat_date_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_fat_date_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_fat_date_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_systemtime.c0000644000175000017500000012153614610746237024113 0ustar00lordyestalordyesta/* * SYSTEMTIME functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a SYSTEMTIME * Make sure the value systemtime is referencing, 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_internal_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_internal_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 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"; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } result = libfdatetime_internal_systemtime_copy_to_date_time_values( (libfdatetime_internal_systemtime_t *) systemtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the SYSTEMTIME */ *string_size = 58; } return( 1 ); } /* Converts the SYSTEMTIME into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_systemtime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_systemtime_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SYSTEMTIME.", 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_size < 58 ) || ( *utf8_string_index > ( utf8_string_size - 58 ) ) ) { 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-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"; 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; result = libfdatetime_internal_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_systemtime_copy_to_utf8_string_in_hexadecimal( internal_systemtime, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to SYSTEMTIME to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the SYSTEMTIME into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_systemtime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_systemtime_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SYSTEMTIME.", 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_size < 58 ) || ( *utf16_string_index > ( utf16_string_size - 58 ) ) ) { 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-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"; 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; result = libfdatetime_internal_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_systemtime_copy_to_utf16_string_in_hexadecimal( internal_systemtime, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to SYSTEMTIME to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the SYSTEMTIME into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_systemtime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_systemtime_t *internal_systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_systemtime_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid SYSTEMTIME.", 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_size < 58 ) || ( *utf32_string_index > ( utf32_string_size - 58 ) ) ) { 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 ); } /* 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"; 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; result = libfdatetime_internal_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_systemtime_copy_to_utf32_string_in_hexadecimal( internal_systemtime, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to SYSTEMTIME to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/libfdatetime/libfdatetime_nsf_timedate.h0000644000175000017500000001320114610746237024344 0ustar00lordyestalordyesta/* * Notes Storage Facility (NSF) timedate functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_64bit( libfdatetime_nsf_timedate_t *nsf_timedate, uint64_t *value_64bit, libcerror_error_t **error ); int libfdatetime_internal_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 ); int libfdatetime_internal_nsf_timedate_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_nsf_timedate_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_nsf_timedate_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) */ libesedb-20240420/libfdatetime/libfdatetime_libcerror.h0000644000175000017500000000265214610746237023675 0ustar00lordyestalordyesta/* * The libcerror header wrapper * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* defined( HAVE_LOCAL_LIBCERROR ) */ #endif /* !defined( _LIBFDATETIME_LIBCERROR_H ) */ libesedb-20240420/libfdatetime/libfdatetime_support.c0000644000175000017500000000220214610746237023410 0ustar00lordyestalordyesta/* * Support functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 libesedb-20240420/libfdatetime/libfdatetime_error.c0000644000175000017500000000562614610746237023042 0ustar00lordyestalordyesta/* * Error functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ) { int print_count = 0; print_count = libcerror_error_fprint( (libcerror_error_t *) error, stream ); 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 libfdatetime_error_sprint( libfdatetime_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } /* 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 ) { int print_count = 0; print_count = libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ); return( 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 libfdatetime_error_backtrace_sprint( libfdatetime_error_t *error, char *string, size_t size ) { int print_count = 0; print_count = libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ); return( print_count ); } #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */ libesedb-20240420/libfdatetime/libfdatetime_posix_time.h0000644000175000017500000001321314610746237024065 0ustar00lordyestalordyesta/* * POSIX time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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_to_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 ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_64bit( libfdatetime_posix_time_t *posix_time, uint64_t *value_64bit, uint8_t *value_type, libcerror_error_t **error ); int libfdatetime_internal_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 ); int libfdatetime_internal_posix_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_posix_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_posix_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_posix_time_t *internal_posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_date_time_values.h0000644000175000017500000000607314610746237025225 0ustar00lordyestalordyesta/* * Date and time values functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 /* !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) */ libesedb-20240420/libfdatetime/libfdatetime_filetime.h0000644000175000017500000001233414610746237023506 0ustar00lordyestalordyesta/* * FILETIME functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_64bit( libfdatetime_filetime_t *filetime, uint64_t *value_64bit, libcerror_error_t **error ); int libfdatetime_internal_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 ); int libfdatetime_internal_filetime_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, 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 ); int libfdatetime_internal_filetime_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, 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 ); int libfdatetime_internal_filetime_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_filetime_t *internal_filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, 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 /* !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) */ libesedb-20240420/libfdatetime/libfdatetime_date_time_values.c0000644000175000017500000014753514610746237025231 0ustar00lordyestalordyesta/* * Date and time values functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. If not, see . */ #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Creates date time values * Make sure the value date_time_values is referencing, is set to NULL * 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, 0 if the date and time values are not valid 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; 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( 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 | LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR; 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 ); } /* 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 ); } } } /* 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; } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR ) != 0 ) { /* Example: UTC */ if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { *string_size += 4; } /* Example: Z */ else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { *string_size += 1; } } 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 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 | LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR; 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 ); } if( month_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing month string.", 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 ); 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 ); 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 ); string_index += 3; } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { 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 ); } utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) 'U'; utf8_string[ string_index++ ] = (uint8_t) 'T'; utf8_string[ string_index++ ] = (uint8_t) 'C'; } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { 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) 'Z'; } } 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 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 | LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR; 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 ); } if( month_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing month string.", 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 ); 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 ); 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 ); string_index += 3; } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { 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 ); } utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) 'U'; utf16_string[ string_index++ ] = (uint16_t) 'T'; utf16_string[ string_index++ ] = (uint16_t) 'C'; } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { 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) 'Z'; } } 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 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 | LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR; 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 ); } } 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 ); } if( month_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing month string.", 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' + ( year_value / 1000 ); year_value %= 1000; utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 100 ); year_value %= 100; utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 10 ); year_value %= 10; utf32_string[ string_index++ ] = (uint32_t) '0' + 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' + ( year_value / 1000 ); year_value %= 1000; utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 100 ); year_value %= 100; utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 10 ); year_value %= 10; utf32_string[ string_index++ ] = (uint32_t) '0' + 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 ); 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 ); 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 ); string_index += 3; } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIMEZONE_INDICATOR ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { 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 ); } utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) 'U'; utf32_string[ string_index++ ] = (uint32_t) 'T'; utf32_string[ string_index++ ] = (uint32_t) 'C'; } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { 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) 'Z'; } } 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 ); } libesedb-20240420/libfdatetime/libfdatetime_types.h0000644000175000017500000000464414610746237023061 0ustar00lordyestalordyesta/* * The internal type definitions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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 {} libfdatetime_fat_date_t; typedef struct libfdatetime_fat_date_time {} libfdatetime_fat_date_time_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_hfs_time {} libfdatetime_hfs_time_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_t; typedef intptr_t libfdatetime_fat_date_time_t; typedef intptr_t libfdatetime_fat_time_t; typedef intptr_t libfdatetime_filetime_t; typedef intptr_t libfdatetime_floatingtime_t; typedef intptr_t libfdatetime_hfs_time_t; typedef intptr_t libfdatetime_nsf_timedate_t; typedef intptr_t libfdatetime_posix_time_t; typedef intptr_t libfdatetime_systemtime_t; #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */ #endif /* defined( HAVE_LOCAL_LIBFDATETIME ) */ #endif /* !defined( _LIBFDATETIME_INTERNAL_TYPES_H ) */ libesedb-20240420/libfdatetime/Makefile.in0000644000175000017500000010241514610746265021074 0ustar00lordyestalordyesta# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4 \ $(top_srcdir)/m4/python.m4 $(top_srcdir)/m4/tests.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 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_hfs_time.c \ libfdatetime_hfs_time.h libfdatetime_libcerror.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_hfs_time.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) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LOCAL_LIBFDATETIME_TRUE@am_libfdatetime_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfdatetime_date_time_values.Plo \ ./$(DEPDIR)/libfdatetime_error.Plo \ ./$(DEPDIR)/libfdatetime_fat_date_time.Plo \ ./$(DEPDIR)/libfdatetime_filetime.Plo \ ./$(DEPDIR)/libfdatetime_floatingtime.Plo \ ./$(DEPDIR)/libfdatetime_hfs_time.Plo \ ./$(DEPDIR)/libfdatetime_nsf_timedate.Plo \ ./$(DEPDIR)/libfdatetime_posix_time.Plo \ ./$(DEPDIR)/libfdatetime_support.Plo \ ./$(DEPDIR)/libfdatetime_systemtime.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfdatetime_la_SOURCES) DIST_SOURCES = $(am__libfdatetime_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = sources-recursive splint-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DPKG_DATE = @DPKG_DATE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_DLLMAIN = @HAVE_DLLMAIN@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCDATA = @HAVE_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LIBMAPIDB@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@ 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_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@ 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_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_PTHREAD = @HAVE_PTHREAD@ 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@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@ LIBCDATA_LIBADD = @LIBCDATA_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@ LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@ LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@ LIBESEDB_DLL_EXPORT = @LIBESEDB_DLL_EXPORT@ LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@ 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@ LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@ LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIB_FUZZING_ENGINE = @LIB_FUZZING_ENGINE@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 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@ PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@ PTHREAD_LIBADD = @PTHREAD_LIBADD@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@ PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPEC_DATE = @SPEC_DATE@ 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_CXX = @ac_ct_CXX@ 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_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@ ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@ ax_libcdata_spec_requires = @ax_libcdata_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_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@ ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@ ax_libcthreads_spec_requires = @ax_libcthreads_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_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@ ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@ ax_libmapidb_spec_requires = @ax_libmapidb_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@ ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@ 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@ libcdata_CFLAGS = @libcdata_CFLAGS@ libcdata_LIBS = @libcdata_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@ libcthreads_CFLAGS = @libcthreads_CFLAGS@ libcthreads_LIBS = @libcthreads_LIBS@ libdir = @libdir@ libesedb_spec_requires = @libesedb_spec_requires@ libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@ 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@ libmapidb_CFLAGS = @libmapidb_CFLAGS@ libmapidb_LIBS = @libmapidb_LIBS@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ 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../include -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I../common -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ @LIBCERROR_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_hfs_time.c libfdatetime_hfs_time.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_libcerror.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 DISTCLEANFILES = \ Makefile \ 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 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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 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)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfdatetime.la: $(libfdatetime_la_OBJECTS) $(libfdatetime_la_DEPENDENCIES) $(EXTRA_libfdatetime_la_DEPENDENCIES) $(AM_V_CCLD)$(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@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_fat_date_time.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_filetime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_floatingtime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_hfs_time.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_nsf_timedate.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_posix_time.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_support.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_systemtime.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs sources-local: splint-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfdatetime_date_time_values.Plo -rm -f ./$(DEPDIR)/libfdatetime_error.Plo -rm -f ./$(DEPDIR)/libfdatetime_fat_date_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_filetime.Plo -rm -f ./$(DEPDIR)/libfdatetime_floatingtime.Plo -rm -f ./$(DEPDIR)/libfdatetime_hfs_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_nsf_timedate.Plo -rm -f ./$(DEPDIR)/libfdatetime_posix_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_support.Plo -rm -f ./$(DEPDIR)/libfdatetime_systemtime.Plo -rm -f Makefile 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 -f ./$(DEPDIR)/libfdatetime_date_time_values.Plo -rm -f ./$(DEPDIR)/libfdatetime_error.Plo -rm -f ./$(DEPDIR)/libfdatetime_fat_date_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_filetime.Plo -rm -f ./$(DEPDIR)/libfdatetime_floatingtime.Plo -rm -f ./$(DEPDIR)/libfdatetime_hfs_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_nsf_timedate.Plo -rm -f ./$(DEPDIR)/libfdatetime_posix_time.Plo -rm -f ./$(DEPDIR)/libfdatetime_support.Plo -rm -f ./$(DEPDIR)/libfdatetime_systemtime.Plo -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: sources: sources-am sources-am: sources-local splint: splint-am splint-am: splint-local uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am 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 \ sources-am sources-local splint-am splint-local tags tags-am \ uninstall uninstall-am .PRECIOUS: Makefile sources-local: $(BUILT_SOURCES) splint-local: @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: libesedb-20240420/libfdatetime/libfdatetime_fat_date_time.c0000644000175000017500000007601214610746237024473 0ustar00lordyestalordyesta/* * FAT date and time functions * * Copyright (C) 2009-2024, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 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 Lesser General Public License * along with this program. 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" /* Creates a FAT date and time * Make sure the value fat_date_time is referencing, 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_32bit( 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_32bit"; 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->date = (uint16_t) ( value_32bit & 0x0ffffL ); internal_fat_date_time->time = (uint16_t) ( value_32bit >> 16 ); return( 1 ); } /* Converts a FAT date and time into a 32-bit value * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_32bit( 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_to_32bit"; 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( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid 32-bit value.", function ); return( -1 ); } *value_32bit = internal_fat_date_time->time; *value_32bit <<= 16; *value_32bit |= internal_fat_date_time->date; return( 1 ); } /* Converts a FAT date and time into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_internal_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_internal_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 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"; 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 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } result = libfdatetime_internal_fat_date_time_copy_to_date_time_values( (libfdatetime_internal_fat_date_time_t *) fat_date_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { result = libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } } if( result != 1 ) { /* Make sure the string can hold the hexadecimal representation of the FAT date time */ *string_size = 16; } return( 1 ); } /* Converts the FAT date and time into an UTF-8 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_fat_date_time_copy_to_utf8_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_fat_date_time_copy_to_utf8_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_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( 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_size < 16 ) || ( *utf8_string_index > ( utf8_string_size - 16 ) ) ) { 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-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"; 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; result = libfdatetime_internal_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-8 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_fat_date_time_copy_to_utf8_string_in_hexadecimal( internal_fat_date_time, utf8_string, utf8_string_size, utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FAT date time values to hexadecimal UTF-8 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the FAT date and time into an UTF-16 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_fat_date_time_copy_to_utf16_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_fat_date_time_copy_to_utf16_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_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( 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_size < 16 ) || ( *utf16_string_index > ( utf16_string_size - 16 ) ) ) { 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-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"; 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; result = libfdatetime_internal_fat_date_time_copy_to_date_time_values( (libfdatetime_internal_fat_date_time_t *) fat_date_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-16 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_fat_date_time_copy_to_utf16_string_in_hexadecimal( internal_fat_date_time, utf16_string, utf16_string_size, utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FAT date time values to hexadecimal UTF-16 string.", function ); return( -1 ); } } return( 1 ); } /* Converts the FAT date and time into an UTF-32 string in hexadecimal representation * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_internal_fat_date_time_copy_to_utf32_string_in_hexadecimal( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libfdatetime_internal_fat_date_time_copy_to_utf32_string_in_hexadecimal"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; if( internal_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( 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_size < 16 ) || ( *utf32_string_index > ( utf32_string_size - 16 ) ) ) { 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 ); } /* 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"; 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; result = libfdatetime_internal_fat_date_time_copy_to_date_time_values( (libfdatetime_internal_fat_date_time_t *) fat_date_time, &date_time_values, error ); if( result != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); /* TODO debug print error */ #endif /* defined( HAVE_DEBUG_OUTPUT ) */ if( ( error != NULL ) && ( *error != NULL ) ) { libcerror_error_free( error ); } } else { 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 copy date time values to UTF-32 string.", function ); return( -1 ); } } if( result != 1 ) { result = libfdatetime_internal_fat_date_time_copy_to_utf32_string_in_hexadecimal( internal_fat_date_time, utf32_string, utf32_string_size, utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to FAT date time values to hexadecimal UTF-32 string.", function ); return( -1 ); } } return( 1 ); } libesedb-20240420/aclocal.m40000644000175000017500000015712314610746261016240 0ustar00lordyestalordyesta# generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, [m4_warning([this file was generated for autoconf 2.71. 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'.])]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 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 ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl 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]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. 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` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. 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 ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl 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 $2]) _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 --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$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])[]dnl ]) 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 .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2021 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.16' 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.16.5], [], [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.16.5])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-2021 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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2021 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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". rm -rf conftest.dir 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 10 /bin/sh. echo '/* dummy */' > 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 ;; msvc7 | msvc7msys | 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _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. # This creates each '.Po' and '.Plo' makefile fragment that we'll 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" MAKE="${MAKE-make}"])]) # AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- # Copyright (C) 2012-2021 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_EXTRA_RECURSIVE_TARGETS # -------------------------- # Define the list of user recursive targets. This macro exists only to # be traced by Automake, which will ensure that a proper definition of # user-defined recursive targets (and associated rules) is propagated # into all the generated Makefiles. # TODO: We should really reject non-literal arguments here... AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) 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-2021 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+set}" != 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-2021 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. # 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-2021 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_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 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_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 is modern enough. # If it is, 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 MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 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_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-2021 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 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-2021 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 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-2021 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_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-2021 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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/host-cpu-c-abi.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.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/libcdata.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/libcthreads.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/libmapidb.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/pthread.m4]) m4_include([m4/python.m4]) m4_include([m4/tests.m4]) m4_include([m4/types.m4]) m4_include([acinclude.m4]) libesedb-20240420/configure.ac0000644000175000017500000002043314610727243016656 0ustar00lordyestalordyestaAC_PREREQ([2.71]) AC_INIT( [libesedb], [20240420], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( [include/libesedb.h.in]) AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar]) AM_EXTRA_RECURSIVE_TARGETS([sources splint]) AC_CONFIG_MACRO_DIR([m4]) dnl Check for host type AC_CANONICAL_HOST dnl Check for libtool DLL support LT_INIT([win32-dll]) dnl Checks for programs AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_CXX AC_PROG_MAKE_SET AC_PROG_INSTALL dnl Check for 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]) AM_GNU_GETTEXT_VERSION([0.21]) dnl Check for compiler language support AC_C_CONST AC_C_VOLATILE dnl Check for large file support AC_SYS_LARGEFILE dnl Check if shared library support should be disabled AX_COMMON_CHECK_DISABLE_SHARED_LIBS dnl Check if tools should be build as static executables AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES 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 if verbose output should be enabled AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT dnl Check if debug output should be enabled AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT dnl Check for type definitions AX_TYPES_CHECK_LOCAL dnl Check if common required headers and functions are available AX_COMMON_CHECK_LOCAL dnl Check if libcerror or required headers and functions are available AX_LIBCERROR_CHECK_ENABLE dnl Check if libcthreads or required headers and functions are available AX_LIBCTHREADS_CHECK_ENABLE dnl Check if libcdata or required headers and functions are available AX_LIBCDATA_CHECK_ENABLE dnl Check if libclocale or required headers and functions are available AX_LIBCLOCALE_CHECK_ENABLE dnl Check if libcnotify or required headers and functions are available AX_LIBCNOTIFY_CHECK_ENABLE dnl Check if libcsplit or required headers and functions are available AX_LIBCSPLIT_CHECK_ENABLE dnl Check if libuna or required headers and functions are available AX_LIBUNA_CHECK_ENABLE dnl Check if libcfile or required headers and functions are available AX_LIBCFILE_CHECK_ENABLE dnl Check if libcpath or required headers and functions are available AX_LIBCPATH_CHECK_ENABLE dnl Check if libbfio or required headers and functions are available AX_LIBBFIO_CHECK_ENABLE dnl Check if libfcache or required headers and functions are available AX_LIBFCACHE_CHECK_ENABLE dnl Check if libfdata or required headers and functions are available AX_LIBFDATA_CHECK_ENABLE dnl Check if libfdatetime or required headers and functions are available AX_LIBFDATETIME_CHECK_ENABLE dnl Check if libfguid or required headers and functions are available AX_LIBFGUID_CHECK_ENABLE dnl Check if libfvalue or required headers and functions are available AX_LIBFVALUE_CHECK_ENABLE dnl Check if libfwnt or required headers and functions are available AX_LIBFWNT_CHECK_ENABLE dnl Check if libesedb required headers and functions are available AX_LIBESEDB_CHECK_LOCAL dnl Check if libesedb Python bindings (pyesedb) required headers and functions are available AX_PYTHON_CHECK_ENABLE AS_IF( [test "x${ac_cv_enable_python}" != xno], [dnl Headers included in pyesedb/pyesedb_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 Check if libfmapi or required headers and functions are available AX_LIBFMAPI_CHECK_ENABLE dnl Check if libmapidb or required headers and functions are available AX_LIBMAPIDB_CHECK_ENABLE dnl Check if esedbtools required headers and functions are available AX_ESEDBTOOLS_CHECK_LOCAL dnl Check if DLL support is needed AX_LIBESEDB_CHECK_DLL_SUPPORT dnl Check if tests required headers and functions are available AX_TESTS_CHECK_LOCAL AX_TESTS_CHECK_OSSFUZZ dnl Set additional compiler flags CFLAGS="$CFLAGS -Wall"; dnl Check if requires and build requires should be set in spec file AS_IF( [test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libcthreads" = xyes || test "x$ac_cv_libcdata" = 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], [AC_SUBST( [libesedb_spec_requires], [Requires:]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes], [AC_SUBST( [libesedb_spec_tools_build_requires], [BuildRequires:]) ]) dnl Set the date for the dpkg files AC_SUBST( [DPKG_DATE], [`date -R 2> /dev/null`]) dnl Set the date for the spec file AC_SUBST( [SPEC_DATE], [`date +"%a %b %e %Y" 2> /dev/null`]) dnl Generate Makefiles AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([include/Makefile]) AC_CONFIG_FILES([common/Makefile]) AC_CONFIG_FILES([libcerror/Makefile]) AC_CONFIG_FILES([libcthreads/Makefile]) AC_CONFIG_FILES([libcdata/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([libesedb/Makefile]) AC_CONFIG_FILES([pyesedb/Makefile]) AC_CONFIG_FILES([libfmapi/Makefile]) AC_CONFIG_FILES([libmapidb/Makefile]) AC_CONFIG_FILES([esedbtools/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([ossfuzz/Makefile]) AC_CONFIG_FILES([msvscpp/Makefile]) dnl Generate header files AC_CONFIG_FILES([include/libesedb.h]) AC_CONFIG_FILES([include/libesedb/definitions.h]) AC_CONFIG_FILES([include/libesedb/features.h]) AC_CONFIG_FILES([include/libesedb/types.h]) AC_CONFIG_FILES([libesedb/libesedb_definitions.h]) dnl Generate distribution specific files AC_CONFIG_FILES([common/types.h]) AC_CONFIG_FILES([dpkg/changelog]) AC_CONFIG_FILES([libesedb/libesedb.rc]) AC_CONFIG_FILES([libesedb.pc]) AC_CONFIG_FILES([libesedb.spec]) AC_CONFIG_FILES([setup.cfg]) dnl Generate a source configuration file AC_CONFIG_HEADERS([common/config.h]) AC_OUTPUT dnl Print a summary AC_MSG_NOTICE([ Building: libcerror support: $ac_cv_libcerror libcthreads support: $ac_cv_libcthreads libcdata support: $ac_cv_libcdata 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 libmapidb support: $ac_cv_libmapidb Features: Multi-threading support: $ac_cv_libcthreads_multi_threading Wide character type support: $ac_cv_enable_wide_character_type esedbtools are build as static executables: $ac_cv_enable_static_executables Python (pyesedb) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output ]);